This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient.
commit e162d32a82ff97bc0971dd0fce32cf992c4ab2d7 Author: Mihai Moldovan <io...@ionic.de> Date: Fri May 6 23:49:35 2016 +0200 src/pulsemanager.cpp: hide Windows-only code behind #ifdefs. Otherwise we'll get compile failures on non-Windows platforms. --- debian/changelog | 2 ++ src/pulsemanager.cpp | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1ceb4e1..d951edd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -272,6 +272,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: make use of new PulseManager::start () behavior and always use it, no matter whether server is up already or not. - src/pulsemanager.cpp: fix compile error due to typo. + - src/pulsemanager.cpp: hide Windows-only code behind #ifdefs. Otherwise + we'll get compile failures on non-Windows platforms. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index ca7926c..21049ca 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -176,6 +176,11 @@ void PulseManager::start_osx () { } void PulseManager::start_win () { +/* + * Some code in here is Windows-specific and will lead to compile + * failures on other platforms. Make this a stub for everything non-Windows. + */ +#ifdef Q_OS_WIN server_args_ = QStringList (); server_args_ << "--exit-idle-time=-1" << "-n" << "-F" << QDir::toNativeSeparators (QDir (pulse_dir_.absolutePath () @@ -215,6 +220,7 @@ void PulseManager::start_win () { start_generic (); } +#endif /* defined (Q_OS_WIN) */ } void PulseManager::start_linux () { @@ -419,11 +425,18 @@ bool PulseManager::generate_server_config () { * The absolute path works with at least 5.0 and 6.0. */ if (pulse_version_major_ > 2) { - QString tmp_auth_cookie = QDir::toNativeSeparators (wapiShortFileName (pulse_dir_.absolutePath ())) - + "\\.pulse-cookie"; + QString clean_pulse_dir = pulse_dir_.absolutePath (); + +#ifdef Q_OS_WIN + clean_pulse_dir = wapiShortFileName (clean_pulse_dir); +#endif /* defined (Q_OS_WIN) */ + QString tmp_auth_cookie = QDir::toNativeSeparators (clean_pulse_dir + "/.pulse-cookie"); + +#ifdef Q_OS_WIN /* Double backslashes are required in config.pa. */ tmp_auth_cookie.replace ("\\", "\\\\"); +#endif /* defined (Q_OS_WIN) */ config_tmp_file_stream << " auth-cookie=" + tmp_auth_cookie; } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits