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
This commit is contained in:
Enrico Forestieri 2009-05-11 22:03:52 +00:00
parent 96cc356249
commit c73eb3497a
3 changed files with 9 additions and 3 deletions

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

View 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) {

View 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, "\\", "\\\\"), "\"", "\\\"")
+ "\"";