Fix signal not always emitted from messagreply

This commit is contained in:
Jonas Kvinge 2020-11-19 18:29:03 +01:00
parent 1b791c82fc
commit cf4856a0c9
1 changed files with 4 additions and 0 deletions

View File

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