summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-06-03 14:29:54 +0200
committerManuel Schneider2014-06-03 14:29:54 +0200
commitc180dbc46d82aceadfe4a01af6000c12db703de8 (patch)
tree292b8fc7a8789265b654c06a21bf7917819e67f7 /src/server/mainwindow/mainwindow.cpp
parentMerge branch 'master' of git.openslx.org:pvs2 (diff)
downloadpvs2-c180dbc46d82aceadfe4a01af6000c12db703de8.tar.gz
pvs2-c180dbc46d82aceadfe4a01af6000c12db703de8.tar.xz
pvs2-c180dbc46d82aceadfe4a01af6000c12db703de8.zip
Remove MainWindow::isValidClient. Connect slots not queued.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp26
1 files changed, 2 insertions, 24 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());