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
parent
66e905b1c3
commit
e1e0862990
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue