Fix deprecation warning in QGenericUnixServices

Do not use the deprecated method QProcess::start(QString) anymore.

Change-Id: I09eae2c8a1dbb53fd2de004e5030da9bb3c07b14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Joerg Bornemann 2020-03-05 14:23:48 +01:00
parent 66e905b1c3
commit e1e0862990
1 changed files with 2 additions and 1 deletions

View File

@ -166,7 +166,8 @@ static inline bool launch(const QString &launcher, const QUrl &url)
#if !QT_CONFIG(process)
const bool ok = ::system(qPrintable(command + QLatin1String(" &")));
#else
const bool ok = QProcess::startDetached(command);
QStringList args = QProcess::splitCommand(command);
const bool ok = !args.isEmpty() && QProcess::startDetached(args.takeFirst(), args);
#endif
if (!ok)
qWarning("Launch failed (%s)", qPrintable(command));