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/fx/qfxrepeater.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/fx/qfxrepeater.cpp')
-rw-r--r-- | src/declarative/fx/qfxrepeater.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index 78e9f51..7ee949d 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -259,15 +259,15 @@ void QFxRepeater::regenerate() qDeleteAll(d->deletables); d->deletables.clear(); - if(!d->component || !itemParent() || !isComponentComplete()) + if (!d->component || !itemParent() || !isComponentComplete()) return; QFxItem *lastItem = this; - if(d->dataSource.type() == QVariant::StringList) { + if (d->dataSource.type() == QVariant::StringList) { QStringList sl = qvariant_cast<QStringList>(d->dataSource); - for(int ii = 0; ii < sl.size(); ++ii) { + for (int ii = 0; ii < sl.size(); ++ii) { QmlContext *ctxt = new QmlContext(qmlContext(this), this); d->deletables << ctxt; @@ -277,12 +277,12 @@ void QFxRepeater::regenerate() if (QFxItem *item = d->addItem(ctxt, lastItem)) lastItem = item; } - } else if(QmlMetaType::isList(d->dataSource)) { + } else if (QmlMetaType::isList(d->dataSource)) { int cnt = QmlMetaType::listCount(d->dataSource); - if(cnt <= 0) + if (cnt <= 0) return; - for(int ii = 0; ii < cnt; ++ii) { + for (int ii = 0; ii < cnt; ++ii) { QVariant v = QmlMetaType::listAt(d->dataSource, ii); QObject *o = QmlMetaType::toQObject(v); @@ -297,10 +297,10 @@ void QFxRepeater::regenerate() } } else if (QListModelInterface *model = qobject_cast<QListModelInterface*>(d->dataSource.value<QObject*>())) { int cnt = model->count(); - if(cnt <= 0) + if (cnt <= 0) return; - for(int ii = 0; ii < cnt; ++ii) { + for (int ii = 0; ii < cnt; ++ii) { QmlContext *ctxt = new QmlContext(qmlContext(this), this); d->deletables << ctxt; @@ -339,11 +339,11 @@ void QFxRepeater::regenerate() d->addItem(ctxt, lastItem); - } else if(d->dataSource.canConvert(QVariant::Int)){ + } else if (d->dataSource.canConvert(QVariant::Int)){ int count = qvariant_cast<int>(d->dataSource); - for(int ii = 0; ii < count; ++ii) { + for (int ii = 0; ii < count; ++ii) { QmlContext *ctxt = new QmlContext(qmlContext(this), this); d->deletables << ctxt; |