[LyX/master] Fixup 9f92fc92: improve FIXME in SystemcallPrivate::startProcess
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu May 20 11:11:13 UTC 2021
commit 67c85f54c4d7422b715898070e63dfe7a984a6ca
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Thu May 20 13:17:55 2021 +0200
Fixup 9f92fc92: improve FIXME in SystemcallPrivate::startProcess
I wanted to remove the test Qt >= 5.15, but now I see that it is
not possible because of QProcess::splitCommand.
Neverthless, the best would be to change parsecmd.
---
src/support/Systemcall.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp
index 00adbf8..f3703b8 100644
--- a/src/support/Systemcall.cpp
+++ b/src/support/Systemcall.cpp
@@ -370,6 +370,14 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path,
cmd_ = cmd;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
// FIXME pass command and arguments separated in the first place
+ /* The versions of startDetached() and start() that accept a
+ * QStringList object exist since Qt4, but it is only in Qt 5.15
+ * that splitCommand() was introduced and the plain versions of
+ * start/startDetached() have been deprecated.
+ * The cleanest solution would be to have parsecmd() produce a
+ * QStringList for arguments, instead of transforming the string
+ * into something that the QProcess splitter accepts.
+ */
QStringList arguments = QProcess::splitCommand(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_);
QString command = (arguments.empty()) ? QString() : arguments.first();
if (arguments.size() == 1)
More information about the lyx-cvs
mailing list