1 #include "runinstaller.h"
3 #include <QDesktopServices>
7 RunInstaller::RunInstaller() : Installer() {}
9 void RunInstaller::start(const QString &filename) {
10 if (arguments.isEmpty()) {
11 if (!QDesktopServices::openUrl(QUrl("file:///" + filename)))
12 emit error("Cannot start update");
14 QProcess *process = new QProcess(this);
15 QObject::connect(process, &QProcess::errorOccurred, this, [this](auto error) {
16 this->emit error("Update error: " + QVariant::fromValue(error).toString());
18 process->startDetached(filename, arguments);
22 } // namespace updater