Make QProcess::splitCommand accept QStringView, as per header review

A static function that only parses the string to create the list, so
no need for a QString overload.

Change-Id: I1df297adb795095d6eec94ccfcad52498178a7b1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-02-25 16:42:15 +01:00
parent 7e5f38aec6
commit 2090b770da
2 changed files with 2 additions and 2 deletions

View File

@ -2255,7 +2255,7 @@ void QProcessPrivate::start(QIODevice::OpenMode mode)
Tokens with spaces can be surrounded by double quotes; three
consecutive double quotes represent the quote character itself.
*/
QStringList QProcess::splitCommand(const QString &command)
QStringList QProcess::splitCommand(QStringView command)
{
QStringList args;
QString tmp;

View File

@ -282,7 +282,7 @@ public:
static QString nullDevice();
static QStringList splitCommand(const QString &command);
static QStringList splitCommand(QStringView command);
public Q_SLOTS:
void terminate();