Fix signal not always emitted from messagreply
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QThread>
|
||||||
#include <QSemaphore>
|
#include <QSemaphore>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
@@ -88,6 +89,9 @@ void MessageReply<MessageType>::SetReply(const MessageType &message) {
|
|||||||
qLog(Debug) << "Releasing ID" << id() << "(finished)";
|
qLog(Debug) << "Releasing ID" << id() << "(finished)";
|
||||||
semaphore_.release();
|
semaphore_.release();
|
||||||
|
|
||||||
|
// The signal is not always emitted without this.
|
||||||
|
QThread::usleep(10);
|
||||||
|
|
||||||
emit Finished(success_);
|
emit Finished(success_);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user