70 #include <QtGui/QToolBox> |
70 #include <QtGui/QToolBox> |
71 #include <QtGui/QToolBar> |
71 #include <QtGui/QToolBar> |
72 #include <QtGui/QStatusBar> |
72 #include <QtGui/QStatusBar> |
73 #include <QtGui/QMenu> |
73 #include <QtGui/QMenu> |
74 #include <QtGui/QAction> |
74 #include <QtGui/QAction> |
|
75 #include <QtGui/QLabel> |
75 |
76 |
76 QT_BEGIN_NAMESPACE |
77 QT_BEGIN_NAMESPACE |
77 |
78 |
78 namespace qdesigner_internal { |
79 namespace qdesigner_internal { |
79 |
80 |
179 while (itSheet.hasNext()) { |
180 while (itSheet.hasNext()) { |
180 QDesignerPropertySheet *sheet = itSheet.next().key(); |
181 QDesignerPropertySheet *sheet = itSheet.next().key(); |
181 QMapIterator<int, bool> itIndex(itSheet.value()); |
182 QMapIterator<int, bool> itIndex(itSheet.value()); |
182 while (itIndex.hasNext()) { |
183 while (itIndex.hasNext()) { |
183 const int index = itIndex.next().key(); |
184 const int index = itIndex.next().key(); |
184 sheet->setProperty(index, sheet->property(index)); |
185 const QVariant newValue = sheet->property(index); |
|
186 if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { |
|
187 const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(newValue); |
|
188 // optimize a bit, reset only if the text value might contain a reference to qt resources |
|
189 // (however reloading of icons other than taken from resources might not work here) |
|
190 if (newString.value().contains(QLatin1String(":/"))) { |
|
191 const QVariant resetValue = qVariantFromValue(PropertySheetStringValue()); |
|
192 sheet->setProperty(index, resetValue); |
|
193 } |
|
194 } |
|
195 sheet->setProperty(index, newValue); |
185 } |
196 } |
186 if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) { |
197 if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) { |
187 const int count = tabWidget->count(); |
198 const int count = tabWidget->count(); |
188 const int current = tabWidget->currentIndex(); |
199 const int current = tabWidget->currentIndex(); |
189 const QString currentTabIcon = QLatin1String("currentTabIcon"); |
200 const QString currentTabIcon = QLatin1String("currentTabIcon"); |