mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Fixed / Improved timer handling in timer based component
This commit is contained in:
@@ -46,6 +46,7 @@ namespace BlackGui
|
|||||||
void CTimerBasedComponent::fireTimer()
|
void CTimerBasedComponent::fireTimer()
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->m_timerSingleShot);
|
Q_ASSERT(this->m_timerSingleShot);
|
||||||
|
this->m_timer->start(); // restart other timer
|
||||||
this->m_timerSingleShot->start(10);
|
this->m_timerSingleShot->start(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
|||||||
void setUpdateIntervalSeconds(int seconds) { this->setUpdateInterval(1000 * seconds); }
|
void setUpdateIntervalSeconds(int seconds) { this->setUpdateInterval(1000 * seconds); }
|
||||||
|
|
||||||
//! Stop timer
|
//! Stop timer
|
||||||
void stopTimer() { this->setUpdateInterval(-1); }
|
void stopTimer() { this->setUpdateInterval(-1); this->m_timerSingleShot->stop(); }
|
||||||
|
|
||||||
//! Fire the timer straight away
|
//! Fire the timer straight away
|
||||||
void fireTimer();
|
void fireTimer();
|
||||||
|
|||||||
Reference in New Issue
Block a user