summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-15 18:41:17 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-15 18:41:17 (GMT)
commit411938c541a6c3993b47f1f86d844f12c1651351 (patch)
tree3da5d56db8f1b5aa6694277fc369472d2cc82e4e /tools
parentef93b78f38d7f35f42bc896ad23263668ac9f2e7 (diff)
parentf4244785cb8875b177274db485a346605f05ed7c (diff)
downloadQt-411938c541a6c3993b47f1f86d844f12c1651351.zip
Qt-411938c541a6c3993b47f1f86d844f12c1651351.tar.gz
Qt-411938c541a6c3993b47f1f86d844f12c1651351.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Designer: Fix a bug affecting tab reordering of promoted tab widgets. Designer: Fix a bug clearing the Z-Order when adding a new widget. Adjust right bearing when breaking with line separators
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp2
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index 430b070..6d718bb 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -1190,7 +1190,7 @@ QWidget *QDesignerResource::createWidget(const QString &widgetName, QWidget *par
parentWidget->setProperty("_q_widgetOrder", qVariantFromValue(list));
QList<QWidget *> zOrder = qVariantValue<QWidgetList>(parentWidget->property("_q_zOrder"));
zOrder.append(w);
- parentWidget->setProperty("_q_zOrder", qVariantFromValue(list));
+ parentWidget->setProperty("_q_zOrder", qVariantFromValue(zOrder));
}
} else {
core()->metaDataBase()->add(w);
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index 887bb04..36f795e 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -412,8 +412,10 @@ QWidget *WidgetFactory::createWidget(const QString &widgetName, QWidget *parentW
// Currently happens in the case of Q3-Support widgets
baseClass =fallBackBaseClass;
}
- w = createWidget(baseClass, parentWidget);
- promoteWidget(core(),w,widgetName);
+ if (QWidget *promotedWidget = createWidget(baseClass, parentWidget)) {
+ promoteWidget(core(), promotedWidget, widgetName);
+ return promotedWidget; // Do not initialize twice.
+ }
} while (false);
Q_ASSERT(w != 0);