summaryrefslogtreecommitdiff
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-18 11:00:10 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-18 11:00:10 +0200
commit7133b932ac2af6e5a09323f09ee8024d0042bce3 (patch)
treecfb026ab2c1dc1941323ace396ddf38a3cf0e917 /tools/designer
parent16af450c02b402fb8aea59ad058c96a13d8cbe8d (diff)
downloadqt4-tools-7133b932ac2af6e5a09323f09ee8024d0042bce3.tar.gz
Made it possible to set string properties using QDesignerFormWindowCursor::setProperty.
Ensure the text does not get clobbered by the subproperty handling. Reviewed-by: Kai Köhne <kai.koehne@nokia.com> Task-number: 253278
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand.cpp4
1 files changed, 4 insertions, 0 deletions
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());