summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-01-24 16:37:25 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2017-01-25 10:33:41 +0000
commitfcab7186668de71a7c0f9055fb75c98b906f5dc7 (patch)
treed9cf33c4dbf29cb8daed88cf5af8c41d28dca165 /src
parent27792ea09897e41d52a9842af89b8d48cbac08ac (diff)
Fix build with -no-feature-dockwidget
Change-Id: Id484b54fd7191715e61ba6708247357b83159f28 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 14d7f3d835..9e1af16625 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -2172,7 +2172,9 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
savedState.clear();
currentGapPos.clear();
pluggingWidget = 0;
- currentHoveredFloat = Q_NULLPTR;
+#if QT_CONFIG(dockwidget)
+ currentHoveredFloat = nullptr;
+#endif
//applying the state will make sure that the currentGap is updated correctly
//and all the geometries (especially the one from the central widget) is correct
layoutState.apply(false);
@@ -2408,8 +2410,16 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
void QMainWindowLayout::updateGapIndicator()
{
#ifndef QT_NO_RUBBERBAND
- if ((!widgetAnimator.animating() && !currentGapPos.isEmpty()) || currentHoveredFloat) {
- QWidget *expectedParent = currentHoveredFloat ? currentHoveredFloat.data() : parentWidget();
+ if ((!widgetAnimator.animating() && !currentGapPos.isEmpty())
+#if QT_CONFIG(dockwidget)
+ || currentHoveredFloat
+#endif
+ ) {
+ QWidget *expectedParent =
+#if QT_CONFIG(dockwidget)
+ currentHoveredFloat ? currentHoveredFloat.data() :
+#endif
+ parentWidget();
if (!gapIndicator) {
gapIndicator = new QRubberBand(QRubberBand::Rectangle, expectedParent);
// For accessibility to identify this special widget.
@@ -2417,7 +2427,11 @@ void QMainWindowLayout::updateGapIndicator()
} else if (gapIndicator->parent() != expectedParent) {
gapIndicator->setParent(expectedParent);
}
- gapIndicator->setGeometry(currentHoveredFloat ? currentHoveredFloat->rect() : currentGapRect);
+ gapIndicator->setGeometry(
+#if QT_CONFIG(dockwidget)
+ currentHoveredFloat ? currentHoveredFloat->rect() :
+#endif
+ currentGapRect);
gapIndicator->show();
gapIndicator->raise();
} else if (gapIndicator) {
@@ -2540,12 +2554,14 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
updateGapIndicator();
}
+#if QT_CONFIG(dockwidget)
QDockWidgetGroupWindow *QMainWindowLayout::createTabbedDockWindow()
{
QDockWidgetGroupWindow* f = new QDockWidgetGroupWindow(parentWidget(), Qt::Tool);
new QDockWidgetGroupLayout(f);
return f;
}
+#endif
void QMainWindowLayout::applyState(QMainWindowLayoutState &newState, bool animate)
{