[X2Go-Commits] [x2goclient] 258/276: src/x2goutils.{cpp, h}: make find_binary () and add_to_path () available on all UNIX-based operating systems.

git-admin at x2go.org git-admin at x2go.org
Sat Dec 31 01:35:39 CET 2016


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

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

commit ec37ba954e27b69d2827926e4198a6a55d1cee25
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Nov 28 16:33:38 2016 +0100

    src/x2goutils.{cpp,h}: make find_binary () and add_to_path () available on all UNIX-based operating systems.
    
    We will need it for sftp-server discovery.
---
 debian/changelog  |    3 +++
 src/x2goutils.cpp |    4 +++-
 src/x2goutils.h   |    4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f63d701..567c858 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -470,6 +470,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/onmainwindow.cpp: use QFileInfo to get the key file's basename in
       exportDirs () instead of the old, potentially faulty string replace
       dance.
+    - src/x2goutils.{cpp,h}: make find_binary () and add_to_path () available
+      on all UNIX-based operating systems. We will need it for sftp-server
+      discovery.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp
index f218355..542ae7e 100644
--- a/src/x2goutils.cpp
+++ b/src/x2goutils.cpp
@@ -207,7 +207,9 @@ void show_XQuartz_generic_error (const QString &main_error, const QString &addit
                                             "or\n"
                                             "<center><b>/Applications/Utilities/XQuartz.app</b></center>"));
 }
+#endif /* defined (Q_OS_DARWIN) */
 
+#ifdef Q_OS_UNIX
 QString add_to_path (const QString &orig_path, const QStringList &add, const bool back) {
   QString ret = orig_path;
   std::vector<bool> found;
@@ -335,4 +337,4 @@ QString find_binary (const QString &path, const QString &binary_name) {
 
   return (ret);
 }
-#endif /* defined (Q_OS_DARWIN) */
+#endif /* defined (Q_OS_UNIX) */
diff --git a/src/x2goutils.h b/src/x2goutils.h
index dd7613c..f489439 100644
--- a/src/x2goutils.h
+++ b/src/x2goutils.h
@@ -45,7 +45,9 @@ bool font_is_monospaced (const QFont &font);
 void show_XQuartz_not_found_error ();
 void show_XQuartz_start_error ();
 void show_XQuartz_generic_error (const QString &main_error, const QString &additional_info);
+#endif /* defined (Q_OS_DARWIN) */
 
+#ifdef Q_OS_UNIX
 /*
  * Add a list of strings to a PATH value.
  *
@@ -65,6 +67,6 @@ QString add_to_path (const QString &orig_path, const QStringList &add, const boo
  * Iff path is empty, (only) the current working dir is searched.
  */
 QString find_binary (const QString &path, const QString &binary_name);
-#endif /* defined (Q_OS_DARWIN) */
+#endif /* defined (Q_OS_UNIX) */
 
 #endif /* !defined (X2GOUTILS_H) */

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