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/widgets | |
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/widgets')
-rw-r--r-- | src/declarative/widgets/graphicslayouts.cpp | 6 | ||||
-rw-r--r-- | src/declarative/widgets/graphicswidgets.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/widgets/graphicslayouts.cpp b/src/declarative/widgets/graphicslayouts.cpp index 8e0081b..d6c4ac2 100644 --- a/src/declarative/widgets/graphicslayouts.cpp +++ b/src/declarative/widgets/graphicslayouts.cpp @@ -119,7 +119,7 @@ void QGraphicsLinearLayoutObject::insertLayoutItem(int index, QGraphicsLayoutIte insertItem(index, item); //connect attached properties - if(QObject *obj = attachedProperties.value(item)) { + if (QObject *obj = attachedProperties.value(item)) { setStretchFactor(item, static_cast<LinearLayoutAttached *>(obj)->stretchFactor()); setAlignment(item, static_cast<LinearLayoutAttached *>(obj)->alignment()); QObject::connect(obj, SIGNAL(stretchChanged(QGraphicsLayoutItem*,int)), @@ -261,7 +261,7 @@ QGraphicsGridLayoutObject::~QGraphicsGridLayoutObject() void QGraphicsGridLayoutObject::addWidget(QGraphicsWidget *wid) { //use attached properties - if(QObject *obj = attachedProperties.value(qobject_cast<QGraphicsLayoutItem*>(wid))) { + if (QObject *obj = attachedProperties.value(qobject_cast<QGraphicsLayoutItem*>(wid))) { int row = static_cast<GridLayoutAttached *>(obj)->row(); int column = static_cast<GridLayoutAttached *>(obj)->column(); int rowSpan = static_cast<GridLayoutAttached *>(obj)->rowSpan(); @@ -277,7 +277,7 @@ void QGraphicsGridLayoutObject::addWidget(QGraphicsWidget *wid) void QGraphicsGridLayoutObject::addLayoutItem(QGraphicsLayoutItem *item) { //use attached properties - if(QObject *obj = attachedProperties.value(item)) { + if (QObject *obj = attachedProperties.value(item)) { int row = static_cast<GridLayoutAttached *>(obj)->row(); int column = static_cast<GridLayoutAttached *>(obj)->column(); int rowSpan = static_cast<GridLayoutAttached *>(obj)->rowSpan(); diff --git a/src/declarative/widgets/graphicswidgets.cpp b/src/declarative/widgets/graphicswidgets.cpp index 1d0e638..b808807 100644 --- a/src/declarative/widgets/graphicswidgets.cpp +++ b/src/declarative/widgets/graphicswidgets.cpp @@ -84,13 +84,13 @@ private: virtual void clear() { for (int i = 0; i < count(); ++i) - if(QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(at(i))) + if (QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(at(i))) static_cast<QGraphicsScene *>(q)->removeItem(w); QmlConcreteList<QObject *>::clear(); } virtual void removeAt(int i) { - if(QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(at(i))) + if (QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(at(i))) static_cast<QGraphicsScene *>(q)->removeItem(w); QmlConcreteList<QObject *>::removeAt(i); } @@ -99,7 +99,7 @@ private: QmlConcreteList<QObject *>::insert(i, o); //XXX are there any cases when insertion should be different from appension? - if(QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(o)) + if (QGraphicsWidget *w = qobject_cast<QGraphicsWidget *>(o)) static_cast<QGraphicsScene *>(q)->addItem(w); //else if (QWidget *w = qobject_cast<QWidget *>(o)) // static_cast<QGraphicsScene *>(q)->addWidget(w); |