summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-03-04 14:22:27 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-03-04 14:22:27 (GMT)
commitc3d5e6703777f294e5af12a0871defd339f1c1ff (patch)
tree7bf4bd3416cda1f6f677590efce6f9aec2138721 /tools
parent4b3953678983b3da925066f464b55340fab3503c (diff)
parenta0cb1ae902dce0c00dc2de8b92229d66945054c8 (diff)
downloadQt-c3d5e6703777f294e5af12a0871defd339f1c1ff.zip
Qt-c3d5e6703777f294e5af12a0871defd339f1c1ff.tar.gz
Qt-c3d5e6703777f294e5af12a0871defd339f1c1ff.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp13
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet_p.h3
-rw-r--r--tools/qev/qev.pro2
4 files changed, 16 insertions, 4 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 };
diff --git a/tools/qev/qev.pro b/tools/qev/qev.pro
index 28383c6..962b9fa 100644
--- a/tools/qev/qev.pro
+++ b/tools/qev/qev.pro
@@ -9,5 +9,3 @@ INCLUDEPATH += .
# Input
SOURCES += qev.cpp
CONFIG += qt warn_on create_prl link_prl
-OBJECTS_DIR=.obj/debug-shared
-MOC_DIR=.moc/debug-shared