diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-18 09:00:10 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-05-18 09:00:10 (GMT) |
commit | 7133b932ac2af6e5a09323f09ee8024d0042bce3 (patch) | |
tree | cfb026ab2c1dc1941323ace396ddf38a3cf0e917 /tools/designer/src | |
parent | 16af450c02b402fb8aea59ad058c96a13d8cbe8d (diff) | |
download | Qt-7133b932ac2af6e5a09323f09ee8024d0042bce3.zip Qt-7133b932ac2af6e5a09323f09ee8024d0042bce3.tar.gz Qt-7133b932ac2af6e5a09323f09ee8024d0042bce3.tar.bz2 |
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/src')
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_propertycommand.cpp | 4 |
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 ff3b50b..94e8044 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()); |