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(updateTimer, SIGNAL(timeout()), this, SLOT(updateData()));
|
||||||
connect(settings, SIGNAL(configChanged()), this, SLOT(updateConfig()));
|
connect(settings, SIGNAL(configChanged()), this, SLOT(updateConfig()));
|
||||||
connect(highNotifyTimer, SIGNAL(timeout()), this, SLOT(showHighNotification()));
|
connect(highNotifyTimer, SIGNAL(timeout()), this, SLOT(showHighNotification()));
|
||||||
connect(lowNotifyTimer, SIGNAL(timeout()), this, SLOT(showLowNotification()));
|
connect(lowNotifyTimer, SIGNAL(timeout()), this, SLOT(showLowNotification()));
|
||||||
|
|
||||||
updateConfig();
|
updateTimer->start(5000);
|
||||||
|
|
||||||
updateTimer->setInterval(5000);
|
|
||||||
updateTimer->start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Battery::~Battery() { }
|
Battery::~Battery() { }
|
||||||
|
|
Loading…
Reference in a new issue