Skip to content
Snippets Groups Projects
Verified Commit dfb55eed authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

fix: function invokes

parent d426f7d0
No related branches found
No related tags found
1 merge request!59fix: function invokes
Pipeline #76718 passed
...@@ -147,9 +147,7 @@ void Backend::initDsManager() ...@@ -147,9 +147,7 @@ void Backend::initDsManager()
this, this,
[this](const QString &id, const QString &ipAddr) { [this](const QString &id, const QString &ipAddr) {
if (id == m_lastProjectSenderId) { if (id == m_lastProjectSenderId) {
QMetaObject::invokeMethod(m_projectManager.get(), QMetaObject::invokeMethod(m_projectManager.get(), "stopProject");
"stopProject",
Qt::QueuedConnection);
} }
}); });
...@@ -179,7 +177,6 @@ void Backend::connectDesignStudio(const QString &ipAddr) ...@@ -179,7 +177,6 @@ void Backend::connectDesignStudio(const QString &ipAddr)
{ {
QMetaObject::invokeMethod(m_dsManager.get(), QMetaObject::invokeMethod(m_dsManager.get(),
"initDesignStudio", "initDesignStudio",
Qt::QueuedConnection,
Q_ARG(QString, ipAddr), Q_ARG(QString, ipAddr),
Q_ARG(QString, "")); Q_ARG(QString, ""));
emit popupOpen("Connecting in the background...", 1500); emit popupOpen("Connecting in the background...", 1500);
...@@ -192,24 +189,17 @@ void Backend::runProject(const QString &id, const QByteArray &projectData) ...@@ -192,24 +189,17 @@ void Backend::runProject(const QString &id, const QByteArray &projectData)
// we'll use this to notify the correct DS when the project started/stopped // we'll use this to notify the correct DS when the project started/stopped
m_lastProjectSenderId = id; m_lastProjectSenderId = id;
QMetaObject::invokeMethod(m_dsManager.get(), QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectRunning", Q_ARG(QString, id));
"sendProjectRunning",
Qt::QueuedConnection,
Q_ARG(QString, id));
bool retVal; bool retVal;
QMetaObject::invokeMethod(m_projectManager.get(), QMetaObject::invokeMethod(m_projectManager.get(),
"runProject", "runProject",
Qt::QueuedConnection, Q_RETURN_ARG(bool, retVal),
Q_ARG(QByteArray, projectData), Q_ARG(QByteArray, projectData),
Q_ARG(bool, autoScaleProject()), Q_ARG(bool, autoScaleProject()));
Q_RETURN_ARG(bool, retVal));
if (!retVal) { if (!retVal) {
QMetaObject::invokeMethod(m_dsManager.get(), QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectStopped", Q_ARG(QString, id));
"sendProjectStopped",
Qt::QueuedConnection,
Q_ARG(QString, id));
} }
emit popupClose(); emit popupClose();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment