summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:41:50 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:57:15 (GMT)
commit98bdb5705119fd71c5de66fb413bfba2257835d3 (patch)
tree0e1be87e7ee21c597fd21c2e9a4b9db795fa8238 /src/declarative/qml/qmlvmemetaobject.cpp
parent1fd67315f52dd59667d940057d97f6f7a5ec20d0 (diff)
downloadQt-98bdb5705119fd71c5de66fb413bfba2257835d3.zip
Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.gz
Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.bz2
Coding style refactor, changing 'if(' and 'for(' to 'if (' and 'for ('
Diffstat (limited to 'src/declarative/qml/qmlvmemetaobject.cpp')
-rw-r--r--src/declarative/qml/qmlvmemetaobject.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp
index 2b1060b..f7d2635 100644
--- a/src/declarative/qml/qmlvmemetaobject.cpp
+++ b/src/declarative/qml/qmlvmemetaobject.cpp
@@ -52,7 +52,7 @@ QmlVMEMetaObject::QmlVMEMetaObject(QObject *obj,
QmlRefCount *rc)
: object(obj), ref(rc)
{
- if(ref)
+ if (ref)
ref->addref();
*static_cast<QMetaObject *>(this) = *other;
@@ -64,9 +64,9 @@ QmlVMEMetaObject::QmlVMEMetaObject(QObject *obj,
data = new QVariant[propertyCount() - baseProp];
vTypes.resize(propertyCount() - baseProp);
- for(int ii = baseProp; ii < propertyCount(); ++ii) {
+ for (int ii = baseProp; ii < propertyCount(); ++ii) {
QMetaProperty prop = property(ii);
- if((int)prop.type() != -1) {
+ if ((int)prop.type() != -1) {
data[ii - baseProp] = QVariant((QVariant::Type)prop.userType());
} else {
vTypes.setBit(ii - baseProp, true);
@@ -76,27 +76,27 @@ QmlVMEMetaObject::QmlVMEMetaObject(QObject *obj,
QmlVMEMetaObject::~QmlVMEMetaObject()
{
- if(ref)
+ if (ref)
ref->release();
delete [] data;
}
int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
{
- if(id >= baseProp) {
+ if (id >= baseProp) {
int propId = id - baseProp;
bool needActivate = false;
- if(vTypes.testBit(propId)) {
- if(c == QMetaObject::ReadProperty) {
+ if (vTypes.testBit(propId)) {
+ if (c == QMetaObject::ReadProperty) {
*reinterpret_cast<QVariant *>(a[0]) = data[propId];
- } else if(c == QMetaObject::WriteProperty) {
+ } else if (c == QMetaObject::WriteProperty) {
needActivate =
(data[propId] != *reinterpret_cast<QVariant *>(a[0]));
data[propId] = *reinterpret_cast<QVariant *>(a[0]);
}
} else {
- if(c == QMetaObject::ReadProperty) {
+ if (c == QMetaObject::ReadProperty) {
switch(data[propId].type()) {
case QVariant::Int:
*reinterpret_cast<int *>(a[0]) = data[propId].toInt();
@@ -120,7 +120,7 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
qFatal("Unknown type");
break;
}
- } else if(c == QMetaObject::WriteProperty) {
+ } else if (c == QMetaObject::WriteProperty) {
QVariant value = QVariant((QVariant::Type)data[propId].type(), a[0]);
needActivate = (data[propId] != value);
@@ -128,7 +128,7 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
}
}
- if(c == QMetaObject::WriteProperty && needActivate) {
+ if (c == QMetaObject::WriteProperty && needActivate) {
activate(object, baseSig + propId, 0);
}