diff --git a/layouts/boxlayout.cpp b/layouts/boxlayout.cpp index bfb872a78..b2a14c292 100644 --- a/layouts/boxlayout.cpp +++ b/layouts/boxlayout.cpp @@ -154,10 +154,11 @@ public: // qDebug() << "Item geometry: " << newGeometry; - if ( q->animator() ) + if (q->animator()) { q->animator()->setGeometry(item, newGeometry); - else + } else { item->setGeometry(newGeometry); + } return newPos; } diff --git a/uiloader.cpp b/uiloader.cpp index de15abd89..9a5b7aca9 100644 --- a/uiloader.cpp +++ b/uiloader.cpp @@ -47,19 +47,18 @@ UiLoader::UiLoader( QObject *parent ) : d( new Private() ) { d->widgets - << "CheckBox" - << "Flash" - << "Icon" - << "Label" - << "PushButton" - << "RadioButton" - << "Rectangle" + << "CheckBox" + << "Flash" + << "Icon" + << "Label" + << "PushButton" + << "RadioButton" << "Meter"; d->layouts - << "VBoxLayout" - << "HBoxLayout" - << "FlowLayout"; + << "VBoxLayout" + << "HBoxLayout" + << "FlowLayout"; } UiLoader::~UiLoader() @@ -74,30 +73,27 @@ QStringList UiLoader::availableWidgets() const Widget *UiLoader::createWidget( const QString &className, Widget *parent ) { - if ( className == QString("CheckBox") ) { - return new CheckBox( parent ); + if (className == QString("CheckBox")) { + return new CheckBox( parent ); } - else if ( className == QString("Flash") ) { - return new Flash( parent ); + else if (className == QString("Flash")) { + return new Flash( parent ); } - else if ( className == QString("Icon") ) { - return new Icon( parent ); + else if (className == QString("Icon")) { + return new Icon( parent ); } - else if ( className == QString("Label") ) { - return new Label( parent ); // Constructor here requires a Widget + else if (className == QString("Label")) { + return new Label( parent ); // Constructor here requires a Widget } - else if ( className == QString("PushButton") ) { - return new PushButton( parent ); // Constructor here requires a Widget + else if (className == QString("PushButton")) { + return new PushButton( parent ); // Constructor here requires a Widget } - else if ( className == QString("RadioButton") ) { - return new RadioButton( parent ); + else if (className == QString("RadioButton")) { + return new RadioButton( parent ); } - else if ( className == QString("Meter") ) { + else if (className == QString("Meter")) { return new Meter( parent ); } - //else if ( className == QString("Rectangle") ) { - // return new Rectangle( parent ); // Constructor here requires a Widget - //} return 0; } @@ -109,14 +105,14 @@ QStringList UiLoader::availableLayouts() const Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent ) { - if ( className == QString("HBoxLayout") ) { - return new HBoxLayout( parent ); + if (className == QString("HBoxLayout")) { + return new HBoxLayout( parent ); } - else if ( className == QString("VBoxLayout") ) { - return new VBoxLayout( parent ); + else if (className == QString("VBoxLayout")) { + return new VBoxLayout( parent ); } - else if ( className == QString("FlowLayout") ) { - return new FlowLayout( parent ); + else if (className == QString("FlowLayout")) { + return new FlowLayout( parent ); } return 0; diff --git a/uiloader.h b/uiloader.h index bdcc36653..e763703cb 100644 --- a/uiloader.h +++ b/uiloader.h @@ -43,14 +43,14 @@ class PLASMA_EXPORT UiLoader : public QObject Q_OBJECT public: - UiLoader( QObject *parent = 0 ); + UiLoader(QObject *parent = 0); virtual ~UiLoader(); QStringList availableWidgets() const; - Widget *createWidget( const QString &className, Widget *parent=0 ); + Widget *createWidget(const QString &className, Widget *parent = 0); QStringList availableLayouts() const; - Layout *createLayout( const QString &className, LayoutItem *parent ); + Layout *createLayout(const QString &className, LayoutItem *parent); private: class Private;