[X2Go-Commits] [x2goclient] 75/87: onmainwindow.cpp: Fix some QMessageBox usages. There are many more places that need fixing...

git-admin at x2go.org git-admin at x2go.org
Wed Mar 4 22:14:57 CET 2015


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

x2go pushed a commit to branch feature/cleanup
in repository x2goclient.

commit 8ebbd350c10d9693e8ee0c20d24d4cebc6a51d43
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Feb 16 04:14:58 2015 +0100

    onmainwindow.cpp: Fix some QMessageBox usages. There are many more places that need fixing...
---
 debian/changelog     |    2 ++
 src/onmainwindow.cpp |   20 ++++++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4c80fa6..afa00db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -240,6 +240,8 @@ x2goclient (4.0.3.2-0x2go1) unstable; urgency=medium
     - Enable -O2 in debug mode. Otherwise, debug mode would test different
       execution paths than release mode.
     - Add new UNUSED() macro to x2goutils.h and silence compiler warnings.
+    - Fix some QMessageBox usages. There are many more places that need
+      fixing...
 
  -- X2Go Release Manager <git-admin at x2go.org>  Thu, 19 Feb 2015 12:49:22 +0100
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 277e18c..3e41db8 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -2883,8 +2883,9 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa
                     "Somebody might be eavesdropping on you.\n"
                     "For security reasons, it is recommended to stop the connection.\n"
                     "Do you want to terminate the connection?\n" );
-        if ( !QMessageBox::warning( 0, tr( "Host key verification failed" ),
-                                    errMsg, tr( "Yes" ), tr( "No" ) ) != 0)
+        if (QMessageBox::warning (0, tr ("Host key verification failed"),
+                                  errMsg, QMessageBox::Yes | QMessageBox::No,
+                                  QMessageBox::No) == QMessageBox::Yes)
         {
             connection->writeKnownHosts(false);
             connection->wait();
@@ -2910,8 +2911,9 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa
                     "confuse your client into thinking the key does not exist. \n"
                     "For security reasons, it is recommended to stop the connection.\n"
                     "Do you want to terminate the connection?\n");
-        if ( !QMessageBox::warning( 0, tr( "Host key verification failed" ),
-                                    errMsg, tr( "Yes" ), tr( "No" ) ) != 0)
+        if (QMessageBox::warning (0, tr ("Host key verification failed"),
+                                  errMsg, QMessageBox::Yes | QMessageBox::No,
+                                  QMessageBox::No) == QMessageBox::Yes)
         {
             connection->writeKnownHosts(false);
             connection->wait();
@@ -2952,7 +2954,9 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa
         break;
     }
 
-    if ( QMessageBox::warning ( this, tr ( "Host key verification failed" ),errMsg,tr ( "Yes" ), tr ( "No" ) ) !=0 )
+    if (QMessageBox::warning (this, tr ("Host key verification failed"),
+                              errMsg, QMessageBox::Yes | QMessageBox::No,
+                              QMessageBox::No) == QMessageBox::No)
     {
         connection->writeKnownHosts(false);
         connection->wait();
@@ -2994,9 +2998,9 @@ void ONMainWindow::slotSshUserAuthError ( QString error )
         trayQuit();
     }
 
-    QMessageBox::critical ( 0l,tr ( "Authentication failed" ),error,
-                            QMessageBox::Ok,
-                            QMessageBox::NoButton );
+    QMessageBox::critical (0l, tr ("Authentication failed"),
+                           error, QMessageBox::Ok,
+                           QMessageBox::NoButton);
     setEnabled ( true );
     passForm->setEnabled ( true );
     slotShowPassForm();

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


More information about the x2go-commits mailing list