]> git.lyx.org Git - lyx.git/blobdiff - src/support/Systemcall.cpp
Remove unneeded mutable keywords
[lyx.git] / src / support / Systemcall.cpp
index 2d04fd6f363ae6a138e6ba59234593dd0cd93f9d..467f04bd8409db36c1f5fc60780082eb964bab1a 100644 (file)
@@ -71,7 +71,7 @@ public:
 
        void warning(QString const &, QString const &) {}
        void toggleWarning(QString const &, QString const &, QString const &) {}
-       void error(QString const &, QString const &) {}
+       void error(QString const &, QString const &, QString const &) {}
        void information(QString const &, QString const &) {}
        int prompt(docstring const &, docstring const &, int default_but, int,
                   docstring const &, docstring const &) { return default_but; }
@@ -103,13 +103,8 @@ ProgressInterface * ProgressInterface::instance()
 int Systemcall::startscript(Starttype how, string const & what,
                            std::string const & path, bool /*process_events*/)
 {
-       string const python_call = "python -tt";
-       string command = to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path)));
-
-       if (prefixIs(what, python_call))
-               command += os::python() + what.substr(python_call.length());
-       else
-               command += what;
+       string command = to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path)))
+                      + commandPrep(what);
 
        if (how == DontWait) {
                switch (os::shell()) {
@@ -240,13 +235,14 @@ string const parsecmd(string const & incmd, string & infile, string & outfile,
 int Systemcall::startscript(Starttype how, string const & what,
                            string const & path, bool process_events)
 {
-       LYXERR(Debug::INFO,"Running: " << what);
+       string const what_ss = commandPrep(what);
+       LYXERR(Debug::INFO,"Running: " << what_ss);
 
        string infile;
        string outfile;
        string errfile;
        QString const cmd = QString::fromLocal8Bit(
-                       parsecmd(what, infile, outfile, errfile).c_str());
+                       parsecmd(what_ss, infile, outfile, errfile).c_str());
 
        SystemcallPrivate d(infile, outfile, errfile);