summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/mainwindow/mainwindow.cpp26
-rw-r--r--src/server/mainwindow/mainwindow.h1
2 files changed, 2 insertions, 25 deletions
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
@@ -467,23 +467,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
@@ -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<ConnectionFrame*>::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());
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h
index a15c12f..7297f6d 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);