[X2Go-Commits] [x2goclient] 17/18: src/sshmasterconnection.cpp: port more occurrences of "QString to C string" akin to 1b21d75f2c10609f3586f5b5e0b4ceb7fca83fdd.

git-admin at x2go.org git-admin at x2go.org
Wed Feb 8 20:50:27 CET 2017


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

x2go pushed a commit to branch feature/libssh-api-upgrade
in repository x2goclient.

commit fc84c24b51e3d0c9109e58639621294677074308
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Feb 2 08:06:03 2017 +0100

    src/sshmasterconnection.cpp: port more occurrences of "QString to C string" akin to 1b21d75f2c10609f3586f5b5e0b4ceb7fca83fdd.
---
 debian/changelog            |    2 ++
 src/sshmasterconnection.cpp |   31 ++++++++++++++++++-------------
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 058393e..789747b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -610,6 +610,8 @@ x2goclient (4.1.0.0-0x2go1) UNRELEASED; urgency=medium
       and thus deduplicate error translation messages. Also re-add the full
       stop sign and remove it when needed for x2goDebug.
     - src/sshmasterconnection.cpp: fix up some debug strings.
+    - src/sshmasterconnection.cpp: port more occurrences of "QString to C
+      string" akin to 1b21d75f2c10609f3586f5b5e0b4ceb7fca83fdd.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.1.0.0):
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index c2e8659..bd05809 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -541,16 +541,20 @@ void SshMasterConnection::run()
     }
 
 #ifdef Q_OS_WIN
-    ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, (mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit());
+    {
+        QByteArray tmp_BA = (mainWnd->getHomeDirectory () + "/ssh").toLocal8Bit ();
+
+        ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data ());
 #ifdef DEBUG
-    x2goDebug<<"Setting SSH directory to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit();
+        x2goDebug << "Setting SSH directory to " << tmp_BA.data ();
 #endif
-    if (kerberos)
-    {
-        parseKnownHosts();
+        if (kerberos)
+        {
+            parseKnownHosts();
+        }
     }
-
 #endif
+
     ssh_options_set(my_ssh_session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
 
     ssh_options_set(my_ssh_session, SSH_OPTIONS_TIMEOUT, &timeout);
@@ -652,17 +656,18 @@ void SshMasterConnection::run()
         return;
     }
 
-#ifdef Q_OS_WIN
-    ssh_options_set ( my_ssh_session, SSH_OPTIONS_USER, user.toLocal8Bit() );
-#else
-    ssh_options_set ( my_ssh_session, SSH_OPTIONS_USER, user.toLatin1() );
-#endif
+    QByteArray tmp_BA = user.toLocal8Bit ();
+    ssh_options_set ( my_ssh_session, SSH_OPTIONS_USER, tmp_BA.data () );
 
 #ifdef Q_OS_WIN
-    ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, (mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit());
+    {
+        QByteArray tmp_BA = (mainWnd->getHomeDirectory () + "/ssh").toLocal8Bit ();
+
+        ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data () );
 #ifdef DEBUG
-    x2goDebug<<"Setting SSH directory to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit();
+        x2goDebug << "Setting SSH directory to " << tmp_BA.data ();
 #endif
+    }
 #endif
 
     if ( userAuth() )

--
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