]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/serviceitemdelegate.cpp
make use of initializer lists
[dolphin.git] / src / settings / serviceitemdelegate.cpp
index 9b2cbd890caf3ec3feb59a395add18d524313f17..774ea78ae647e3eda2e7bed6627ffb0c0df248b5 100644 (file)
@@ -20,7 +20,7 @@
 #include "serviceitemdelegate.h"
 
 #include <KDebug>
-#include <KPushButton>
+#include <QPushButton>
 #include <QIcon>
 
 #include "servicemodel.h"
@@ -74,10 +74,10 @@ QList<QWidget*> ServiceItemDelegate::createItemWidgets(const QModelIndex&) const
     checkBox->setPalette(palette);
     connect(checkBox, &QCheckBox::clicked, this, &ServiceItemDelegate::slotCheckBoxClicked);
 
-    KPushButton* configureButton = new KPushButton();
-    connect(configureButton, &KPushButton::clicked, this, &ServiceItemDelegate::slotConfigureButtonClicked);
+    QPushButton* configureButton = new QPushButton();
+    connect(configureButton, &QPushButton::clicked, this, &ServiceItemDelegate::slotConfigureButtonClicked);
 
-    return QList<QWidget*>() << checkBox << configureButton;
+    return {checkBox, configureButton};
 }
 
 void ServiceItemDelegate::updateItemWidgets(const QList<QWidget*> widgets,
@@ -85,7 +85,7 @@ void ServiceItemDelegate::updateItemWidgets(const QList<QWidget*> widgets,
                                               const QPersistentModelIndex& index) const
 {
     QCheckBox* checkBox = static_cast<QCheckBox*>(widgets[0]);
-    KPushButton *configureButton = static_cast<KPushButton*>(widgets[1]);
+    QPushButton *configureButton = static_cast<QPushButton*>(widgets[1]);
 
     const int itemHeight = sizeHint(option, index).height();