summaryrefslogtreecommitdiffstats
path: root/src/client/net
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-26 18:31:21 +0200
committerSimon Rettberg2016-10-26 18:31:21 +0200
commite19dcdfed2da5405c714bc0af56927fa8e4c2442 (patch)
treef50f9223c03c2af4e5e3b72b7d69618e0148220a /src/client/net
parentFix GUI translation: Don't create persistent objects on stack :/ (diff)
downloadpvs2-e19dcdfed2da5405c714bc0af56927fa8e4c2442.tar.gz
pvs2-e19dcdfed2da5405c714bc0af56927fa8e4c2442.tar.xz
pvs2-e19dcdfed2da5405c714bc0af56927fa8e4c2442.zip
[client] Move ServerConnection instance to ClientApp
Diffstat (limited to 'src/client/net')
-rw-r--r--src/client/net/serverconnection.cpp2
-rw-r--r--src/client/net/serverconnection.h2
-rw-r--r--src/client/net/serverdiscovery.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp
index 02c35fd..448b200 100644
--- a/src/client/net/serverconnection.cpp
+++ b/src/client/net/serverconnection.cpp
@@ -84,7 +84,7 @@ void ServerConnection::disconnectFromServer()
if (_timerDelete == 0) {
VncServer::instance()->stop();
emit closeVnc();
- emit disconnected();
+ emit disconnected(this);
_timerDelete = startTimer(500);
qDebug("Closing connection to server");
if (_socket != NULL) {
diff --git a/src/client/net/serverconnection.h b/src/client/net/serverconnection.h
index e299a04..c36b238 100644
--- a/src/client/net/serverconnection.h
+++ b/src/client/net/serverconnection.h
@@ -63,7 +63,7 @@ signals:
void openVnc(const QString& host, int port, const QString& passwd, bool ro, bool fullscreen, const QString& caption, const int clientId, const QByteArray& rawThumb);
void closeVnc();
void stateChange(ConnectWindow::ConnectionState state);
- void disconnected();
+ void disconnected(ServerConnection* connection);
void attentionChanged(bool state);
};
diff --git a/src/client/net/serverdiscovery.cpp b/src/client/net/serverdiscovery.cpp
index 4a69e91..99a0dcd 100644
--- a/src/client/net/serverdiscovery.cpp
+++ b/src/client/net/serverdiscovery.cpp
@@ -150,7 +150,7 @@ void ServerDiscovery::onUdpReadyRead()
}
const qint64 size = _discoverySocket.readDatagram(data, UDPBUFSIZ, &addr, &port);
- if (size <= 0) //|| _connection != NULL) // TODO CHECK
+ if (size <= 0) //|| clientApp->connection() != NULL) // TODO CHECK
continue;
_packet.reset();