Start timers only once at startup
This commit is contained in:
parent
5e2fc08f45
commit
d359c95a40
1 changed files with 1 additions and 6 deletions
|
@ -83,17 +83,12 @@ Battery::Battery(QObject *parent) : QObject(parent)
|
|||
}
|
||||
}
|
||||
|
||||
updateData();
|
||||
|
||||
connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateData()));
|
||||
connect(settings, SIGNAL(configChanged()), this, SLOT(updateConfig()));
|
||||
connect(highNotifyTimer, SIGNAL(timeout()), this, SLOT(showHighNotification()));
|
||||
connect(lowNotifyTimer, SIGNAL(timeout()), this, SLOT(showLowNotification()));
|
||||
|
||||
updateConfig();
|
||||
|
||||
updateTimer->setInterval(5000);
|
||||
updateTimer->start();
|
||||
updateTimer->start(5000);
|
||||
}
|
||||
|
||||
Battery::~Battery() { }
|
||||
|
|
Loading…
Reference in a new issue