diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-21 13:51:30 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2014-11-24 16:53:32 +0100 |
commit | bdb0247bea51ed296ae31ea2efaff3380607a00e (patch) | |
tree | aff156b04a4847bf03bd8ce62541945d167d697f /src/libs/installer/remoteclient.cpp | |
parent | b34f41a3bb527430f66f349bf612e6978a1c2338 (diff) |
Fix crash experienced while closing the application.
Signal the keep alive object that we are going to shutdown.
This needs to be done because the parent object is a global
static and the order of destruction is unknown.
The revised code of KeepAliveObject::start() method fixes
one of several warnings ("QSocketNotifier: socket notifiers
cannot be {enabled/disabled} from another thread").
Change-Id: I68e2d507e697a5d94bdc73f016601affc9913846
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/remoteclient.cpp')
-rw-r--r-- | src/libs/installer/remoteclient.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libs/installer/remoteclient.cpp b/src/libs/installer/remoteclient.cpp index 92a5b51e9..ce317847f 100644 --- a/src/libs/installer/remoteclient.cpp +++ b/src/libs/installer/remoteclient.cpp @@ -63,6 +63,18 @@ RemoteClient &RemoteClient::instance() return gGuard->client; } +quint16 RemoteClient::port() const +{ + Q_D(const RemoteClient); + return d->m_port; +} + +QHostAddress RemoteClient::address() const +{ + Q_D(const RemoteClient); + return d->m_address; +} + QString RemoteClient::authorizationKey() const { Q_D(const RemoteClient); @@ -83,6 +95,12 @@ void RemoteClient::init(quint16 port, const QHostAddress &address, Protocol::Mod d->init(port, address, mode); } +void RemoteClient::shutdown() +{ + Q_D(RemoteClient); + d->shutdown(); +} + bool RemoteClient::connect(QTcpSocket *socket) const { Q_D(const RemoteClient); |