[X2Go-Commits] [x2goclient] 15/59: onmainwindow.cpp: split up PATH value as printed in the error message box by a newline every 100 characters.

git-admin at x2go.org git-admin at x2go.org
Wed Jun 3 03:10:45 CEST 2015


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

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 2fa19557c81041744ef7ea89ec68c533fdd3a87c
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Jun 3 03:02:40 2015 +0200

    onmainwindow.cpp: split up PATH value as printed in the error message box by a newline every 100 characters.
    
    Makes it look less ugly and fixes truncation issues.
---
 debian/changelog     |    3 +++
 src/onmainwindow.cpp |    9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 03944c3..2700616 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,9 @@ x2goclient (4.0.4.1-0x2go1) UNRELEASED; urgency=low
     - onmainwindow.cpp: add more newlines to scdaemon error output. Use
       trayQuit() method to really quit the client.
     - onmainwindow.cpp: add debugging output for new scdaemon PATH value.
+    - onmainwindow.cpp: split up PATH value as printed in the error message
+      box by a newline every 100 characters. Makes it look less ugly and fixes
+      truncation issues.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Tue, 26 May 2015 21:42:09 +0200
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 2026bc3..64448b5 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -8447,7 +8447,14 @@ void ONMainWindow::slotScDaemonError (QProcess::ProcessError error) {
                 tmp_env = scDaemon->processEnvironment ();
             }
 
-            informative_text += tmp_env.value ("PATH", "unknown");
+            QString path_val = tmp_env.value ("PATH", "unknown");
+
+            /* Add a newline every 100 characters. */
+            for (std::size_t i = 100; i < path_val.size (); i += 100) {
+                path_val.insert (i, "\n");
+            }
+
+            informative_text += path_val;
             break;
         }
         case QProcess::Crashed: {

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