diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 26 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.h | 1 |
2 files changed, 2 insertions, 25 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()); diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h index 1c15e32..b75d082 100644 --- a/src/server/mainwindow/mainwindow.h +++ b/src/server/mainwindow/mainwindow.h @@ -75,7 +75,6 @@ private: ConnectionFrame* createFrame(); bool loadPosition(QSettings& settings, const QString& id, int& x, int& y); void savePosition(ConnectionFrame *cf); - bool isValidClient(Client* client); void changeProjection(Client *from, Mode mode = Mode::Broadcast, Client *to = NULL); void tellClientCurrentSituation(Client* client); bool isManagerMachine(Client* client); |