From e8b54c512720f4b5fd4490f429c020323cd38904 Mon Sep 17 00:00:00 2001
From: sr
Date: Tue, 5 Feb 2013 19:11:10 +0100
Subject: ...
---
i18n/server/pvsmgr_ar_JO.ts | 36 ++++++++++++++++++------------------
i18n/server/pvsmgr_de_DE.ts | 36 ++++++++++++++++++------------------
i18n/server/pvsmgr_es_MX.ts | 36 ++++++++++++++++++------------------
i18n/server/pvsmgr_fr_FR.ts | 36 ++++++++++++++++++------------------
i18n/server/pvsmgr_pl_PL.ts | 36 ++++++++++++++++++------------------
src/server/mainwindow/mainwindow.cpp | 19 +++++++++++++++++--
src/server/mainwindow/mainwindow.h | 1 +
7 files changed, 108 insertions(+), 92 deletions(-)
diff --git a/i18n/server/pvsmgr_ar_JO.ts b/i18n/server/pvsmgr_ar_JO.ts
index a897589..19ae5ef 100644
--- a/i18n/server/pvsmgr_ar_JO.ts
+++ b/i18n/server/pvsmgr_ar_JO.ts
@@ -15,48 +15,48 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/i18n/server/pvsmgr_de_DE.ts b/i18n/server/pvsmgr_de_DE.ts
index 326374f..216f223 100644
--- a/i18n/server/pvsmgr_de_DE.ts
+++ b/i18n/server/pvsmgr_de_DE.ts
@@ -68,48 +68,48 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/i18n/server/pvsmgr_es_MX.ts b/i18n/server/pvsmgr_es_MX.ts
index 09b67f8..69a7c0d 100644
--- a/i18n/server/pvsmgr_es_MX.ts
+++ b/i18n/server/pvsmgr_es_MX.ts
@@ -271,48 +271,48 @@ Perform an unprojection or remove remote help to get a target.
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/i18n/server/pvsmgr_fr_FR.ts b/i18n/server/pvsmgr_fr_FR.ts
index a897589..19ae5ef 100644
--- a/i18n/server/pvsmgr_fr_FR.ts
+++ b/i18n/server/pvsmgr_fr_FR.ts
@@ -15,48 +15,48 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/i18n/server/pvsmgr_pl_PL.ts b/i18n/server/pvsmgr_pl_PL.ts
index a897589..19ae5ef 100644
--- a/i18n/server/pvsmgr_pl_PL.ts
+++ b/i18n/server/pvsmgr_pl_PL.ts
@@ -15,48 +15,48 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 9e89baa..0441f1d 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -353,6 +353,17 @@ void MainWindow::onButtonChat()
*/
}
+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;
+}
+
void MainWindow::prepareForProjection(Client * const from, Client * const to)
{
// Projection source is never allowed to be an active VNC viewer
@@ -576,7 +587,6 @@ void MainWindow::onClientConnected(Client* client)
qDebug("ListenServer told MainWindow about new connection");
connect(client, SIGNAL(authenticating(Client*, ClientLogin*)), this, SLOT(onClientAuthenticating(Client*, ClientLogin*)));
connect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
- connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)));
}
void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
@@ -619,7 +629,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*)));
+ connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)), Qt::QueuedConnection);
+ connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)), Qt::QueuedConnection);
bool hasActiveTutor = false;
ConnectionFrame *deadTutor = NULL;
bool anyClient = false;
@@ -711,6 +722,8 @@ void MainWindow::onClientAuthenticated(Client* client)
void MainWindow::onVncServerStateChange(Client* client)
{
+ if (!isValidClient(client)) // Check here because this slot is connected queued
+ return;
if (client->vncPort() > 0)
{
// VNC Server started on some client - start projection on all clients interested in that client's screen
@@ -763,6 +776,8 @@ void MainWindow::onVncServerStateChange(Client* client)
void MainWindow::onVncClientStateChange(Client* client)
{
+ if (!isValidClient(client)) // Check here because this slot is connected queued
+ return;
// If the client started projection, ignore event. Also if
// the source is not known (anymore), we cannot do anything meaningful here
if (client->isActiveVncClient() || client->currentProjectionSource() == 0)
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h
index 5905cf5..4ff41dc 100644
--- a/src/server/mainwindow/mainwindow.h
+++ b/src/server/mainwindow/mainwindow.h
@@ -39,6 +39,7 @@ private:
bool loadPosition(QSettings& settings, const QString& id, int& x, int& y);
void savePosition(ConnectionFrame *cf);
void prepareForProjection(Client * const from, Client * const to);
+ bool isValidClient(Client* client);
public:
MainWindow(QWidget *parent = 0);
--
cgit v1.2.3-55-g7522