more unfinished changes, process tab for dashboard
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "changebatcher.hpp"
|
||||
|
||||
namespace ZShell::settings {
|
||||
|
||||
ChangeBatcher::ChangeBatcher(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_dirty(false) {}
|
||||
|
||||
void ChangeBatcher::dirty() {
|
||||
if (m_dirty)
|
||||
return;
|
||||
|
||||
m_dirty = true;
|
||||
QMetaObject::invokeMethod(this, &ChangeBatcher::flush, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void ChangeBatcher::flush() {
|
||||
if (!m_dirty)
|
||||
return;
|
||||
|
||||
m_dirty = false;
|
||||
emit dirtied();
|
||||
}
|
||||
|
||||
} // namespace ZShell::settings
|
||||
Reference in New Issue
Block a user