diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-06-19 13:10:57 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-06-23 15:08:05 +0200 |
commit | aca0e939b35053db96391629783d991a2e930b4f (patch) | |
tree | 8cdd3fa796a43ac76887952b12dcee11873ff9a7 /src/libs/installer/remoteclient.cpp | |
parent | b3f0887216226dd641e4297ac660f49a5e97c57d (diff) |
Initialize both client and server with default values.
Change-Id: I51934b0de77b1062153f5f60be44d4bcf4be5ee5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/libs/installer/remoteclient.cpp')
-rw-r--r-- | src/libs/installer/remoteclient.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/libs/installer/remoteclient.cpp b/src/libs/installer/remoteclient.cpp index 8bab64999..94fbc43da 100644 --- a/src/libs/installer/remoteclient.cpp +++ b/src/libs/installer/remoteclient.cpp @@ -40,12 +40,9 @@ **************************************************************************/ #include "remoteclient.h" - -#include "protocol.h" #include "remoteclient_p.h" #include <QElapsedTimer> -#include <QUuid> namespace QInstaller { @@ -60,8 +57,6 @@ static RemoteClientGuard *gGuard = remoteClientGuard(); RemoteClient::RemoteClient() : d_ptr(new RemoteClientPrivate(this)) { - Q_D(RemoteClient); - d->m_key = QUuid::createUuid().toString(); } RemoteClient::~RemoteClient() @@ -89,7 +84,7 @@ void RemoteClient::setAuthorizationKey(const QString &key) d->m_key = key; } -void RemoteClient::init(quint16 port, const QHostAddress &address, Mode mode) +void RemoteClient::init(quint16 port, const QHostAddress &address, Protocol::Mode mode) { Q_D(RemoteClient); d->init(port, address, mode); @@ -110,7 +105,8 @@ bool RemoteClient::connect(QTcpSocket *socket) const while ((socket->state() == QAbstractSocket::ConnectingState) && (stopWatch.elapsed() < 10000) && (!d->m_quit)) { --tries; - qApp->processEvents(); + if (!QCoreApplication::closingDown()) + qApp->processEvents(); continue; } if ((socket->state() != QAbstractSocket::ConnectedState) || d->m_quit) @@ -148,19 +144,19 @@ void RemoteClient::setActive(bool active) } } -void RemoteClient::setStartServerCommand(const QString &command, StartAs startAs) +void RemoteClient::setStartServerCommand(const QString &command, Protocol::StartAs startAs) { setStartServerCommand(command, QStringList(), startAs); } void RemoteClient::setStartServerCommand(const QString &command, const QStringList &arguments, - StartAs startAs) + Protocol::StartAs startAs) { Q_D(RemoteClient); d->maybeStopServer(); d->m_serverCommand = command; d->m_serverArguments = arguments; - d->m_startServerAsAdmin = startAs; + d->m_startServerAs = startAs; } } // namespace QInstaller |