mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T486 Using QMetaObject::invokeMethod with pointer-to-member-function (or functor).
This commit is contained in:
@@ -129,7 +129,7 @@ namespace BlackCore
|
||||
|
||||
ISimulatorListener *listener = m_plugins->getListener(simulatorInfo.getIdentifier());
|
||||
Q_ASSERT(listener);
|
||||
QMetaObject::invokeMethod(listener, "stop", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(listener, &ISimulatorListener::stop, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
int CContextSimulator::checkListeners()
|
||||
@@ -480,7 +480,7 @@ namespace BlackCore
|
||||
// start if not already running
|
||||
if (!listener->isRunning())
|
||||
{
|
||||
const bool s = QMetaObject::invokeMethod(listener, "start", Qt::QueuedConnection);
|
||||
const bool s = QMetaObject::invokeMethod(listener, &ISimulatorListener::start, Qt::QueuedConnection);
|
||||
Q_ASSERT_X(s, Q_FUNC_INFO, "cannot invoke method");
|
||||
Q_UNUSED(s);
|
||||
}
|
||||
@@ -993,7 +993,7 @@ namespace BlackCore
|
||||
ISimulatorListener *listener = m_plugins->getListener(info.getIdentifier());
|
||||
if (listener)
|
||||
{
|
||||
const bool s = QMetaObject::invokeMethod(listener, "stop");
|
||||
const bool s = QMetaObject::invokeMethod(listener, &ISimulatorListener::stop);
|
||||
Q_ASSERT_X(s, Q_FUNC_INFO, "Cannot invoke stop");
|
||||
Q_UNUSED(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user