summaryrefslogtreecommitdiff
path: root/tools/designer/src/lib
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-18 14:25:08 +0200
committeraxis <qt-info@nokia.com>2009-05-18 14:25:08 +0200
commit6e81bfbaf69864a06240835e0b30cdc47a2668b7 (patch)
treeaff37bf74549836696d420477e57f51969e97091 /tools/designer/src/lib
parent3e5abb158c1924e555dc4142c4be89adc517b8c1 (diff)
parent7008bfe80e0466ed2978b39e7e698bbd52fb690f (diff)
downloadqt4-tools-6e81bfbaf69864a06240835e0b30cdc47a2668b7.tar.gz
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: configure.exe src/corelib/kernel/qcoreapplication.cpp Configure.exe not rebuilt because the changes are irrelevant for the S60 port. We'll rebuild it before merging back.
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp10
-rw-r--r--tools/designer/src/lib/shared/formwindowbase_p.h3
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand.cpp4
3 files changed, 16 insertions, 1 deletions
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 3e7e17bb58..b569b511ff 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -55,7 +55,7 @@ TRANSLATOR qdesigner_internal::FormWindowBase
#include "deviceprofile_p.h"
#include "qdesigner_utils_p.h"
-#include <abstractformbuilder.h>
+#include "qsimpleresource_p.h"
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerContainerExtension>
@@ -482,6 +482,14 @@ void FormWindowBase::setupDefaultAction(QDesignerFormWindowInterface *fw)
QObject::connect(fw, SIGNAL(activated(QWidget*)), fw, SLOT(triggerDefaultAction(QWidget*)));
}
+QString FormWindowBase::fileContents() const
+{
+ const bool oldValue = QSimpleResource::setWarningsEnabled(false);
+ const QString rc = contents();
+ QSimpleResource::setWarningsEnabled(oldValue);
+ return rc;
+}
+
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/tools/designer/src/lib/shared/formwindowbase_p.h b/tools/designer/src/lib/shared/formwindowbase_p.h
index 68e977efe5..0891f6ed15 100644
--- a/tools/designer/src/lib/shared/formwindowbase_p.h
+++ b/tools/designer/src/lib/shared/formwindowbase_p.h
@@ -90,6 +90,9 @@ public:
QVariantMap formData();
void setFormData(const QVariantMap &vm);
+ // Return contents without warnings. Should be 'contents(bool quiet)'
+ QString fileContents() const;
+
// Return the widget containing the form. This is used to
// apply embedded design settings to that are inherited (for example font).
// These are meant to be applied to the form only and not to the other editors
diff --git a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
index ff3b50bce6..94e804486a 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
@@ -316,6 +316,10 @@ Qt::Alignment variantToAlignment(const QVariant & q)
// find changed subproperties of a variant
unsigned compareSubProperties(const QVariant & q1, const QVariant & q2, qdesigner_internal::SpecialProperty specialProperty)
{
+ // Do not clobber new value in the comparison function in
+ // case someone sets a QString on a PropertySheetStringValue.
+ if (q1.type() != q2.type())
+ return SubPropertyAll;
switch (q1.type()) {
case QVariant::Rect:
return compareSubProperties(q1.toRect(), q2.toRect());