mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
refactor: Use composition for update time
The timer is not required by all classes and the deep inheritance makes it hard to see where it is actually used. Use composition instead.
This commit is contained in:
@@ -299,10 +299,6 @@ namespace swift::misc
|
||||
//! \threadsafe
|
||||
bool isEnabled() const { return m_enabled; }
|
||||
|
||||
//! Start updating (start/stop timer)
|
||||
//! \threadsafe
|
||||
void startUpdating(int updateTimeSecs);
|
||||
|
||||
//! Name of the worker
|
||||
const QString &getName() { return m_name; }
|
||||
|
||||
@@ -323,11 +319,6 @@ namespace swift::misc
|
||||
//! Wait time for quitAndWait, 0 means not waiting
|
||||
virtual unsigned long waitTimeoutMs() const { return 15 * 1000; }
|
||||
|
||||
//! Safely stop update time
|
||||
void stopUpdateTimer();
|
||||
|
||||
QTimer m_updateTimer { this }; //!< timer which can be used by implementing classes
|
||||
|
||||
private:
|
||||
//! Called after cleanup().
|
||||
void finish();
|
||||
|
||||
Reference in New Issue
Block a user