mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Get rid of RunShellCommand
This commit is contained in:
parent
77c8ca76b7
commit
817610ddd7
1 changed files with 1 additions and 22 deletions
|
@ -263,27 +263,6 @@ QString FlatpakID() {
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RunShellCommand(const QString &program, const QStringList &arguments) {
|
|
||||||
const auto result = QProcess::execute(program, arguments);
|
|
||||||
|
|
||||||
const auto command = qsl("%1 %2")
|
|
||||||
.arg(program)
|
|
||||||
.arg(arguments.join(' '));
|
|
||||||
|
|
||||||
if (result) {
|
|
||||||
DEBUG_LOG(("App Error: command failed, code: %1, command: %2")
|
|
||||||
.arg(result)
|
|
||||||
.arg(command));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_LOG(("App Info: command succeeded, command: %1")
|
|
||||||
.arg(command));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GenerateDesktopFile(
|
bool GenerateDesktopFile(
|
||||||
const QString &targetPath,
|
const QString &targetPath,
|
||||||
const QString &args,
|
const QString &args,
|
||||||
|
@ -727,7 +706,7 @@ void InstallLauncher(bool force) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RunShellCommand("update-desktop-database", {
|
QProcess::execute("update-desktop-database", {
|
||||||
applicationsPath
|
applicationsPath
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue