Skip to content

Commit 3011c0c

Browse files
2 parents b8b6db6 + 04ca4ae commit 3011c0c

File tree

9 files changed

+15
-12
lines changed

9 files changed

+15
-12
lines changed

examples/sidebar/MainWindow.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
#include <QMainWindow>
55
#include "DockManager.h"
66

7+
QT_BEGIN_NAMESPACE
78
namespace Ui {
89
class MainWindow;
910
}
10-
11+
QT_END_NAMESPACE
1112

1213
/**
1314
* This example shows, how to place a dock widget container and a static

examples/simple/MainWindow.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
#include <QMainWindow>
55
#include "DockManager.h"
66

7+
QT_BEGIN_NAMESPACE
78
namespace Ui {
89
class MainWindow;
910
}
11+
QT_END_NAMESPACE
1012

1113
class MainWindow : public QMainWindow
1214
{

src/DockAreaTitleBar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#include "ads_globals.h"
3636

37-
class QAbstractButton;
37+
QT_FORWARD_DECLARE_CLASS(QAbstractButton);
3838

3939
namespace ads
4040
{

src/DockAreaWidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#include "ads_globals.h"
3636
#include "DockWidget.h"
3737

38-
class QXmlStreamWriter;
39-
class QAbstractButton;
38+
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);
39+
QT_FORWARD_DECLARE_CLASS(QAbstractButton);
4040

4141
namespace ads
4242
{

src/DockContainerWidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "ads_globals.h"
3636
#include "DockWidget.h"
3737

38-
class QXmlStreamWriter;
38+
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);
3939

4040

4141
namespace ads

src/DockManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#include "FloatingDockContainer.h"
3737

3838

39-
class QSettings;
40-
class QMenu;
39+
QT_FORWARD_DECLARE_CLASS(QSettings);
40+
QT_FORWARD_DECLARE_CLASS(QMenu);
4141

4242
namespace ads
4343
{

src/DockOverlay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <QHash>
2727
#include <QRect>
2828
#include <QFrame>
29-
class QGridLayout;
29+
QT_FORWARD_DECLARE_CLASS(QGridLayout);
3030

3131
#include "ads_globals.h"
3232

src/DockWidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
#include "ads_globals.h"
3636

37-
class QToolBar;
38-
class QXmlStreamWriter;
37+
QT_FORWARD_DECLARE_CLASS(QToolBar);
38+
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);
3939

4040
namespace ads
4141
{

src/ads_globals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <QDebug>
3838
#include <QStyle>
3939

40-
class QAbstractButton;
40+
QT_FORWARD_DECLARE_CLASS(QAbstractButton);
4141

4242
#ifndef ADS_STATIC
4343
#ifdef ADS_SHARED_EXPORT
@@ -60,7 +60,7 @@ class QAbstractButton;
6060
// dumps to qDebug and std::cout after layout changes
6161
#define ADS_DEBUG_LEVEL 0
6262

63-
class QSplitter;
63+
QT_FORWARD_DECLARE_CLASS(QSplitter);
6464

6565
namespace ads
6666
{

0 commit comments

Comments
 (0)