summaryrefslogtreecommitdiff
path: root/tools/designer/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-03-16 17:25:47 +0100
committerThiago Macieira <thiago.macieira@nokia.com>2011-03-16 17:25:47 +0100
commit580e3d9968e12fb38348af503ef9ede50691c24c (patch)
tree2ae55db9989bd8147de9d25071cecbd279b847d7 /tools/designer/src
parente318b0276c3d4a0db8660b4fa6d68f1784aee522 (diff)
parentb8ded0df9c85558b93ee5ec5abd5774c87c4deed (diff)
downloadqt4-tools-580e3d9968e12fb38348af503ef9ede50691c24c.tar.gz
Merge remote-tracking branch 'origin/4.7' into HEAD
Conflicts: configure mkspecs/symbian-gcce/qmake.conf qmake/generators/metamakefile.cpp qmake/generators/win32/mingw_make.cpp src/corelib/global/global.pri src/corelib/global/qglobal.h src/opengl/qgl.cpp src/opengl/qwindowsurface_gl.cpp src/plugins/platforms/wayland/qwaylandbuffer.h tests/auto/qnetworkreply/tst_qnetworkreply.cpp tools/designer/src/components/formeditor/qdesigner_resource.cpp
Diffstat (limited to 'tools/designer/src')
-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 714a556a98..073f125a78 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -1194,7 +1194,7 @@ QWidget *QDesignerResource::createWidget(const QString &widgetName, QWidget *par
parentWidget->setProperty("_q_widgetOrder", QVariant::fromValue(list));
QList<QWidget *> zOrder = qvariant_cast<QWidgetList>(parentWidget->property("_q_zOrder"));
zOrder.append(w);
- parentWidget->setProperty("_q_zOrder", QVariant::fromValue(list));
+ parentWidget->setProperty("_q_zOrder", QVariant::fromValue(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 945d7cccc5..bcd23eed33 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);