summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-03-22 13:03:11 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-03-22 13:03:11 (GMT)
commitacc903853d5ac54d646d324b7386c998bc07d464 (patch)
treef2ed3ccc611cebb70a4af7920a0fd0eec4ba5d73 /tools/designer/src/lib
parent56b4ada44ea5bfa1c4ee669aa00e9ae960965fe3 (diff)
parentbf95c0ed87bf8a2ccd0a3d57ed81b8ae8fb8c4f2 (diff)
downloadQt-acc903853d5ac54d646d324b7386c998bc07d464.zip
Qt-acc903853d5ac54d646d324b7386c998bc07d464.tar.gz
Qt-acc903853d5ac54d646d324b7386c998bc07d464.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/examples/qml-examples.qdoc
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp6
1 files changed, 4 insertions, 2 deletions
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);