From: Enrico Forestieri Date: Mon, 11 May 2009 22:03:52 +0000 (+0000) Subject: Fix QProcess code on posix systems and reenable it by default, in order X-Git-Tag: 2.0.0~6603 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c73eb3497aa3e34b2536cf44071053d30d5c5166;p=features.git Fix QProcess code on posix systems and reenable it by default, in order to catch early possible problems. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29634 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/support/Package.cpp b/src/support/Package.cpp index 5d1fff44ab..aa90f6bd20 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -146,7 +146,7 @@ Package::Package(string const & command_line_arg0, FileName const configure_script(addName(system_support().absFilename(), "configure.py")); configure_command_ = os::python() + ' ' + - quoteName(configure_script.toFilesystemEncoding()) + + quoteName(configure_script.toFilesystemEncoding(), quote_python) + with_version_suffix(); LYXERR(Debug::INIT, "\n" diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index bed1f45f50..20813e7948 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -23,7 +23,7 @@ #include -#define DISABLE_EVALUATE_QPROCESS +#define USE_QPROCESS using namespace std; @@ -42,7 +42,7 @@ static void killProcess(QProcess * p) // Reuse of instance int Systemcall::startscript(Starttype how, string const & what) { -#ifdef DISABLE_EVALUATE_QPROCESS +#ifndef USE_QPROCESS string command = what; if (how == DontWait) { diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 69a6c4d7e5..4ee6247e4f 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -51,6 +51,8 @@ using namespace std; +#define USE_QPROCESS + namespace lyx { namespace support { @@ -136,9 +138,13 @@ string const quoteName(string const & name, quote_style style) // filenames to child processes if possible. We store them in // a python script instead, where we don't have these // limitations. +#ifndef USE_QPROCESS return (os::shell() == os::UNIX) ? '\'' + name + '\'': '"' + name + '"'; +#else + return '"' + name + '"'; +#endif case quote_python: return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"") + "\"";