summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-03-12 21:16:40 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-13 21:11:55 +0100
commite9fdfd746bc374b7b2cbccb875d36727b3946990 (patch)
treed4e6f689485258b418791ba2a6c388f390078dbb /src/widgets
parent6c2c6a48e730888760d2328f18f2be81d6dee6d3 (diff)
improve declaration scope
Change-Id: Id8d8f4e59793ba5fc2d3afa31674009af73a59c9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 15e03af69b..0f53809215 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -2514,7 +2514,6 @@ void QStyleSheetStyle::setProperties(QWidget *w)
if (!property.startsWith(QStringLiteral("qproperty-"), Qt::CaseInsensitive))
continue;
property.remove(0, 10); // strip "qproperty-"
- const QVariant value = w->property(property.toLatin1());
const QMetaObject *metaObject = w->metaObject();
int index = metaObject->indexOfProperty(property.toLatin1());
if (index == -1) {
@@ -2527,6 +2526,7 @@ void QStyleSheetStyle::setProperties(QWidget *w)
continue;
}
QVariant v;
+ const QVariant value = w->property(property.toLatin1());
switch (value.type()) {
// ### Qt 5
// case QVariant::Icon: v = decl.iconValue(); break;