diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 3 | ||||
-rw-r--r-- | src/libs/installer/protocol.h | 2 | ||||
-rw-r--r-- | src/libs/installer/remoteclient_p.h | 2 | ||||
-rw-r--r-- | src/libs/installer/remoteserver_p.h | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index e65e3aea7..5944e4100 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -245,7 +245,8 @@ PackageManagerCorePrivate::PackageManagerCorePrivate(PackageManagerCore *core, q // 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::LocalHost, Protocol::Mode::Release); + 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) diff --git a/src/libs/installer/protocol.h b/src/libs/installer/protocol.h index d99da20e6..2aee34769 100644 --- a/src/libs/installer/protocol.h +++ b/src/libs/installer/protocol.h @@ -49,7 +49,7 @@ enum struct StartAs { }; const unsigned short DefaultPort = 39999; -const int DefaultHostAddress = 2; // QHostAddress::LocalHost +const char DefaultHostAddress[] = "127.0.0.1"; const char DefaultAuthorizationKey[] = "DefaultAuthorizationKey"; const char Create[] = "Create"; diff --git a/src/libs/installer/remoteclient_p.h b/src/libs/installer/remoteclient_p.h index f4e8e5ffb..515ce52c8 100644 --- a/src/libs/installer/remoteclient_p.h +++ b/src/libs/installer/remoteclient_p.h @@ -108,7 +108,7 @@ public: RemoteClientPrivate(RemoteClient *parent) : q_ptr(parent) , m_mutex(QMutex::Recursive) - , m_address(Protocol::DefaultHostAddress) + , m_address(QLatin1String(Protocol::DefaultHostAddress)) , m_port(Protocol::DefaultPort) , m_startServerAs(Protocol::StartAs::User) , m_serverStarted(false) diff --git a/src/libs/installer/remoteserver_p.h b/src/libs/installer/remoteserver_p.h index 3e56e593c..d49ae5ca5 100644 --- a/src/libs/installer/remoteserver_p.h +++ b/src/libs/installer/remoteserver_p.h @@ -96,7 +96,7 @@ public: , m_tcpServer(0) , m_key(QLatin1String(Protocol::DefaultAuthorizationKey)) , m_port(Protocol::DefaultPort) - , m_address(Protocol::DefaultHostAddress) + , m_address(QLatin1String(Protocol::DefaultHostAddress)) , m_mode(Protocol::Mode::Debug) , m_watchdog(new QTimer) { |