]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/dolphinsettingsdialog.cpp
Make the settings dialog work in the frameworks branch
[dolphin.git] / src / settings / dolphinsettingsdialog.cpp
index 8df2996b3a97e36af01eccc20977f4c713fd3d19..f248335e9a916913223c424d89bb2e9b88cc56ad 100644 (file)
@@ -53,6 +53,10 @@ DolphinSettingsDialog::DolphinSettingsDialog(const KUrl& url, QWidget* parent) :
     box->button(QDialogButtonBox::Ok)->setDefault(true);
     setButtonBox(box);
 
+    connect(box->button(QDialogButtonBox::Ok), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
+    connect(box->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, this, &DolphinSettingsDialog::applySettings);
+    connect(box->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, this, &DolphinSettingsDialog::restoreDefaults);
+
     // Startup
     StartupSettingsPage* startupSettingsPage = new StartupSettingsPage(url, this);
     KPageWidgetItem* startupSettingsFrame = addPage(startupSettingsPage,
@@ -114,18 +118,6 @@ DolphinSettingsDialog::~DolphinSettingsDialog()
     //saveDialogSize(dialogConfig);
 }
 
-void DolphinSettingsDialog::slotButtonClicked(int button)
-{
-    if ((button == QDialogButtonBox::Ok) || (button == QDialogButtonBox::Apply)) {
-        applySettings();
-    } else if (button == QDialogButtonBox::RestoreDefaults) {
-        restoreDefaults();
-    }
-
-#pragma message("TODO: port")
-    //KPageDialog::slotButtonClicked(button);
-}
-
 void DolphinSettingsDialog::enableApply()
 {
     buttonBox()->button(QDialogButtonBox::Apply)->setEnabled(true);