[X2Go-Commits] [x2goclient] 02/02: Fix multiply creation of modmap timer (OS_DARWIN).

git-admin at x2go.org git-admin at x2go.org
Tue Feb 17 12:18:08 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit ae6efce6e6d7e28fccad9d9a786c62b02f73ecaf
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Tue Feb 17 12:17:57 2015 +0100

    Fix multiply creation of modmap timer (OS_DARWIN).
---
 debian/changelog |    1 +
 onmainwindow.cpp |   23 ++++++++++++++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 14c1bca..102a564 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ x2goclient (4.0.3.2-0x2go1) UNRELEASED; urgency=medium
     - Fix placement of session folders in session card column. (Fixes: #681).
     - Send empty message in x2gohelper to stop AppStarting cursor. (Fixes: #616).
     - Reformat onmainwindow.cpp
+    - Fix multiply creation of modmap timer (OS_DARWIN).
 
   [ Mike Gabriel ]
   * New upstream release (4.0.3.2):
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 5bb4210..b6922e8 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -192,6 +192,9 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent )
     isPassShown=true;
     readExportsFrom=QString::null;
     spoolTimer=0l;
+#ifdef Q_OS_DARWIN
+    modMapTimer=0;
+#endif
     ldapOnly=false;
     embedControlChanged=false;
     statusString=tr ( "connecting" );
@@ -5463,9 +5466,12 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus )
 {
 
 #ifdef Q_OS_DARWIN
-    disconnect(modMapTimer, SIGNAL(timeout()), this, SLOT(slotSetModMap()));
-    delete modMapTimer;
-    modMapTimer=0;
+    if(modMapTimer)
+    {
+        disconnect(modMapTimer, SIGNAL(timeout()), this, SLOT(slotSetModMap()));
+        delete modMapTimer;
+        modMapTimer=0;
+    }
     kbMap=QString::null;
 //fixes bug, when mainwindow inputs not accepting focus under mac
     setFocus();
@@ -5725,10 +5731,13 @@ void ONMainWindow::slotProxyStderr()
         }
         sbSusp->setToolTip ( tr ( "Suspend" ) );
 #ifdef Q_OS_DARWIN
-        modMapTimer=new QTimer(this);
-        connect(modMapTimer, SIGNAL(timeout()), this, SLOT (slotSetModMap()));
-        modMapTimer->start(10000);
-        slotSetModMap();
+        if(!modMapTimer)
+        {
+            modMapTimer=new QTimer(this);
+            connect(modMapTimer, SIGNAL(timeout()), this, SLOT (slotSetModMap()));
+            modMapTimer->start(10000);
+            slotSetModMap();
+        }
 #endif
         if ( newSession )
         {

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list