Commit 980e3907 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[kcmkwin/ruleswidget] Disable "Detect" button when countdown is running

Avoids triggering an assert and communicates that the timeout is running.
Ideally, there was a countdown label of some sort but this is better than crashing.

BUG: 399644
FIXED-IN: 5.12.8

Differential Revision: https://phabricator.kde.org/D16124
parent 4b24a538
......@@ -683,6 +683,7 @@ void RulesWidget::detectClicked()
detect_dlg = new DetectDialog;
connect(detect_dlg, SIGNAL(detectionDone(bool)), this, SLOT(detected(bool)));
detect_dlg->detect(0, Ui::RulesWidgetBase::detection_delay->value());
Ui::RulesWidgetBase::detect->setEnabled(false);
}
void RulesWidget::detected(bool ok)
......@@ -722,6 +723,7 @@ void RulesWidget::detected(bool ok)
delete detect_dlg;
detect_dlg = nullptr;
detect_dlg_ok = ok;
Ui::RulesWidgetBase::detect->setEnabled(true);
}
#define GENERIC_PREFILL( var, func, info, uimethod ) \
......
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