Fix notification flood

Avoid sending status changes in between queued operations
This commit is contained in:
woblight
2024-08-16 10:50:59 +02:00
parent fff94a9279
commit 24a96f4fc9
6 changed files with 68 additions and 21 deletions
+12
View File
@@ -45,14 +45,26 @@ public:
int check_git_return(int code);
class Control : public QObject
{
class BusyLock
{
static int count;
Control* m_locked = nullptr;
public:
BusyLock(Control* c);
BusyLock(BusyLock&& other);
~BusyLock();
};
Q_OBJECT
using TaskQueue = QQueue<QPair<QString,std::function<void()>>>;
TaskQueue m_tasks;
QList<Addon *> m_addons;
bool m_lock = false;
public:
Q_PROPERTY(QString version READ version CONSTANT)