ADS: Fix compile for Qt < 5.12.2 and namespaced Qt

Change-Id: I552d19b1659598d98d0ef1900c79e3c93747ffb2
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-02-21 06:49:13 +01:00
parent 32935591dd
commit e445f7aac3
9 changed files with 20 additions and 7 deletions

View File

@@ -42,7 +42,10 @@
#include <QWidget>
#include <QtCore/QtGlobal>
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 };

View File

@@ -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",

View File

@@ -40,7 +40,9 @@
#include <QFrame>
#include <QToolButton>
QT_BEGIN_NAMESPACE
class QAbstractButton;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -40,8 +40,10 @@
#include <QFrame>
class QXmlStreamWriter;
QT_BEGIN_NAMESPACE
class QAbstractButton;
class QXmlStreamWriter;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -40,7 +40,9 @@
#include <QFrame>
QT_BEGIN_NAMESPACE
class QXmlStreamWriter;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -52,8 +52,10 @@
#include <QtGui/QIcon>
#include <qobjectdefs.h>
class QSettings;
QT_BEGIN_NAMESPACE
class QMenu;
class QSettings;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -42,7 +42,9 @@
#include <QPointer>
#include <QRect>
QT_BEGIN_NAMESPACE
class QGridLayout;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -39,8 +39,10 @@
#include <QFrame>
QT_BEGIN_NAMESPACE
class QToolBar;
class QXmlStreamWriter;
QT_END_NAMESPACE
namespace ADS {

View File

@@ -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