mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
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:
parent
96cc356249
commit
c73eb3497a
@ -146,7 +146,7 @@ Package::Package(string const & command_line_arg0,
|
|||||||
|
|
||||||
FileName const configure_script(addName(system_support().absFilename(), "configure.py"));
|
FileName const configure_script(addName(system_support().absFilename(), "configure.py"));
|
||||||
configure_command_ = os::python() + ' ' +
|
configure_command_ = os::python() + ' ' +
|
||||||
quoteName(configure_script.toFilesystemEncoding()) +
|
quoteName(configure_script.toFilesystemEncoding(), quote_python) +
|
||||||
with_version_suffix();
|
with_version_suffix();
|
||||||
|
|
||||||
LYXERR(Debug::INIT, "<package>\n"
|
LYXERR(Debug::INIT, "<package>\n"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
#define DISABLE_EVALUATE_QPROCESS
|
#define USE_QPROCESS
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ static void killProcess(QProcess * p)
|
|||||||
// Reuse of instance
|
// Reuse of instance
|
||||||
int Systemcall::startscript(Starttype how, string const & what)
|
int Systemcall::startscript(Starttype how, string const & what)
|
||||||
{
|
{
|
||||||
#ifdef DISABLE_EVALUATE_QPROCESS
|
#ifndef USE_QPROCESS
|
||||||
string command = what;
|
string command = what;
|
||||||
|
|
||||||
if (how == DontWait) {
|
if (how == DontWait) {
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#define USE_QPROCESS
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace support {
|
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
|
// filenames to child processes if possible. We store them in
|
||||||
// a python script instead, where we don't have these
|
// a python script instead, where we don't have these
|
||||||
// limitations.
|
// limitations.
|
||||||
|
#ifndef USE_QPROCESS
|
||||||
return (os::shell() == os::UNIX) ?
|
return (os::shell() == os::UNIX) ?
|
||||||
'\'' + name + '\'':
|
'\'' + name + '\'':
|
||||||
'"' + name + '"';
|
'"' + name + '"';
|
||||||
|
#else
|
||||||
|
return '"' + name + '"';
|
||||||
|
#endif
|
||||||
case quote_python:
|
case quote_python:
|
||||||
return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"")
|
return "\"" + subst(subst(name, "\\", "\\\\"), "\"", "\\\"")
|
||||||
+ "\"";
|
+ "\"";
|
||||||
|
Loading…
Reference in New Issue
Block a user