Commit dea6e449 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement save settings

parent bf88dd45
Pipeline #35344 failed with stage
in 73 minutes and 15 seconds
......@@ -30,7 +30,7 @@ FolderConfigureSettingsDialog::FolderConfigureSettingsDialog(QWidget *parent)
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
connect(buttonBox, &QDialogButtonBox::rejected, this, &FolderConfigureSettingsDialog::reject);
connect(buttonBox, &QDialogButtonBox::accepted, this, &FolderConfigureSettingsDialog::accept);
connect(buttonBox, &QDialogButtonBox::accepted, this, &FolderConfigureSettingsDialog::slotSave);
mainLayout->addWidget(buttonBox);
readConfig();
}
......@@ -40,6 +40,12 @@ FolderConfigureSettingsDialog::~FolderConfigureSettingsDialog()
writeConfig();
}
void FolderConfigureSettingsDialog::slotSave()
{
mFolderConfigureSettingsWidget->save();
accept();
}
void FolderConfigureSettingsDialog::readConfig()
{
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
......
......@@ -18,6 +18,7 @@ public:
~FolderConfigureSettingsDialog();
private:
void slotSave();
void readConfig();
void writeConfig();
FolderConfigureSettingsWidget *mFolderConfigureSettingsWidget = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment