commit 9f92fc92bdd41c367b0975454a01c15403d51a60 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Fri Mar 12 12:14:42 2021 +0100
Yet another deprecation fix (this is the last one I am aware of) --- src/support/Systemcall.cpp | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index 815223d..00adbf8 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -368,6 +368,15 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path, string const & lpath, bool detached) { cmd_ = cmd; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + // FIXME pass command and arguments separated in the first place + QStringList arguments = QProcess::splitCommand(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_); + QString command = (arguments.empty()) ? QString() : arguments.first(); + if (arguments.size() == 1) + arguments.clear(); + else if (!arguments.empty()) + arguments.removeFirst(); +#endif if (detached) { state = SystemcallPrivate::Running; #ifdef Q_OS_WIN32 @@ -379,7 +388,11 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path, if (err_file_.empty()) process_->setStandardErrorFile(QProcess::nullDevice()); #endif +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + if (!QProcess::startDetached(command, arguments)) { +#else if (!QProcess::startDetached(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_)) { +#endif state = SystemcallPrivate::Error; return; } @@ -387,7 +400,11 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path, delete released; } else if (process_) { state = SystemcallPrivate::Starting; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + process_->start(command, arguments); +#else process_->start(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_); +#endif } } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs