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

Add item

parent e8284944
Pipeline #69009 canceled with stage
...@@ -46,12 +46,13 @@ void ConfirmBeforeDeletingWidget::fillRules() ...@@ -46,12 +46,13 @@ void ConfirmBeforeDeletingWidget::fillRules()
void ConfirmBeforeDeletingWidget::slotEditRule() void ConfirmBeforeDeletingWidget::slotEditRule()
{ {
QTreeWidgetItem *item = mTreeWidget->currentItem();
QPointer<ConfirmBeforeDeletingCreateRuleDialog> dlg = new ConfirmBeforeDeletingCreateRuleDialog(this); QPointer<ConfirmBeforeDeletingCreateRuleDialog> dlg = new ConfirmBeforeDeletingCreateRuleDialog(this);
// TODO dlg->setInfo(); // TODO dlg->setInfo();
if (dlg->exec()) { if (dlg->exec()) {
const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo info = dlg->info(); const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo info = dlg->info();
item->setText(0, info.ruleType);
// TODO save it. item->setText(1, info.pattern);
} }
delete dlg; delete dlg;
} }
...@@ -84,8 +85,7 @@ void ConfirmBeforeDeletingWidget::slotAddRule() ...@@ -84,8 +85,7 @@ void ConfirmBeforeDeletingWidget::slotAddRule()
QPointer<ConfirmBeforeDeletingCreateRuleDialog> dlg = new ConfirmBeforeDeletingCreateRuleDialog(this); QPointer<ConfirmBeforeDeletingCreateRuleDialog> dlg = new ConfirmBeforeDeletingCreateRuleDialog(this);
if (dlg->exec()) { if (dlg->exec()) {
const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo info = dlg->info(); const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo info = dlg->info();
new QTreeWidgetItem({info.ruleType, info.pattern});
// TODO save it.
} }
delete dlg; delete dlg;
} }
......
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