diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-05 03:24:03 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-05 03:24:03 (GMT) |
commit | a2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25 (patch) | |
tree | eadedfd873d7684bdec5f4d793ddd96a96beb897 /tools/designer/src/lib/shared | |
parent | 1cdaca2823a7c09f377ab205e6424e35febcbf2c (diff) | |
parent | ca89d8dc944e7af886c3b31c9d23c8957e5667ab (diff) | |
download | Qt-a2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25.zip Qt-a2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25.tar.gz Qt-a2e7ab8926c5e8a4c89bb017bbcacfcfbf43ef25.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (72 commits)
Doc: Enabled the context menu in the spreadsheet demo.
Updated URLs.
Doc: Applied suggestion for an improvement to the foreach documentation.
Doc: Added a note about the lack of standard file copy/paste on X11.
Doc: Fixed the row number for a widget in two parts of the tutorial.
Doc: Fixed typos.
Reduce compiling time of QScriptValue autotest suite on Windows.
Optimize QScriptValue autotest generator.
Set database write behavior to synchronous=OFF and increase page cache.
doc: Fixed some qdoc errors.
Setting ImhHiddenText for NoEcho line edits is not 100% correct, but still way better than fully visible text.
Allow building documentation without all of Qt
Added a documentation for the new enum value in gesture api.
Remove the OBJECTS_DIR variable assignment from some projets in Qt.
Fix compile
qmake/MinGw: Link statically for Qt Creator to be able to detect it.
Enable two fast path for blend_tiled_rgb565
Avoid QString reallocation for smallcaps fonts in Itemizer::generate()
Make QLabel::text a reloadable property
remove non wifi interfaces from being handled.
...
Diffstat (limited to 'tools/designer/src/lib/shared')
-rw-r--r-- | tools/designer/src/lib/shared/formwindowbase.cpp | 13 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_propertysheet.cpp | 2 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_propertysheet_p.h | 3 |
3 files changed, 16 insertions, 2 deletions
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp index 2c5efbf..5292f5f 100644 --- a/tools/designer/src/lib/shared/formwindowbase.cpp +++ b/tools/designer/src/lib/shared/formwindowbase.cpp @@ -72,6 +72,7 @@ #include <QtGui/QStatusBar> #include <QtGui/QMenu> #include <QtGui/QAction> +#include <QtGui/QLabel> QT_BEGIN_NAMESPACE @@ -181,7 +182,17 @@ void FormWindowBase::reloadProperties() QMapIterator<int, bool> itIndex(itSheet.value()); while (itIndex.hasNext()) { const int index = itIndex.next().key(); - sheet->setProperty(index, sheet->property(index)); + const QVariant newValue = sheet->property(index); + if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { + const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(newValue); + // optimize a bit, reset only if the text value might contain a reference to qt resources + // (however reloading of icons other than taken from resources might not work here) + if (newString.value().contains(QLatin1String(":/"))) { + const QVariant resetValue = qVariantFromValue(PropertySheetStringValue()); + sheet->setProperty(index, resetValue); + } + } + sheet->setProperty(index, newValue); } if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) { const int count = tabWidget->count(); diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp index 13bb1d7..77ab2a6 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp @@ -271,6 +271,7 @@ bool QDesignerPropertySheetPrivate::isReloadableProperty(int index) const { return isResourceProperty(index) || propertyType(index) == QDesignerPropertySheet::PropertyStyleSheet + || propertyType(index) == QDesignerPropertySheet::PropertyText || q->property(index).type() == QVariant::Url; } @@ -549,6 +550,7 @@ QDesignerPropertySheet::PropertyType QDesignerPropertySheet::propertyTypeFromNam propertyTypeHash.insert(QLatin1String("windowModality"), PropertyWindowModality); propertyTypeHash.insert(QLatin1String("windowModified"), PropertyWindowModified); propertyTypeHash.insert(QLatin1String("styleSheet"), PropertyStyleSheet); + propertyTypeHash.insert(QLatin1String("text"), PropertyText); } return propertyTypeHash.value(name, PropertyNone); } diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h index 9db7367..0105eac 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h @@ -176,7 +176,8 @@ public: PropertyWindowIconText, PropertyWindowModality, PropertyWindowModified, - PropertyStyleSheet + PropertyStyleSheet, + PropertyText }; enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget, ObjectQ3GroupBox }; |