summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-15 04:16:42 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-15 04:16:42 (GMT)
commit343535d7cbae16c02517664ce0d363e9834bd74d (patch)
treed7e826c264b69b6777f405d86295e77229d4ea33 /src/declarative/qml/qmlcompiler.cpp
parent9410f4b0e9aa3ce310c65f24c60576ce7317f88d (diff)
downloadQt-343535d7cbae16c02517664ce0d363e9834bd74d.zip
Qt-343535d7cbae16c02517664ce0d363e9834bd74d.tar.gz
Qt-343535d7cbae16c02517664ce0d363e9834bd74d.tar.bz2
Use Q_GLOBAL_STATIC for global static.
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index c744509..e2fd7cb 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -2039,7 +2039,7 @@ bool QmlCompiler::mergeDynamicMetaProperties(QmlParser::Object *obj)
return true;
}
-static QAtomicInt classIndexCounter;
+Q_GLOBAL_STATIC(QAtomicInt, classIndexCounter)
bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode)
{
@@ -2058,7 +2058,7 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode)
QByteArray newClassName = obj->metatype->className();
newClassName.append("_QML_");
- int idx = classIndexCounter.fetchAndAddRelaxed(1);
+ int idx = classIndexCounter()->fetchAndAddRelaxed(1);
newClassName.append(QByteArray::number(idx));
QMetaObjectBuilder builder;