Commit 9e782c2f authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 0ad78414
......@@ -105,12 +105,19 @@ public:
} else if (state == ServerManager::NotRunning || state == ServerManager::Broken) {
emit instance->stopped();
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
if (state == ServerManager::Starting || state == ServerManager::Stopping) {
QMetaObject::invokeMethod(mSafetyTimer.data(), QOverload<>::of(&QTimer::start), Qt::QueuedConnection); // in case we are in a different thread
} else {
QMetaObject::invokeMethod(mSafetyTimer.data(), &QTimer::stop, Qt::QueuedConnection); // in case we are in a different thread
}
#else
if (state == ServerManager::Starting || state == ServerManager::Stopping) {
QMetaObject::invokeMethod(mSafetyTimer.data(), "start", Qt::QueuedConnection); // in case we are in a different thread
} else {
QMetaObject::invokeMethod(mSafetyTimer.data(), "stop", Qt::QueuedConnection); // in case we are in a different thread
}
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment