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:
Lars Toenning
2025-06-09 20:31:37 +02:00
parent 56d00d7d77
commit 5004db1885
19 changed files with 167 additions and 93 deletions

View File

@@ -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();