diff options
author | Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> | 2023-08-17 10:22:02 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> | 2023-08-17 16:18:57 +0900 |
commit | 7301cd5cfacd1dd335bd7b3f06b29ce3db0ee8a6 (patch) | |
tree | d943bf344e5100e0152a014d603286add6024ac7 /src/widgets/widgets/qtoolbar.cpp | |
parent | 3965d52ad5a6376d593026a87831026a8a5f3469 (diff) |
Fix build with -no-feature-dragandrop
Change-Id: I9ac2a9edb747608ef93008ac865886b1ee0ea82a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Redondo <qt@david-redondo.de>
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index c2def3c6d4..614de7b13b 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -111,10 +111,12 @@ void QToolBarPrivate::updateWindowFlags(bool floating, bool unplug) flags |= Qt::FramelessWindowHint; +#if QT_CONFIG(draganddrop) // If we are performing a platform drag the flag is not needed and we want to avoid recreating // the platform window when it would be removed later if (unplug && !QMainWindowLayout::needsPlatformDrag()) flags |= Qt::X11BypassWindowManagerHint; +#endif q->setWindowFlags(flags); } @@ -178,7 +180,9 @@ void QToolBarPrivate::startDrag(bool moving) QMainWindowLayout *layout = qt_mainwindow_layout(win); Q_ASSERT(layout != nullptr); +#if QT_CONFIG(draganddrop) const bool wasFloating = q->isFloating(); +#endif if (!moving) { state->widgetItem = layout->unplug(q); @@ -264,10 +268,12 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event) bool QToolBarPrivate::mouseReleaseEvent(QMouseEvent*) { +#if QT_CONFIG(draganddrop) // if we are peforming a platform drag ignore the release here and end the drag when the actual // drag ends. if (QMainWindowLayout::needsPlatformDrag()) return false; +#endif if (state != nullptr) { endDrag(); |