From 343ed036a184fa8d7c36037e33daff542ce7d141 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 24 Jul 2024 11:59:40 +0500 Subject: [PATCH] UI: Programs: Warn for "Apply same rules to child processes" option --- src/ui/form/prog/programeditdialog.cpp | 9 +++++++++ src/ui/form/prog/programeditdialog.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/ui/form/prog/programeditdialog.cpp b/src/ui/form/prog/programeditdialog.cpp index 749fea98..30248dac 100644 --- a/src/ui/form/prog/programeditdialog.cpp +++ b/src/ui/form/prog/programeditdialog.cpp @@ -564,6 +564,8 @@ void ProgramEditDialog::setupChildOptions() m_cbApplyChild->setIcon( GuiUtil::overlayIcon(":/icons/application_double.png", ":/icons/tick.png")); + connect(m_cbApplyChild, &QCheckBox::clicked, this, &ProgramEditDialog::warnRestartNeededOption); + // Kill Child m_cbKillChild = new QCheckBox(); m_cbKillChild->setIcon(IconCache::icon(":/icons/scull.png")); @@ -895,3 +897,10 @@ void ProgramEditDialog::warnDangerousOption() const "Be careful when killing a system services or other important programs!\n" "It can cause a Windows malfunction or totally unusable.")); } + +void ProgramEditDialog::warnRestartNeededOption() const +{ + IoC()->showErrorBox( + tr("Attention: This option only affects new processes!\n\n" + "Please restart the running program to take effect of this option.")); +} diff --git a/src/ui/form/prog/programeditdialog.h b/src/ui/form/prog/programeditdialog.h index 684881ec..ad108fcd 100644 --- a/src/ui/form/prog/programeditdialog.h +++ b/src/ui/form/prog/programeditdialog.h @@ -107,6 +107,7 @@ private: void editRuleDialog(int ruleId); void warnDangerousOption() const; + void warnRestartNeededOption() const; private: ProgramsController *m_ctrl = nullptr;