commit cc88221046f92857430b81aed6d14179abf9b070
Author: Pavel Sanda <[email protected]>
Date: Sun Oct 11 22:23:25 2026 +0200
Drop the dead #ifndef USE_QPROCESS branches
and filetools.cpp, so the #ifndef branches they guard have been
unreachable since c73eb3497a (2009).
Remove both branches, both defines and the scaffolding around them, so
USE_QPROCESS no longer appears in the tree. The live code is untouched.
Another possiblity to reintroduce shell gone.
Tier 01 DiD / dead-code: drop the unused non-QProcess branches
https://www.mail-archive.com/[email protected]/msg227034.html
Assisted-by: Claude Opus 5
---
src/support/Systemcall.cpp | 31 -------------------------------
src/support/filetools.cpp | 8 --------
2 files changed, 39 deletions(-)
diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp
index a9bdde41e3..83897f21a2 100644
--- a/src/support/Systemcall.cpp
+++ b/src/support/Systemcall.cpp
@@ -33,9 +33,6 @@
#include <QThread>
#include <QCoreApplication>
-#define USE_QPROCESS
-
-
struct Sleep : QThread
{
static void millisec(unsigned long ms)
@@ -97,33 +94,6 @@ ProgressInterface * ProgressInterface::instance()
-// Reuse of instance
-#ifndef USE_QPROCESS
-int Systemcall::startscript(Starttype how, string const & what,
- string const & path, string const & lpath,
- bool /*process_events*/)
-{
- string command =
- to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path, lpath)))
- + commandPrep(what);
-
- if (how == DontWait) {
- switch (os::shell()) {
- case os::UNIX:
- command += " &";
- break;
- case os::CMD_EXE:
- command = "start /min " + command;
- break;
- }
- } else if (os::shell() == os::CMD_EXE)
- command = subst(command, "cmd /d /c ", "");
-
- return ::system(command.c_str());
-}
-
-#else
-
namespace {
/*
@@ -826,4 +796,3 @@ vector<string> splitCommandTokens(string const & cmd)
} // namespace lyx
#include "moc_SystemcallPrivate.cpp"
-#endif
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index e4d48d0740..fffd87ccff 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -66,8 +66,6 @@
using namespace std;
-#define USE_QPROCESS
-
namespace lyx {
namespace support {
@@ -251,17 +249,11 @@ string const quoteName(string const & name, quote_style
style)
// containing " or ', therefore we don't pass user filenames
// to child processes if possible. We store them in a python
// script instead, where we don't have these limitations.
-#ifndef USE_QPROCESS
- return (os::shell() == os::UNIX) ?
- '\'' + subst(name, "'", "\'\\\'\'") + '\'' :
- '"' + name + '"';
-#else
// According to the QProcess parser, a single double
// quote is represented by three consecutive ones.
// Here we simply escape the double quote and let our
// simple parser in Systemcall.cpp do the substitution.
return '"' + subst(name, "\"", "\\\"") + '"';
-#endif
case quote_shell_filename:
return quoteName(os::external_path(name), quote_shell);
case quote_python:
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs