mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
refs #270 don't call CRuntime::gracefulShutdown from a different thread;
connect it to the QCoreApplication::aboutToQuit signal instead
This commit is contained in:
@@ -154,7 +154,6 @@ namespace BlackMiscTest
|
|||||||
else if (line.startsWith("all")) runtime->slotLog(enable);
|
else if (line.startsWith("all")) runtime->slotLog(enable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runtime->gracefulShutdown();
|
|
||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -305,6 +305,8 @@ namespace BlackCore
|
|||||||
BlackSim::registerMetadata();
|
BlackSim::registerMetadata();
|
||||||
BlackCore::registerMetadata();
|
BlackCore::registerMetadata();
|
||||||
|
|
||||||
|
this->connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CRuntime::gracefulShutdown);
|
||||||
|
|
||||||
// upfront reading of settings, as DBus server already relies on settings
|
// upfront reading of settings, as DBus server already relies on settings
|
||||||
CContextSettings *settings = nullptr;
|
CContextSettings *settings = nullptr;
|
||||||
QString dbusAddress;
|
QString dbusAddress;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ namespace BlackCore
|
|||||||
//! Slot logging for bool value from a specific context
|
//! Slot logging for bool value from a specific context
|
||||||
void logSlot(LogContext ctx, const char *func, bool boolValue) const;
|
void logSlot(LogContext ctx, const char *func, bool boolValue) const;
|
||||||
|
|
||||||
//! shutdown
|
//! Clean up (will be connected to signal QCoreApplication::aboutToQuit)
|
||||||
void gracefulShutdown();
|
void gracefulShutdown();
|
||||||
|
|
||||||
// ------- Context as interface, normal way to access a context
|
// ------- Context as interface, normal way to access a context
|
||||||
|
|||||||
Reference in New Issue
Block a user