diff options
author | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2018-05-11 16:53:58 +0200 |
---|---|---|
committer | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2018-05-15 06:52:21 +0000 |
commit | 878a82f188f29db57cac0d02ae9ca32e3d660916 (patch) | |
tree | 06d6b4e4201abfbb99fc188f134a2ca09397b537 | |
parent | 2be468640470b29655ee22d343553b3868db6056 (diff) |
qtlite: Fix build with -no-feature-cursor or -no-feature-dockwidget
Change-Id: Iae8c20172e43fcde816df3b87ad67f4ea2cda804
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qmainwindowlayout_p.h | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index 2014bdabf3..aca38884a7 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -1312,8 +1312,12 @@ bool QMainWindow::restoreState(const QByteArray &state, int version) bool QMainWindow::event(QEvent *event) { Q_D(QMainWindow); + +#if QT_CONFIG(dockwidget) if (d->layout && d->layout->windowEvent(event)) return true; +#endif + switch (event->type()) { #if QT_CONFIG(toolbar) diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h index aa446cf05b..341e9690cf 100644 --- a/src/widgets/widgets/qmainwindowlayout_p.h +++ b/src/widgets/widgets/qmainwindowlayout_p.h @@ -91,13 +91,16 @@ public: QList<int> hoverSeparator; QPoint hoverPos; -#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR) +#if QT_CONFIG(dockwidget) + +#if QT_CONFIG(cursor) QCursor separatorCursor(const QList<int> &path); void adjustCursor(const QPoint &pos); QCursor oldCursor; QCursor adjustedCursor; bool hasOldCursor = false; bool cursorAdjusted = false; +#endif QList<int> movingSeparator; QPoint movingSeparatorOrigin, movingSeparatorPos; @@ -106,13 +109,14 @@ public: bool startSeparatorMove(const QPoint &pos); bool separatorMove(const QPoint &pos); bool endSeparatorMove(const QPoint &pos); - + bool windowEvent(QEvent *e); #endif - bool windowEvent(QEvent *e); }; -#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR) +#if QT_CONFIG(dockwidget) + +#if QT_CONFIG(cursor) template <typename Layout> QCursor QMainWindowLayoutSeparatorHelper<Layout>::separatorCursor(const QList<int> &path) { @@ -185,6 +189,7 @@ void QMainWindowLayoutSeparatorHelper<Layout>::adjustCursor(const QPoint &pos) } } } +#endif // QT_CONFIG(cursor) template <typename Layout> bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event) @@ -323,9 +328,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::endSeparatorMove(const QPoint &) layout()->savedState.clear(); return true; } -#endif -#if QT_CONFIG(dockwidget) class QDockWidgetGroupWindow : public QWidget { Q_OBJECT |