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/util/qfxview.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/util/qfxview.cpp')
-rw-r--r-- | src/declarative/util/qfxview.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index 993d5cb..1e9d5a4 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -200,7 +200,7 @@ void QFxView::execute() d->component = new QmlComponent(&d->engine, d->xml.toUtf8(), d->source); } - if(!d->component->isLoading()) { + if (!d->component->isLoading()) { continueExecute(); } else { connect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); @@ -211,18 +211,18 @@ void QFxView::continueExecute() { disconnect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); - if(!d->component){ + if (!d->component){ qWarning() << "Error in loading" << d->source; return; } QObject *obj = d->component->create(); rootContext()->deactivate(); - if(obj) { - if(QFxItem *item = qobject_cast<QFxItem *>(obj)) { + if (obj) { + if (QFxItem *item = qobject_cast<QFxItem *>(obj)) { item->QSimpleCanvasItem::setParent(QSimpleCanvas::root()); - if(itemTreeDump()) + if (itemTreeDump()) item->dump(); QPerformanceLog::displayData(); @@ -231,7 +231,7 @@ void QFxView::continueExecute() connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged())); connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged())); sizeChanged(); - } else if(QWidget *wid = qobject_cast<QWidget *>(obj)) { + } else if (QWidget *wid = qobject_cast<QWidget *>(obj)) { window()->setAttribute(Qt::WA_OpaquePaintEvent, false); window()->setAttribute(Qt::WA_NoSystemBackground, false); if (!layout()) { @@ -256,14 +256,14 @@ void QFxView::sizeChanged() QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) { - if(!d->root) + if (!d->root) return 0; QmlComponent component(&d->engine, xml.toUtf8(), QUrl()); QObject *obj = component.create(); - if(obj){ + if (obj){ QFxItem *item = static_cast<QFxItem *>(obj); - if(!parent) + if (!parent) parent = d->root; item->setItemParent(parent); @@ -280,7 +280,7 @@ void QFxView::reset() void QFxView::clearItems() { - if(!d->root) + if (!d->root) return; delete d->root; d->root = 0; @@ -293,7 +293,7 @@ QFxItem *QFxView::root() const void QFxView::resizeEvent(QResizeEvent *e) { - if(d->root) { + if (d->root) { d->root->setWidth(width()); d->root->setHeight(height()); } |