summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-10-27 11:49:06 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-10-27 11:49:06 (GMT)
commit1b0dad4d1c9b3693b6fb9c93d8dc06a4eaf42d83 (patch)
tree700ce0ba46156e13bae0b430face1e839d302303 /tools/designer
parente2ef97128c006ac2a5c99c67bb54eebaa3b45720 (diff)
downloadQt-1b0dad4d1c9b3693b6fb9c93d8dc06a4eaf42d83.zip
Qt-1b0dad4d1c9b3693b6fb9c93d8dc06a4eaf42d83.tar.gz
Qt-1b0dad4d1c9b3693b6fb9c93d8dc06a4eaf42d83.tar.bz2
Designer: Fix potential crash when moving pages of a QTabWidget
... which has movable=true, conflicting with its internal drag and drop. Introduce 'movable' as fake property. Reviewed-by: Jarek Kobus <jkobus@trolltech.com> Task-number: QT-1788
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
index 2789bd3..f4f3d24 100644
--- a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -399,6 +399,7 @@ static const char *currentTabNameKey = "currentTabName";
static const char *currentTabIconKey = "currentTabIcon";
static const char *currentTabToolTipKey = "currentTabToolTip";
static const char *currentTabWhatsThisKey = "currentTabWhatsThis";
+static const char *tabMovableKey = "movable";
QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *parent) :
QDesignerPropertySheet(object, parent),
@@ -411,6 +412,8 @@ QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *pa
formWindowBase()->addReloadableProperty(this, indexOf(QLatin1String(currentTabIconKey)));
createFakeProperty(QLatin1String(currentTabToolTipKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
createFakeProperty(QLatin1String(currentTabWhatsThisKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
+ // Prevent the tab widget's drag and drop handling from interfering with Designer's
+ createFakeProperty(QLatin1String(tabMovableKey), QVariant(false));
}
QTabWidgetPropertySheet::TabWidgetProperty QTabWidgetPropertySheet::tabWidgetPropertyFromName(const QString &name)