Use static QMetaObject::invokeMethod
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user