Commit 7cd42f68 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve confirmbeforedeleting dialog

parent b1441ca6
......@@ -30,7 +30,7 @@ ConfirmBeforeDeletingDialog::ConfirmBeforeDeletingDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfirmBeforeDeletingDialog::accept);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfirmBeforeDeletingDialog::slotSave);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfirmBeforeDeletingDialog::reject);
readConfig();
}
......@@ -40,6 +40,12 @@ ConfirmBeforeDeletingDialog::~ConfirmBeforeDeletingDialog()
writeConfig();
}
void ConfirmBeforeDeletingDialog::slotSave()
{
// TODO
accept();
}
void ConfirmBeforeDeletingDialog::writeConfig()
{
KConfigGroup group(KSharedConfig::openStateConfig(), myConfirmBeforeDeletingConfigGroupName);
......
......@@ -16,6 +16,7 @@ public:
~ConfirmBeforeDeletingDialog() override;
private:
void slotSave();
void writeConfig();
void readConfig();
ConfirmBeforeDeletingWidget *const mConfirmBeforeDeletingWidget;
......
......@@ -68,7 +68,7 @@ void ConfirmBeforeDeletingManager::saveRules()
const QString groupName = defaultGroupName() + QStringLiteral(" #%1").arg(i);
KConfigGroup group = config->group(groupName);
const ConfirmBeforeDeletingRule &rule = mRules.at(i);
rule.save(group); // TODO
rule.save(group);
}
}
......
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