summaryrefslogtreecommitdiffstats
path: root/qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2019-02-03 22:41:49 +0100
committerPapoteur <papoteur@mageia.org>2019-02-03 22:43:38 +0100
commit708f51d4c078c5360d50c4e5995129891c3d551b (patch)
treee919e34eb909f214043d4ff3c22d48422a5fbd57 /qml
parentef13f51356527a27e9419cb2df8d39c99242b107 (diff)
downloadmageiawelcome-708f51d4c078c5360d50c4e5995129891c3d551b.tar
mageiawelcome-708f51d4c078c5360d50c4e5995129891c3d551b.tar.gz
mageiawelcome-708f51d4c078c5360d50c4e5995129891c3d551b.tar.bz2
mageiawelcome-708f51d4c078c5360d50c4e5995129891c3d551b.tar.xz
mageiawelcome-708f51d4c078c5360d50c4e5995129891c3d551b.zip
Applications: secure rpm query after installation (mga#24095)
Diffstat (limited to 'qml')
-rw-r--r--qml/helpers.py4
-rw-r--r--qml/mageiawelcome.py5
-rw-r--r--qml/mw-ui.qml1
3 files changed, 4 insertions, 6 deletions
diff --git a/qml/helpers.py b/qml/helpers.py
index 7d69eb1..f777f04 100644
--- a/qml/helpers.py
+++ b/qml/helpers.py
@@ -3,8 +3,6 @@
import gettext
import rpm
-ts = rpm.TransactionSet()
-
def get_desktop_name(x):
return {
'01plasma':'KDE Plasma',
@@ -33,7 +31,7 @@ def get_desktop_name2(x):
def is_installed(name):
- mi = ts.dbMatch('name', name)
+ mi = rpm.TransactionSet().dbMatch('name', name)
release = ""
for h in mi:
release = (h['release']).decode("utf-8")
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index e8662b8..c7a320d 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -104,9 +104,8 @@ class Launcher(QObject):
if cmd[0] == "gurpmi":
proc.wait()
print(proc.returncode)
- if (proc.returncode == 0):
- # Give the signal to reload the applist
- self.installed.emit()
+ # Give the signal to reload the applist
+ self.installed.emit()
class Norun(QObject):
def __init__(self):
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml
index 996938c..30545c8 100644
--- a/qml/mw-ui.qml
+++ b/qml/mw-ui.qml
@@ -987,6 +987,7 @@ This is a background process and you will be able to use your computer normally
target: launch
onInstalled: {
// get the signal to reload the applist
+ console.log("Reload applications list")
itemModel.update_list(categoriesList.currentItem.myGroup)
}
}