diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-24 17:39:06 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2014-11-26 14:49:23 +0100 |
commit | 64d49f097f25dd019345a7e913e1c4cf8188e168 (patch) | |
tree | da6670298b59bd04db7d1f5dc62a9ceb79082b7b /src/libs/installer/packagemanagercore_p.cpp | |
parent | d18b9696e573aa7b3f38784f6c5764b9fe6fd81b (diff) |
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 <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagercore_p.cpp')
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
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())); |