From c180dbc46d82aceadfe4a01af6000c12db703de8 Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Tue, 3 Jun 2014 14:29:54 +0200 Subject: Remove MainWindow::isValidClient. Connect slots not queued. --- src/server/mainwindow/mainwindow.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'src/server/mainwindow/mainwindow.cpp') diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 32613f9..489800f 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -466,23 +466,6 @@ void MainWindow::onSessionNameUpdate() _sessionNameLabel->setText(tr("Session Name: %1 [click to edit]").arg(Global::sessionName())); } -/***************************************************************************//** - * 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::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) - { - Client *c = (**it).client(); - if (c == client) - return true; - } - return false; -} - /***************************************************************************//** * @brief MainWindow::changeProjection * @param from @@ -783,8 +766,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::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) @@ -870,8 +853,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) @@ -935,9 +916,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()); -- cgit v1.2.3-55-g7522