Use static QMetaObject::invokeMethod

This commit is contained in:
Jonas Kvinge
2021-09-09 21:53:14 +02:00
parent d35d3aabc3
commit 24a3ac9811
17 changed files with 53 additions and 53 deletions

View File

@@ -130,7 +130,7 @@ void AbstractMessageHandler<MT>::SendMessage(const MessageType &message) {
template <typename MT>
void AbstractMessageHandler<MT>::SendMessageAsync(const MessageType &message) {
std::string data = message.SerializeAsString();
metaObject()->invokeMethod(this, "WriteMessage", Qt::QueuedConnection, Q_ARG(QByteArray, QByteArray(data.data(), data.size())));
QMetaObject::invokeMethod(this, "WriteMessage", Qt::QueuedConnection, Q_ARG(QByteArray, QByteArray(data.data(), data.size())));
}
template<typename MT>

View File

@@ -219,7 +219,7 @@ void WorkerPool<HandlerType>::SetExecutableName(const QString &executable_name)
template <typename HandlerType>
void WorkerPool<HandlerType>::Start() {
metaObject()->invokeMethod(this, "DoStart");
QMetaObject::invokeMethod(this, "DoStart");
}
template <typename HandlerType>
@@ -382,7 +382,7 @@ WorkerPool<HandlerType>::SendMessageWithReply(MessageType *message) {
}
// Wake up the main thread
metaObject()->invokeMethod(this, "SendQueuedMessages", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "SendQueuedMessages", Qt::QueuedConnection);
return reply;