#include "support/os.h"
#include "support/ProgressInterface.h"
+#include "LyX.h"
#include "LyXRC.h"
#include <cstdlib>
bool process_events)
{
string const what_ss = commandPrep(what);
- LYXERR(Debug::INFO,"Running: " << what_ss);
+ if (verbose)
+ lyxerr << "\nRunning: " << what_ss << endl;
+ else
+ LYXERR(Debug::INFO,"Running: " << what_ss);
string infile;
string outfile;
}
-SystemcallPrivate::SystemcallPrivate(std::string const & sf,
- std::string const & of,
- std::string const & ef) :
- process_(new QProcess),
- out_index_(0),
- err_index_(0),
- in_file_(sf),
- out_file_(of),
- err_file_(ef),
- process_events_(false)
+SystemcallPrivate::SystemcallPrivate(std::string const & sf, std::string const & of,
+ std::string const & ef)
+ : state(Error), process_(new QProcess), out_index_(0), err_index_(0),
+ in_file_(sf), out_file_(of), err_file_(ef), process_events_(false)
{
if (!in_file_.empty())
process_->setStandardInputFile(QString::fromLocal8Bit(in_file_.c_str()));
connect(process_, SIGNAL(readyReadStandardOutput()), SLOT(stdOut()));
connect(process_, SIGNAL(readyReadStandardError()), SLOT(stdErr()));
+#if QT_VERSION >= 0x050600
+ connect(process_, SIGNAL(errorOccurred(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError)));
+#else
connect(process_, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError)));
+#endif
connect(process_, SIGNAL(started()), this, SLOT(processStarted()));
connect(process_, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processFinished(int, QProcess::ExitStatus)));
}