Make QProcess::splitCommand() available without process feature

QProcess::splitCommand() is a static function that is used at
least by Qt for Android without needing rest of the
process-feature support (QProcess).

Declare a simple QProcess class when the process-feature is not
enabaled. This class makes the static splitCommand() function
available.

Fixes: QTBUG-135655
Change-Id: I97dc054c3007e98bd786cbe092ffc78e3cc201e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Juha Vuolle 2025-04-07 09:18:14 +03:00
parent d531d31e1d
commit c39136ed4f
2 changed files with 14 additions and 0 deletions

View File

@ -2422,6 +2422,7 @@ void QProcessPrivate::start(QIODevice::OpenMode mode)
errorString.clear();
startProcess();
}
#endif // QT_CONFIG(process)
/*!
\since 5.15
@ -2472,6 +2473,7 @@ QStringList QProcess::splitCommand(QStringView command)
return args;
}
#if QT_CONFIG(process)
/*!
\since 5.0

View File

@ -291,6 +291,18 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QProcess::UnixProcessFlags)
#endif
#else // !QT_CONFIG(process)
class QProcess
{
public:
Q_CORE_EXPORT static QStringList splitCommand(QStringView command);
private:
QProcess() = delete;
Q_DISABLE_COPY_MOVE(QProcess)
};
#endif // QT_CONFIG(process)
QT_END_NAMESPACE