Skip to content

Commit c924af3

Browse files
committed
Match duration control maximums to the backend
Allow the full integer range so Settings accurately displays refresh intervals and alert durations loaded from the INI.
1 parent c324f0b commit c924af3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/settingsdialog.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <QSpinBox>
1515
#include <QVBoxLayout>
1616

17+
#include <limits>
18+
1719
SettingsDialog::SettingsDialog(Configuration *config, QWidget *parent)
1820
: QDialog(parent), m_config(config) {
1921
setWindowTitle(QStringLiteral("badprocess-guard settings"));
@@ -41,13 +43,13 @@ SettingsDialog::SettingsDialog(Configuration *config, QWidget *parent)
4143
m_customFontButton = new QPushButton(QStringLiteral("Custom Font…"), this);
4244

4345
m_refreshInterval = new QSpinBox(this);
44-
m_refreshInterval->setRange(250, 600000);
46+
m_refreshInterval->setRange(250, std::numeric_limits<int>::max());
4547
m_refreshInterval->setSingleStep(100);
4648
m_refreshInterval->setSuffix(QStringLiteral(" ms"));
4749
m_refreshInterval->setToolTip(QStringLiteral("How often process CPU usage is sampled. Lower values react faster but cost more CPU. Minimum: 250 ms."));
4850

4951
m_alertDuration = new QSpinBox(this);
50-
m_alertDuration->setRange(0, 600000);
52+
m_alertDuration->setRange(0, std::numeric_limits<int>::max());
5153
m_alertDuration->setSingleStep(100);
5254
m_alertDuration->setSuffix(QStringLiteral(" ms"));
5355
m_alertDuration->setToolTip(QStringLiteral("How long a recovered process remains visible before disappearing. Zero disables the hold duration."));

0 commit comments

Comments
 (0)