diff --git a/src/libs/advanceddockingsystem/ads_globals.h b/src/libs/advanceddockingsystem/ads_globals.h index a81cbe57d02..4c0b8d6896a 100644 --- a/src/libs/advanceddockingsystem/ads_globals.h +++ b/src/libs/advanceddockingsystem/ads_globals.h @@ -42,7 +42,10 @@ #include #include +QT_BEGIN_NAMESPACE class QAbstractButton; +class QSplitter; +QT_END_NAMESPACE #ifndef ADS_STATIC #ifdef ADVANCEDDOCKINGSYSTEM_LIBRARY @@ -67,8 +70,6 @@ class QAbstractButton; // dumps to qDebug and std::cout after layout changes #define ADS_DEBUG_LEVEL 0 -class QSplitter; - namespace ADS { enum eStateFileVersion { InitialVerison = 0, Version1 = 1, CurrentVersion = Version1 }; diff --git a/src/libs/advanceddockingsystem/advanceddockingsystem.qbs b/src/libs/advanceddockingsystem/advanceddockingsystem.qbs index 876ea534f6f..e2877556f0e 100644 --- a/src/libs/advanceddockingsystem/advanceddockingsystem.qbs +++ b/src/libs/advanceddockingsystem/advanceddockingsystem.qbs @@ -14,7 +14,7 @@ QtcLibrary { name: "General" files: [ "ads_globals.cpp", "ads_globals.h", - "dockareaareatabbar.cpp", "dockareatabbar.h", + "dockareatabbar.cpp", "dockareatabbar.h", "dockareatitlebar.cpp", "dockareatitlebar.h", "dockareawidget.cpp", "dockareawidget.h", "dockcomponentsfactory.cpp", "dockcomponentsfactory.h", diff --git a/src/libs/advanceddockingsystem/dockareatitlebar.h b/src/libs/advanceddockingsystem/dockareatitlebar.h index 3562d057dad..482816a34ee 100644 --- a/src/libs/advanceddockingsystem/dockareatitlebar.h +++ b/src/libs/advanceddockingsystem/dockareatitlebar.h @@ -40,7 +40,9 @@ #include #include +QT_BEGIN_NAMESPACE class QAbstractButton; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/dockareawidget.h b/src/libs/advanceddockingsystem/dockareawidget.h index 9949ef16822..fab47e94769 100644 --- a/src/libs/advanceddockingsystem/dockareawidget.h +++ b/src/libs/advanceddockingsystem/dockareawidget.h @@ -40,8 +40,10 @@ #include -class QXmlStreamWriter; +QT_BEGIN_NAMESPACE class QAbstractButton; +class QXmlStreamWriter; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/dockcontainerwidget.h b/src/libs/advanceddockingsystem/dockcontainerwidget.h index 49e37d375ee..497b4caa194 100644 --- a/src/libs/advanceddockingsystem/dockcontainerwidget.h +++ b/src/libs/advanceddockingsystem/dockcontainerwidget.h @@ -40,7 +40,9 @@ #include +QT_BEGIN_NAMESPACE class QXmlStreamWriter; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/dockmanager.h b/src/libs/advanceddockingsystem/dockmanager.h index c5236911d75..a788e82d6a1 100644 --- a/src/libs/advanceddockingsystem/dockmanager.h +++ b/src/libs/advanceddockingsystem/dockmanager.h @@ -52,8 +52,10 @@ #include #include -class QSettings; +QT_BEGIN_NAMESPACE class QMenu; +class QSettings; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/dockoverlay.h b/src/libs/advanceddockingsystem/dockoverlay.h index 46a1e62aa66..b7243c29a63 100644 --- a/src/libs/advanceddockingsystem/dockoverlay.h +++ b/src/libs/advanceddockingsystem/dockoverlay.h @@ -42,7 +42,9 @@ #include #include +QT_BEGIN_NAMESPACE class QGridLayout; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/dockwidget.h b/src/libs/advanceddockingsystem/dockwidget.h index 8d98809cd64..56fbe4431f0 100644 --- a/src/libs/advanceddockingsystem/dockwidget.h +++ b/src/libs/advanceddockingsystem/dockwidget.h @@ -39,8 +39,10 @@ #include +QT_BEGIN_NAMESPACE class QToolBar; class QXmlStreamWriter; +QT_END_NAMESPACE namespace ADS { diff --git a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp index a9c1c33510f..24b3f95c530 100644 --- a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp +++ b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp @@ -388,10 +388,10 @@ namespace ADS d->setState(DraggingMousePressed); } #else - if (e->type() == QEvent::NonClientAreaMouseButtonPress + if (event->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)) { qCInfo(adsLog) << Q_FUNC_INFO << "QEvent::NonClientAreaMouseButtonPress" - << e->type(); + << event->type(); d->setState(DraggingMousePressed); } #endif