forked from qt-creator/qt-creator
Control the lifetime of SshProcessManager
Make it possible to control when the SshProcessManager is being constructed / destructed. Expose public constructor. Since different singletons depend on each other, we need to control the order of creation and destruction of them. The order of creation is like that: 1. QCoreApplication 2. ProcessReaper 3. ProcessLauncher 4. SshConnectionManager The order of destruction must be opposite to the above. Change-Id: Ice07eb751cd61c03cb461816fa1b74ab040a53de Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include <extensionsystem/pluginspec.h>
|
||||
#include <qtsingleapplication.h>
|
||||
|
||||
#include <ssh/sshconnectionmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/fileutils.h>
|
||||
@@ -538,6 +540,7 @@ int main(int argc, char **argv)
|
||||
Utils::ProcessReaper processReaper;
|
||||
Utils::LauncherInterface::startLauncher();
|
||||
auto cleanup = qScopeGuard([] { Utils::LauncherInterface::stopLauncher(); });
|
||||
QSsh::SshConnectionManager sshConnectionManager;
|
||||
|
||||
const QStringList pluginArguments = app.arguments();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user