diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-28 13:41:50 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-28 13:57:15 (GMT) |
commit | 98bdb5705119fd71c5de66fb413bfba2257835d3 (patch) | |
tree | 0e1be87e7ee21c597fd21c2e9a4b9db795fa8238 /src/declarative/qml/qmlcomponent.cpp | |
parent | 1fd67315f52dd59667d940057d97f6f7a5ec20d0 (diff) | |
download | Qt-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/qmlcomponent.cpp')
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 92f6b28..2c3ebd6 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -130,7 +130,7 @@ void QmlComponentPrivate::fromTypeData(QmlCompositeTypeData *data) url = QUrl(data->url); QmlCompiledComponent *c = data->toCompiledComponent(engine); - if(!c) { + if (!c) { Q_ASSERT(data->status == QmlCompositeTypeData::Error); errorDescription = data->errorDescription; @@ -148,13 +148,13 @@ void QmlComponentPrivate::fromTypeData(QmlCompositeTypeData *data) void QmlComponentPrivate::clear() { - if(typeData) { + if (typeData) { typeData->remWaiter(this); typeData->release(); typeData = 0; } - if(cc) { + if (cc) { cc->release(); cc = 0; } @@ -186,11 +186,11 @@ QmlComponent::Status QmlComponent::status() const { Q_D(const QmlComponent); - if(d->typeData) + if (d->typeData) return Loading; - else if(d->engine && d->cc) + else if (d->engine && d->cc) return Ready; - else if(!d->errorDescription.isEmpty()) + else if (!d->errorDescription.isEmpty()) return Error; else return Null; @@ -307,7 +307,7 @@ void QmlComponent::setData(const QByteArray &data, const QUrl &url) QmlCompositeTypeData *typeData = d->engine->d_func()->typeManager.getImmediate(data, url); - if(typeData->status == QmlCompositeTypeData::Waiting) { + if (typeData->status == QmlCompositeTypeData::Waiting) { d->typeData = typeData; d->typeData->addWaiter(d); @@ -335,7 +335,7 @@ void QmlComponent::loadUrl(const QUrl &url) QmlCompositeTypeData *data = d->engine->d_func()->typeManager.get(url); - if(data->status == QmlCompositeTypeData::Waiting) { + if (data->status == QmlCompositeTypeData::Waiting) { d->typeData = data; d->typeData->addWaiter(d); @@ -352,7 +352,7 @@ void QmlComponent::loadUrl(const QUrl &url) QString QmlComponent::errorDescription() const { Q_D(const QmlComponent); - if(isError()) + if (isError()) return d->errorDescription; else return QString(); @@ -388,10 +388,10 @@ QObject *QmlComponent::create(QmlContext *context) { Q_D(QmlComponent); - if(!context) + if (!context) context = d->engine->rootContext(); - if(context->engine() != d->engine) { + if (context->engine() != d->engine) { qWarning("QmlComponent::create(): Must create component in context from the same QmlEngine"); return 0; } @@ -428,12 +428,12 @@ QObject *QmlComponent::beginCreate(QmlContext *context) { Q_D(QmlComponent); - if(!context) { + if (!context) { qWarning("QmlComponent::beginCreate(): Cannot create a component in a null context"); return 0; } - if(context->engine() != d->engine) { + if (context->engine() != d->engine) { qWarning("QmlComponent::beginCreate(): Must create component in context from the same QmlEngine"); return 0; } @@ -443,7 +443,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context) return 0; } - if(!isReady()) { + if (!isReady()) { qWarning("QmlComponent: Cannot create un-ready component"); return 0; } @@ -451,7 +451,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context) #ifdef Q_ENABLE_PERFORMANCE_LOG QFxPerfTimer<QFxPerf::CreateComponent> perf; #endif - if(!d->engine->d_func()->rootComponent) + if (!d->engine->d_func()->rootComponent) d->engine->d_func()->rootComponent = this; QmlContext *ctxt = @@ -462,7 +462,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context) QmlVME vme; QObject *rv = vme.run(ctxt, d->cc, d->start, d->count); - if(vme.isError()) { + if (vme.isError()) { qWarning().nospace() #ifdef QML_VERBOSEERRORS_ENABLED << "QmlComponent: " @@ -474,10 +474,10 @@ QObject *QmlComponent::beginCreate(QmlContext *context) ctxt->deactivate(); - if(rv) { + if (rv) { QFx_setParent_noEvent(ctxt, rv); QmlEnginePrivate *ep = d->engine->d_func(); - if(ep->rootComponent == this) { + if (ep->rootComponent == this) { ep->rootComponent = 0; d->bindValues = ep->currentBindValues; @@ -508,13 +508,13 @@ void QmlComponent::completeCreate() #ifdef Q_ENABLE_PERFORMANCE_LOG QFxPerfTimer<QFxPerf::BindInit> bi; #endif - for(int ii = 0; ii < d->bindValues.count(); ++ii) + for (int ii = 0; ii < d->bindValues.count(); ++ii) d->bindValues.at(ii)->init(); } QSet<QmlParserStatus *> done; - for(int ii = 0; ii < d->parserStatus.count(); ++ii) { + for (int ii = 0; ii < d->parserStatus.count(); ++ii) { QmlParserStatus *ps = d->parserStatus.at(ii); - if(!done.contains(ps)) { + if (!done.contains(ps)) { done.insert(ps); ps->componentComplete(); } |