diff options
author | Björn Hagemeister | 2014-06-03 14:32:25 +0200 |
---|---|---|
committer | Björn Hagemeister | 2014-06-03 14:32:25 +0200 |
commit | de2c4f9c416c8c630d8f772cc4f5e9a3aae97842 (patch) | |
tree | 0358ffb84881c66711e95a9e7380c92a48c92ec6 /src/server/mainwindow/mainwindow.cpp | |
parent | Put searching for client with specific id into method, getClientFromId(int id). (diff) | |
parent | Remove MainWindow::isValidClient. Connect slots not queued. (diff) | |
download | pvs2-de2c4f9c416c8c630d8f772cc4f5e9a3aae97842.tar.gz pvs2-de2c4f9c416c8c630d8f772cc4f5e9a3aae97842.tar.xz pvs2-de2c4f9c416c8c630d8f772cc4f5e9a3aae97842.zip |
Merge branch 'master' of git.openslx.org:pvs2
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 087af24..d0487d4 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -480,23 +480,6 @@ void MainWindow::onSessionNameUpdate() } /***************************************************************************//** - * Check if given client is valid. - * And if that is the case return true. - * @param client - * @return If client is valid or not. - */ -bool MainWindow::isValidClient(Client* client) -{ - for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) - { - Client *c = (**it).client(); - if (c == client) - return true; - } - return false; -} - -/***************************************************************************//** * @brief MainWindow::changeProjection * @param from * @param mode @@ -796,8 +779,8 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request) void MainWindow::onClientAuthenticated(Client* client) { disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*))); - connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)), Qt::QueuedConnection); - connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)), Qt::QueuedConnection); + connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*))); + connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*))); bool hasActiveTutor = false; ConnectionFrame *existing = NULL; for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) @@ -883,8 +866,6 @@ void MainWindow::onClientAuthenticated(Client* client) */ void MainWindow::onVncServerStateChange(Client* client) { - if (!isValidClient(client)) // Check here because this slot is connected queued - return; if (client->isActiveVncServer()) { if (_mode == Mode::Broadcast) @@ -948,9 +929,6 @@ void MainWindow::onVncServerStateChange(Client* client) */ void MainWindow::onVncClientStateChange(Client* client) { - if (!isValidClient(client)) // Check here because this slot is connected queued - return; - // VNC Client stopped -> remove from watchers if (!client->isActiveVncClient()){ _watchers.remove(client->id()); |