diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-26 14:39:17 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2014-11-28 11:14:07 +0100 |
commit | 5b5ee638f65412bcff020c4e0869bc48edce0daa (patch) | |
tree | 857b3fe82a0671d5037a235799edfa4211e76177 /src/libs/installer/remoteserver.cpp | |
parent | afef6d5d5a67bc47023ee41173106568c154a1ce (diff) |
Remove pointer, superfluous members. Use signals and slots.
Use signals and slots to tell about the shutdown request.
Instead of passing around the server pointer, give the port
and key as parameter.
Change-Id: I0ad1667aa1caee4ffdee8b6951336f2254974810
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/remoteserver.cpp')
-rw-r--r-- | src/libs/installer/remoteserver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/installer/remoteserver.cpp b/src/libs/installer/remoteserver.cpp index c3ec93c85..eeab37c6e 100644 --- a/src/libs/installer/remoteserver.cpp +++ b/src/libs/installer/remoteserver.cpp @@ -71,10 +71,11 @@ void RemoteServer::start() if (d->m_tcpServer) return; - d->m_tcpServer = new TcpServer(d->m_port, d->m_address, this); + d->m_tcpServer = new TcpServer(d->m_port, d->m_key); d->m_tcpServer->moveToThread(&d->m_thread); connect(&d->m_thread, SIGNAL(finished()), d->m_tcpServer, SLOT(deleteLater())); - connect (d->m_tcpServer, SIGNAL(newIncomingConnection()), this, SLOT(restartWatchdog())); + connect(d->m_tcpServer, SIGNAL(newIncomingConnection()), this, SLOT(restartWatchdog())); + connect(d->m_tcpServer, SIGNAL(shutdownRequested()), this, SLOT(deleteLater())); d->m_thread.start(); if (d->m_mode == Protocol::Mode::Production) { |