Skip to content

Commit

Permalink
Support for Qt built with the -qtnamespace configure option (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
patstew authored May 13, 2020
1 parent 14f5426 commit 04ca4ae
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion examples/sidebar/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#include <QMainWindow>
#include "DockManager.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}

QT_END_NAMESPACE

/**
* This example shows, how to place a dock widget container and a static
Expand Down
2 changes: 2 additions & 0 deletions examples/simple/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#include <QMainWindow>
#include "DockManager.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
Expand Down
2 changes: 1 addition & 1 deletion src/DockAreaTitleBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "ads_globals.h"

class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QAbstractButton);

namespace ads
{
Expand Down
4 changes: 2 additions & 2 deletions src/DockAreaWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#include "ads_globals.h"
#include "DockWidget.h"

class QXmlStreamWriter;
class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);
QT_FORWARD_DECLARE_CLASS(QAbstractButton);

namespace ads
{
Expand Down
2 changes: 1 addition & 1 deletion src/DockContainerWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "ads_globals.h"
#include "DockWidget.h"

class QXmlStreamWriter;
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);


namespace ads
Expand Down
4 changes: 2 additions & 2 deletions src/DockManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
#include "FloatingDockContainer.h"


class QSettings;
class QMenu;
QT_FORWARD_DECLARE_CLASS(QSettings);
QT_FORWARD_DECLARE_CLASS(QMenu);

namespace ads
{
Expand Down
2 changes: 1 addition & 1 deletion src/DockOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <QHash>
#include <QRect>
#include <QFrame>
class QGridLayout;
QT_FORWARD_DECLARE_CLASS(QGridLayout);

#include "ads_globals.h"

Expand Down
4 changes: 2 additions & 2 deletions src/DockWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

#include "ads_globals.h"

class QToolBar;
class QXmlStreamWriter;
QT_FORWARD_DECLARE_CLASS(QToolBar);
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter);

namespace ads
{
Expand Down
4 changes: 2 additions & 2 deletions src/ads_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <QDebug>
#include <QStyle>

class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QAbstractButton);

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

class QSplitter;
QT_FORWARD_DECLARE_CLASS(QSplitter);

namespace ads
{
Expand Down

0 comments on commit 04ca4ae

Please sign in to comment.