2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Get rid of RunShellCommand

This commit is contained in:
Ilya Fedin
2021-03-07 08:50:21 +04:00
committed by John Preston
parent 77c8ca76b7
commit 817610ddd7

View File

@@ -263,27 +263,6 @@ QString FlatpakID() {
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(
const QString &targetPath,
const QString &args,
@@ -727,7 +706,7 @@ void InstallLauncher(bool force) {
}
}
RunShellCommand("update-desktop-database", {
QProcess::execute("update-desktop-database", {
applicationsPath
});
}