From 64d49f097f25dd019345a7e913e1c4cf8188e168 Mon Sep 17 00:00:00 2001 From: kh Date: Mon, 24 Nov 2014 17:39:06 +0100 Subject: Implement a way to start the server in debug mode and API cleanup. 1; Passing debug as first argument to the starting server does not start the server side so the server keeps running in an endless loop. This makes it far easier to attach a debugger. 2; API cleanup and unify init function to take port, key, and mode. The address was never able to be changed anyway, so stop passing them around. Change-Id: I2a847f009ed1557a5e136e2b0006de5c62426da2 Reviewed-by: Kai Koehne --- src/libs/installer/packagemanagercore_p.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/libs/installer/packagemanagercore_p.cpp') diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 3c1c8b674..45a41d301 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -50,7 +50,6 @@ #include "qprocesswrapper.h" #include "protocol.h" #include "qsettingswrapper.h" -#include "remoteclient.h" #include "installercalculator.h" #include "uninstallercalculator.h" @@ -242,17 +241,6 @@ PackageManagerCorePrivate::PackageManagerCorePrivate(PackageManagerCore *core, q m_performedOperationsOld.append(op.take()); } - // Creates and initializes a remote client, makes us get admin rights for QFile, QSettings - // and QProcess operations. Init needs to called before we can get the real authorization key. - int port = 30000 + qrand() % 1000; - RemoteClient::instance().init(port, - QHostAddress(QLatin1String(Protocol::DefaultHostAddress)), Protocol::Mode::Release); - RemoteClient::instance().setStartServerCommand(QCoreApplication::applicationFilePath(), - QStringList() << QLatin1String("--startserver") << QString::fromLatin1("%1,%2") - .arg(port) - .arg(RemoteClient::instance().authorizationKey()), - Protocol::StartAs::SuperUser); - connect(this, SIGNAL(installationStarted()), m_core, SIGNAL(installationStarted())); connect(this, SIGNAL(installationFinished()), m_core, SIGNAL(installationFinished())); connect(this, SIGNAL(uninstallationStarted()), m_core, SIGNAL(uninstallationStarted())); -- cgit v1.2.3