summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtoolbarlayout.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-08 12:55:01 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-08 15:04:15 (GMT)
commitf0243e70e05a3368582fd0478d840096d6b60c3f (patch)
tree05308c419163be88d8080c86e9f981e260085494 /src/gui/widgets/qtoolbarlayout.cpp
parent6fdff777765c93996b7de9fc36c0de7ff4928102 (diff)
downloadQt-f0243e70e05a3368582fd0478d840096d6b60c3f.zip
Qt-f0243e70e05a3368582fd0478d840096d6b60c3f.tar.gz
Qt-f0243e70e05a3368582fd0478d840096d6b60c3f.tar.bz2
QToolBarLayout and QDockWidgetLayout, which are private classes, are
no more exported designer was using QToolBarLayout members. We fixed that by using styles. Reviewed-by: Friedemann Kleint Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets/qtoolbarlayout.cpp')
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp
index 7771f46..0bfa493 100644
--- a/src/gui/widgets/qtoolbarlayout.cpp
+++ b/src/gui/widgets/qtoolbarlayout.cpp
@@ -334,7 +334,7 @@ void QToolBarLayout::updateGeomArray() const
if (QMainWindow *mw = qobject_cast<QMainWindow *>(parentWidget()->parentWidget())) {
if (mw->unifiedTitleAndToolBarOnMac()
&& mw->toolBarArea(static_cast<QToolBar *>(parentWidget())) == Qt::TopToolBarArea) {
- if (that->expandFlag) {
+ if (expandFlag) {
tb->setMaximumSize(0xFFFFFF, 0xFFFFFF);
} else {
tb->setMaximumSize(hint);
@@ -360,23 +360,11 @@ void QToolBarLayout::setGeometry(const QRect &rect)
QStyle *style = tb->style();
QStyleOptionToolBar opt;
tb->initStyleOption(&opt);
- const int handleExtent = movable()
- ? style->pixelMetric(QStyle::PM_ToolBarHandleExtent, &opt, tb) : 0;
const int margin = this->margin();
const int extensionExtent = style->pixelMetric(QStyle::PM_ToolBarExtensionExtent, &opt, tb);
Qt::Orientation o = tb->orientation();
QLayout::setGeometry(rect);
- if (movable()) {
- if (o == Qt::Horizontal) {
- handRect = QRect(margin, margin, handleExtent, rect.height() - 2*margin);
- handRect = QStyle::visualRect(parentWidget()->layoutDirection(), rect, handRect);
- } else {
- handRect = QRect(margin, margin, rect.width() - 2*margin, handleExtent);
- }
- } else {
- handRect = QRect();
- }
bool ranOutOfSpace = false;
if (!animating)
@@ -742,11 +730,6 @@ QToolBarItem *QToolBarLayout::createItem(QAction *action)
return result;
}
-QRect QToolBarLayout::handleRect() const
-{
- return handRect;
-}
-
QT_END_NAMESPACE
#endif // QT_NO_TOOLBAR