Skip to content

Commit 75ad302

Browse files
committed
Compile and warning fixes for macOS
Number of warnings like this has been fixed DockWidget.h:62:9: warning: class 'DockContainerWidgetPrivate' was previously declared as a struct [-Wmismatched-tags] Also in ads_globals.cpp Clang didn’t like how that code setup so I changed it to what I think is the correct way. This would be good to get verified.
1 parent 18a4f17 commit 75ad302

10 files changed

+43
-43
lines changed

demo/MainWindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CMainWindow : public QMainWindow
4545
Q_OBJECT
4646
private:
4747
MainWindowPrivate* d;///< private data - pimpl
48-
friend class MainWindowPrivate;
48+
friend struct MainWindowPrivate;
4949

5050
protected:
5151
virtual void closeEvent(QCloseEvent* event) override;

src/DockAreaWidget.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -52,7 +52,7 @@ class CDockAreaWidget : public QFrame
5252
Q_OBJECT
5353
private:
5454
DockAreaWidgetPrivate* d; ///< private data (pimpl)
55-
friend class DockAreaWidgetPrivate;
55+
friend struct DockAreaWidgetPrivate;
5656

5757
private slots:
5858
void onDockWidgetTitleClicked();

src/DockContainerWidget.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -54,7 +54,7 @@ class CDockContainerWidget : public QFrame
5454
Q_OBJECT
5555
private:
5656
DockContainerWidgetPrivate* d; ///< private data (pimpl)
57-
friend class DockContainerWidgetPrivate;
57+
friend struct DockContainerWidgetPrivate;
5858

5959
protected:
6060
/**

src/DockManager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -49,7 +49,7 @@ class CDockManager : public CDockContainerWidget
4949
Q_OBJECT
5050
private:
5151
DockManagerPrivate* d; ///< private data (pimpl)
52-
friend class DockManagerPrivate;
52+
friend struct DockManagerPrivate;
5353

5454
protected:
5555

src/DockOverlay.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -44,7 +44,7 @@ class CDockOverlay : public QFrame
4444
Q_OBJECT
4545
private:
4646
DockOverlayPrivate* d; //< private data class
47-
friend class DockOverlayPrivate;
47+
friend struct DockOverlayPrivate;
4848
friend class DockOverlayCross;
4949

5050
public:
@@ -118,7 +118,7 @@ class CDockOverlayCross : public QWidget
118118
Q_OBJECT
119119
private:
120120
DockOverlayCrossPrivate* d;
121-
friend class DockOverlayCrossPrivate;
121+
friend struct DockOverlayCrossPrivate;
122122
friend class CDockOverlay;
123123

124124
public:

src/DockSplitter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -43,7 +43,7 @@ class CDockSplitter : public QSplitter
4343
Q_OBJECT
4444
private:
4545
DockSplitterPrivate* d;
46-
friend class DockSplitterPrivate;
46+
friend struct DockSplitterPrivate;
4747

4848
public:
4949
CDockSplitter(QWidget *parent = Q_NULLPTR);

src/DockWidget.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -52,14 +52,14 @@ class CDockWidget : public QFrame
5252
Q_OBJECT
5353
private:
5454
DockWidgetPrivate* d; ///< private data (pimpl)
55-
friend class DockWidgetPrivate;
55+
friend struct DockWidgetPrivate;
5656

5757
protected:
5858
friend class CDockContainerWidget;
5959
friend class CDockAreaWidget;
6060
friend class CFloatingDockContainer;
6161
friend class CDockManager;
62-
friend class DockContainerWidgetPrivate;
62+
friend struct DockContainerWidgetPrivate;
6363

6464
/**
6565
* Assigns the dock manager that manages this dock widget

src/DockWidgetTitleBar.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -48,7 +48,7 @@ class CDockWidgetTitleBar : public QFrame
4848

4949
private:
5050
DockWidgetTitleBarPrivate* d; ///< private data (pimpl)
51-
friend class DockWidgetTitleBarPrivate;
51+
friend struct DockWidgetTitleBarPrivate;
5252

5353
protected:
5454
virtual void mousePressEvent(QMouseEvent* ev) override;

src/FloatingDockContainer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
/*******************************************************************************
44
** Qt Advanced Docking System
55
** Copyright (C) 2017 Uwe Kindler
6-
**
6+
**
77
** This library is free software; you can redistribute it and/or
88
** modify it under the terms of the GNU Lesser General Public
99
** License as published by the Free Software Foundation; either
1010
** version 2.1 of the License, or (at your option) any later version.
11-
**
11+
**
1212
** This library is distributed in the hope that it will be useful,
1313
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1515
** Lesser General Public License for more details.
16-
**
16+
**
1717
** You should have received a copy of the GNU Lesser General Public
1818
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1919
******************************************************************************/
@@ -51,7 +51,7 @@ class CFloatingDockContainer : public QWidget
5151
Q_OBJECT
5252
private:
5353
FloatingDockContainerPrivate* d; ///< private data (pimpl)
54-
friend class FloatingDockContainerPrivate;
54+
friend struct FloatingDockContainerPrivate;
5555

5656
private slots:
5757
void onDockAreasAddedOrRemoved();

src/ads_globals.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*******************************************************************************
22
** Qt Advanced Docking System
33
** Copyright (C) 2017 Uwe Kindler
4-
**
4+
**
55
** This library is free software; you can redistribute it and/or
66
** modify it under the terms of the GNU Lesser General Public
77
** License as published by the Free Software Foundation; either
88
** version 2.1 of the License, or (at your option) any later version.
9-
**
9+
**
1010
** This library is distributed in the hope that it will be useful,
1111
** but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1313
** Lesser General Public License for more details.
14-
**
14+
**
1515
** You should have received a copy of the GNU Lesser General Public
1616
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
1717
******************************************************************************/
@@ -62,12 +62,12 @@ CDockInsertParam dockAreaInsertParameters(DockWidgetArea Area)
6262
{
6363
switch (Area)
6464
{
65-
case TopDockWidgetArea: return QPair<Qt::Orientation, bool>(Qt::Vertical, false);
66-
case RightDockWidgetArea: return QPair<Qt::Orientation, bool>(Qt::Horizontal, true);
65+
case TopDockWidgetArea: return CDockInsertParam(Qt::Vertical, false);
66+
case RightDockWidgetArea: return CDockInsertParam(Qt::Horizontal, true);
6767
case CenterDockWidgetArea:
68-
case BottomDockWidgetArea: return QPair<Qt::Orientation, bool>(Qt::Vertical, true);
69-
case LeftDockWidgetArea: return QPair<Qt::Orientation, bool>(Qt::Horizontal, false);
70-
default: QPair<Qt::Orientation, bool>(Qt::Vertical, false);
68+
case BottomDockWidgetArea: return CDockInsertParam(Qt::Vertical, true);
69+
case LeftDockWidgetArea: return CDockInsertParam(Qt::Horizontal, false);
70+
default: CDockInsertParam(Qt::Vertical, false);
7171
} // switch (Area)
7272

7373
return CDockInsertParam(Qt::Vertical, false);

0 commit comments

Comments
 (0)