mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Replace deprecated use of QProcess::execute()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
parent
c9863dc225
commit
93f590c6de
1 changed files with 6 additions and 2 deletions
|
@ -690,8 +690,12 @@ void SyncEngine::slotDiscoveryFinished()
|
||||||
const QString script = qEnvironmentVariable("OWNCLOUD_POST_UPDATE_SCRIPT");
|
const QString script = qEnvironmentVariable("OWNCLOUD_POST_UPDATE_SCRIPT");
|
||||||
|
|
||||||
qCDebug(lcEngine) << "Post Update Script: " << script;
|
qCDebug(lcEngine) << "Post Update Script: " << script;
|
||||||
QProcess::execute(script);
|
auto scriptArgs = script.split(QRegExp("\\s+"), Qt::SkipEmptyParts);
|
||||||
#else
|
if (scriptArgs.size() > 0) {
|
||||||
|
const auto scriptExecutable = scriptArgs.takeFirst();
|
||||||
|
QProcess::execute(scriptExecutable, scriptArgs);
|
||||||
|
}
|
||||||
|
#else
|
||||||
qCWarning(lcEngine) << "**** Attention: POST_UPDATE_SCRIPT installed, but not executed because compiled with NDEBUG";
|
qCWarning(lcEngine) << "**** Attention: POST_UPDATE_SCRIPT installed, but not executed because compiled with NDEBUG";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue