]> git.lyx.org Git - features.git/commitdiff
Fix QProcess code on posix systems and reenable it by default, in order
authorEnrico Forestieri <forenr@lyx.org>
Mon, 11 May 2009 22:03:52 +0000 (22:03 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 11 May 2009 22:03:52 +0000 (22:03 +0000)
to catch early possible problems.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29634 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/Package.cpp
src/support/Systemcall.cpp
src/support/filetools.cpp

index 5d1fff44abfb9f9cda1a258c3bed7e82de04b349..aa90f6bd208992bbc6bc667f4d792ef234167a48 100644 (file)
@@ -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, "<package>\n"
index bed1f45f500df712b5dd11e5eb17b563760c274d..20813e794876acb2d9322e67c14cf25d1f4562f6 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <QProcess>
 
-#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) {
index 69a6c4d7e534bdfa36ea87585b9cfbc0688a331c..4ee6247e4fc08649e9c4eeda5040e39f10c8c193 100644 (file)
@@ -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, "\\", "\\\\"), "\"", "\\\"")
                     + "\"";