summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dummyresource/resourcefactory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp
index 9d702a8..d94284c 100644
--- a/dummyresource/resourcefactory.cpp
+++ b/dummyresource/resourcefactory.cpp
@@ -122,6 +122,17 @@ public:
122signals: 122signals:
123 void error(int errorCode, const QString &errorMessage); 123 void error(int errorCode, const QString &errorMessage);
124 124
125private:
126 bool messagesToProcessAvailable()
127 {
128 for (auto queue : mCommandQueues) {
129 if (!queue->isEmpty()) {
130 return true;
131 }
132 }
133 return false;
134 }
135
125private slots: 136private slots:
126 void process() 137 void process()
127 { 138 {
@@ -131,6 +142,9 @@ private slots:
131 mProcessingLock = true; 142 mProcessingLock = true;
132 auto job = processPipeline().then<void>([this]() { 143 auto job = processPipeline().then<void>([this]() {
133 mProcessingLock = false; 144 mProcessingLock = false;
145 if (messagesToProcessAvailable()) {
146 process();
147 }
134 }).exec(); 148 }).exec();
135 } 149 }
136 150