diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-21 22:03:40 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-21 22:03:40 (GMT) |
commit | 3030bb7cfecf5db7cc8de14791369a015f5abb32 (patch) | |
tree | 4df0c68ba2b522cc422c933d7695d59b913741b4 /tools/designer/src/lib/shared/qdesigner_propertysheet.cpp | |
parent | 31e21db28f97a0c6b7bbe80edf531dbbce2b02ed (diff) | |
parent | 8a9dd3f463a312963dc420ee83ca75fd52e24463 (diff) | |
download | Qt-3030bb7cfecf5db7cc8de14791369a015f5abb32.zip Qt-3030bb7cfecf5db7cc8de14791369a015f5abb32.tar.gz Qt-3030bb7cfecf5db7cc8de14791369a015f5abb32.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging:
Designer: Remember default of main container's object name.
Designer: Do not translate page object names of QMdiArea.
Diffstat (limited to 'tools/designer/src/lib/shared/qdesigner_propertysheet.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_propertysheet.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp index babe20e..27527da 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp @@ -1195,8 +1195,17 @@ bool QDesignerPropertySheet::reset(int index) { if (d->invalidIndex(Q_FUNC_INFO, index)) return false; - if (d->isStringProperty(index)) - setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetStringValue())); + if (d->isStringProperty(index)) { + qdesigner_internal::PropertySheetStringValue value; + // Main container: Reset to stored class name as not to change the file names generated by uic. + if (propertyName(index) == QLatin1String("objectName")) { + const QVariant classNameDefaultV = d->m_object->property("_q_classname"); + if (classNameDefaultV.isValid()) + value.setValue(classNameDefaultV.toString()); + } + setProperty(index, QVariant::fromValue(value)); + return true; + } if (d->isKeySequenceProperty(index)) setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue())); if (d->isResourceProperty(index)) { |