summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-11-23 09:04:00 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 20:38:05 (GMT)
commit9773ed039a3e5f46fcdc1732828b40fe3668b7ad (patch)
tree5433216dce87de6026154f6e06076953fb140674 /tools/designer
parentb898c4ed69caec14d51a2be4fc44a4ed54a06c48 (diff)
downloadQt-9773ed039a3e5f46fcdc1732828b40fe3668b7ad.zip
Qt-9773ed039a3e5f46fcdc1732828b40fe3668b7ad.tar.gz
Qt-9773ed039a3e5f46fcdc1732828b40fe3668b7ad.tar.bz2
Detect QMainWindow-separator as passive interactor in Qt Designer.
Ensure that dock widgets in Qt Creator can be resized. Task-number: QTCREATORBUG-8284 Change-Id: If6aa55b2dde8fce53e1527db678f518b3912907b Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> (cherry picked from qttools/5e4bc7e3556cb5afcd82731277bdef60ae2cbe33)
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index d6a4afa..94a8e3f 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -825,6 +825,7 @@ static bool isTabBarInteractor(const QTabBar *tabBar)
bool WidgetFactory::isPassiveInteractor(QWidget *widget)
{
static const QString qtPassive = QLatin1String("__qt__passive_");
+ static const QString qtMainWindowSplitter = QLatin1String("qt_qmainwindow_extended_splitter");
if (m_lastPassiveInteractor != 0 && (QWidget*)(*m_lastPassiveInteractor) == widget)
return m_lastWasAPassiveInteractor;
@@ -867,8 +868,11 @@ bool WidgetFactory::isPassiveInteractor(QWidget *widget)
return (m_lastWasAPassiveInteractor = true);
else if (qstrcmp(widget->metaObject()->className(), "QWorkspaceTitleBar") == 0)
return (m_lastWasAPassiveInteractor = true);
- else if (widget->objectName().startsWith(qtPassive))
- return (m_lastWasAPassiveInteractor = true);
+ const QString name = widget->objectName();
+ if (name.startsWith(qtPassive) || name == qtMainWindowSplitter) {
+ m_lastWasAPassiveInteractor = true;
+ return m_lastWasAPassiveInteractor;
+ }
return m_lastWasAPassiveInteractor;
}