mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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);
|
||||
}
|
||||
}
|
||||
runtime->gracefulShutdown();
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -305,6 +305,8 @@ namespace BlackCore
|
||||
BlackSim::registerMetadata();
|
||||
BlackCore::registerMetadata();
|
||||
|
||||
this->connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CRuntime::gracefulShutdown);
|
||||
|
||||
// upfront reading of settings, as DBus server already relies on settings
|
||||
CContextSettings *settings = nullptr;
|
||||
QString dbusAddress;
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace BlackCore
|
||||
//! Slot logging for bool value from a specific context
|
||||
void logSlot(LogContext ctx, const char *func, bool boolValue) const;
|
||||
|
||||
//! shutdown
|
||||
//! Clean up (will be connected to signal QCoreApplication::aboutToQuit)
|
||||
void gracefulShutdown();
|
||||
|
||||
// ------- Context as interface, normal way to access a context
|
||||
|
||||
Reference in New Issue
Block a user