summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qdockarealayout.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-10-27 13:30:56 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2009-10-29 16:00:13 (GMT)
commiteec8980202f05737b0ef0b8db410675e0df5bafe (patch)
treeca04b20f54af611eda9b251f723bdbb25c20e9cf /src/gui/widgets/qdockarealayout.cpp
parent3117574558b2aeb6e3e3e90ff8e44f4a2e74cf6d (diff)
downloadQt-eec8980202f05737b0ef0b8db410675e0df5bafe.zip
Qt-eec8980202f05737b0ef0b8db410675e0df5bafe.tar.gz
Qt-eec8980202f05737b0ef0b8db410675e0df5bafe.tar.bz2
FIX TABBAR
Reviewed-by: tom
Diffstat (limited to 'src/gui/widgets/qdockarealayout.cpp')
-rw-r--r--src/gui/widgets/qdockarealayout.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index 5a0a9d4..ec35c4f 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -1556,9 +1556,10 @@ void QDockAreaLayoutInfo::apply(bool animate)
}
}
}
-
+#ifndef QT_NO_TABBAR
if (sep == 1)
updateSeparatorWidgets();
+#endif //QT_NO_TABBAR
}
static void paintSep(QPainter *p, QWidget *w, const QRect &r, Qt::Orientation o, bool mouse_over)
@@ -2008,13 +2009,14 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
updateTabBar();
setCurrentTabId(tabId(item_list.at(index)));
}
-#endif
if (!testing && sep == 1)
updateSeparatorWidgets();
+#endif
return true;
}
+#ifndef QT_NO_TABBAR
void QDockAreaLayoutInfo::updateSeparatorWidgets() const
{
if (tabbed) {
@@ -2065,6 +2067,7 @@ void QDockAreaLayoutInfo::updateSeparatorWidgets() const
separatorWidgets.resize(j);
Q_ASSERT(separatorWidgets.size() == j);
}
+#endif //QT_NO_TABBAR
#ifndef QT_NO_TABBAR
void QDockAreaLayoutInfo::updateTabBar() const
@@ -3073,9 +3076,10 @@ void QDockAreaLayout::apply(bool animate)
widgetAnimator.animate(centralWidgetItem->widget(), centralWidgetRect,
animate);
}
-
+#ifndef QT_NO_TABBAR
if (sep == 1)
updateSeparatorWidgets();
+#endif //QT_NO_TABBAR
}
void QDockAreaLayout::paintSeparators(QPainter *p, QWidget *widget,
@@ -3153,6 +3157,7 @@ int QDockAreaLayout::separatorMove(const QList<int> &separator, const QPoint &or
return delta;
}
+#ifndef QT_NO_TABBAR
// Sets the correct positions for the seperator widgets
// Allocates new sepearator widgets with getSeparatorWidget
void QDockAreaLayout::updateSeparatorWidgets() const
@@ -3186,6 +3191,7 @@ void QDockAreaLayout::updateSeparatorWidgets() const
separatorWidgets.resize(j);
}
+#endif //QT_NO_TABBAR
QLayoutItem *QDockAreaLayout::itemAt(int *x, int index) const
{
@@ -3238,7 +3244,6 @@ QSet<QTabBar*> QDockAreaLayout::usedTabBars() const
}
return result;
}
-#endif
// Returns the set of all used separator widgets
QSet<QWidget*> QDockAreaLayout::usedSeparatorWidgets() const
@@ -3253,6 +3258,7 @@ QSet<QWidget*> QDockAreaLayout::usedSeparatorWidgets() const
}
return result;
}
+#endif
QRect QDockAreaLayout::gapRect(const QList<int> &path) const
{