summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmainwindowlayout_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-05-24 16:27:08 +0200
committerLiang Qi <liang.qi@qt.io>2018-05-24 16:29:14 +0200
commitf82e5085169876e0ec7c1b744d021b068c281cfe (patch)
treea870e1f68ce62818a0793c4c78a67971e841e676 /src/widgets/widgets/qmainwindowlayout_p.h
parentf74d4fb1dacc682e2e6f4a44e4240f642a2c3b70 (diff)
parentee47999333dde1d38b73d04e142e05f06f8c56ed (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
Diffstat (limited to 'src/widgets/widgets/qmainwindowlayout_p.h')
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 341e9690cf..72cbec2350 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -100,7 +100,7 @@ public:
QCursor adjustedCursor;
bool hasOldCursor = false;
bool cursorAdjusted = false;
-#endif
+#endif // QT_CONFIG(cursor)
QList<int> movingSeparator;
QPoint movingSeparatorOrigin, movingSeparatorPos;
@@ -110,7 +110,8 @@ public:
bool separatorMove(const QPoint &pos);
bool endSeparatorMove(const QPoint &pos);
bool windowEvent(QEvent *e);
-#endif
+
+#endif // QT_CONFIG(dockwidget)
};
@@ -203,7 +204,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
break;
}
-#ifndef QT_NO_CURSOR
+#if QT_CONFIG(cursor)
case QEvent::HoverMove: {
adjustCursor(static_cast<QHoverEvent *>(event)->pos());
break;
@@ -219,7 +220,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
case QEvent::ShortcutOverride: // when a menu pops up
adjustCursor(QPoint(0, 0));
break;
-#endif // QT_NO_CURSOR
+#endif // QT_CONFIG(cursor)
case QEvent::MouseButtonPress: {
QMouseEvent *e = static_cast<QMouseEvent *>(event);
@@ -234,7 +235,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
case QEvent::MouseMove: {
QMouseEvent *e = static_cast<QMouseEvent *>(event);
-#ifndef QT_NO_CURSOR
+#if QT_CONFIG(cursor)
adjustCursor(e->pos());
#endif
if (e->buttons() & Qt::LeftButton) {
@@ -258,7 +259,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
break;
}
-#if !defined(QT_NO_CURSOR)
+#if QT_CONFIG(cursor)
case QEvent::CursorChange:
// CursorChange events are triggered as mouse moves to new widgets even
// if the cursor doesn't actually change, so do not change oldCursor if
@@ -271,7 +272,7 @@ bool QMainWindowLayoutSeparatorHelper<Layout>::windowEvent(QEvent *event)
w->setCursor(adjustedCursor);
}
break;
-#endif
+#endif // QT_CONFIG(cursor)
case QEvent::Timer:
if (static_cast<QTimerEvent *>(event)->timerId() == separatorMoveTimer.timerId()) {
// let's move the separators
@@ -374,7 +375,7 @@ public:
private:
QLayout *lay() const { return const_cast<QDockWidgetGroupWindowItem *>(this)->widget()->layout(); }
};
-#endif
+#endif // QT_CONFIG(dockwidget)
/* This data structure represents the state of all the tool-bars and dock-widgets. It's value based
so it can be easilly copied into a temporary variable. All operations are performed without moving