diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-11-21 13:35:57 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-11-21 13:35:57 +0100 |
commit | 750dc6ff1eb7620c62589c6b7bda5e78e641f8a9 (patch) | |
tree | b9c4cef651c56fbf8b6c51a09ba072a644ecff53 /resource/listener.cpp | |
parent | 0b2fdc4b734319bdeb9df6ad1420e75cea28b22e (diff) | |
download | sink-750dc6ff1eb7620c62589c6b7bda5e78e641f8a9.tar.gz sink-750dc6ff1eb7620c62589c6b7bda5e78e641f8a9.zip |
add names to clients
Diffstat (limited to 'resource/listener.cpp')
-rw-r--r-- | resource/listener.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resource/listener.cpp b/resource/listener.cpp index e68b3d4..ae16da7 100644 --- a/resource/listener.cpp +++ b/resource/listener.cpp | |||
@@ -47,7 +47,7 @@ void Listener::acceptConnection() | |||
47 | } | 47 | } |
48 | 48 | ||
49 | Console::main()->log("Got a connection"); | 49 | Console::main()->log("Got a connection"); |
50 | Client client(connection); | 50 | Client client("Unknown Client" /*fixme: actual names!*/, connection); |
51 | m_connections << client; | 51 | m_connections << client; |
52 | connect(connection, &QLocalSocket::disconnected, | 52 | connect(connection, &QLocalSocket::disconnected, |
53 | this, &Listener::clientDropped); | 53 | this, &Listener::clientDropped); |
@@ -65,8 +65,8 @@ void Listener::clientDropped() | |||
65 | QMutableListIterator<Client> it(m_connections); | 65 | QMutableListIterator<Client> it(m_connections); |
66 | while (it.hasNext()) { | 66 | while (it.hasNext()) { |
67 | const Client &client = it.next(); | 67 | const Client &client = it.next(); |
68 | if (client.m_socket == connection) { | 68 | if (client.socket == connection) { |
69 | Console::main()->log(" dropped..."); | 69 | Console::main()->log(QString(" dropped... %1").arg(client.name)); |
70 | it.remove(); | 70 | it.remove(); |
71 | break; | 71 | break; |
72 | } | 72 | } |