]> git.sur5r.net Git - minitube/blobdiff - lib/updater/src/impl/openinstaller.cpp
Update upstream source from tag 'upstream/3.8'
[minitube] / lib / updater / src / impl / openinstaller.cpp
diff --git a/lib/updater/src/impl/openinstaller.cpp b/lib/updater/src/impl/openinstaller.cpp
new file mode 100644 (file)
index 0000000..2b77373
--- /dev/null
@@ -0,0 +1,13 @@
+#include "openinstaller.h"
+
+#include <QDesktopServices>
+
+namespace updater {
+
+OpenInstaller::OpenInstaller() {}
+
+void updater::OpenInstaller::start(const QString &filename) {
+    if (!QDesktopServices::openUrl(QUrl("file:///" + filename))) emit error("Cannot start update");
+}
+
+} // namespace updater