From c066ffcd282552b7a19c28e8cd68ef7fc25b0ff8 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 2 Aug 2017 17:47:25 +0200 Subject: [PATCH] Ref T111, emit signal simulatorPluginChanged after function completes --- src/blackcore/context/contextsimulatorimpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 2882c00c5..fede15a13 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -314,9 +314,12 @@ namespace BlackCore m_simulatorPlugin.first = simulatorPluginInfo; m_simulatorPlugin.second = simulator; - //! \fixme KB 7/2017 wonder if it was better to force an Qt::QueuedConnection emit by calling CTimer::singleShot - //! Replace this comment by an info comment after review, or change - emit simulatorPluginChanged(simulatorPluginInfo); + // Emit signal after this function completes + QTimer::singleShot(0, this, [ = ] + { + emit this->simulatorPluginChanged(simulatorPluginInfo); + }); + CLogMessage(this).info("Simulator plugin loaded: '%1' connected: %2") << simulatorPluginInfo.toQString(true) << boolToYesNo(connected);