Commit 6e768942 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare save/load info

parent d9a568e7
Pipeline #127945 passed with stage
in 13 minutes and 52 seconds
......@@ -41,12 +41,32 @@ OpenUrlWithConfigureWidget::~OpenUrlWithConfigureWidget()
void OpenUrlWithConfigureWidget::loadSettings()
{
#if 0
const QVector<ConfirmBeforeDeletingRule> rules = ConfirmBeforeDeletingManager::self()->rules();
for (const ConfirmBeforeDeletingRule &r : rules) {
auto item = new QTreeWidgetItem(mTreeWidget);
const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo info(r.pattern(), ConfirmBeforeDeletingRule::ruleTypeToString(r.ruleType()));
initializeItem(item, info);
}
#endif
// TODO
}
void OpenUrlWithConfigureWidget::writeSettings()
{
#if 0
// TODO
QVector<ConfirmBeforeDeletingRule> rules;
for (int i = 0, total = mTreeWidget->topLevelItemCount(); i < total; ++i) {
QTreeWidgetItem *item = mTreeWidget->topLevelItem(i);
ConfirmBeforeDeletingRule r;
r.setPattern(item->text(1));
r.setRuleType(ConfirmBeforeDeletingRule::stringToRuleType(item->text(0)));
rules.append(r);
}
ConfirmBeforeDeletingManager::self()->setRules(rules);
ConfirmBeforeDeletingManager::self()->saveRules();
#endif
}
void OpenUrlWithConfigureWidget::slotAddRule()
......
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