From 437ed496fea43cf6fc4ff09cf04489f328f89525 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Mon, 31 Dec 2018 14:26:25 +0100 Subject: Applications: update the list after installation (mga#24095) --- qml/mageiawelcome.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'qml/mageiawelcome.py') diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index 9ace3ec..dfe6998 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -3,7 +3,7 @@ from PyQt5.QtGui import QGuiApplication, QIcon from PyQt5.QtQuick import QQuickView from PyQt5.QtCore import QUrl, QLocale, QTranslator, QLibraryInfo, QVariant, QAbstractListModel, \ - QModelIndex, Qt, QObject, pyqtSlot, QCoreApplication + QModelIndex, Qt, QObject, pyqtSlot, pyqtSignal, QCoreApplication from PyQt5.QtNetwork import QNetworkConfigurationManager, QNetworkConfiguration import sys import os @@ -90,6 +90,7 @@ class Callbrowser(QObject): subprocess.Popen(["xdg-open", link]) class Launcher(QObject): + installed = pyqtSignal() def __init__(self): QObject.__init__(self) @@ -99,7 +100,13 @@ class Launcher(QObject): cmd = [] for i in range(0,app.property("length").toInt()): cmd.append(app.property(i).toString()) - subprocess.Popen(cmd) + proc = subprocess.Popen(cmd) + if cmd[0] == "gurpmi": + proc.wait() + print(proc.returncode) + if (proc.returncode == 0): + # Give the signal to reload the applist + self.installed.emit() class Norun(QObject): def __init__(self): -- cgit v1.2.1