Merge ~arraybolt3/software-properties:ubuntu/master into software-properties:ubuntu/master

Proposed by Aaron Rainbolt
Status: Merged
Merged at revision: 95a1f49867c0cf09aba846cf65d4921936fd9e02
Proposed branch: ~arraybolt3/software-properties:ubuntu/master
Merge into: software-properties:ubuntu/master
Diff against target: 17 lines (+4/-2)
1 file modified
softwareproperties/qt/SoftwarePropertiesQt.py (+4/-2)
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+438504@code.launchpad.net

Commit message

Stop using KUrl and KFileDialog

Description of the change

KUrl and KFileDialog both no longer are available to
software-properties-qt, but were used for the "Import Key File..."
button in the Authentication tab. This caused the button to break.
Removing the KUrl-related line and switching from KFileDialog to
QFileDialog resolves this problem. (LP: #1795278)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/softwareproperties/qt/SoftwarePropertiesQt.py b/softwareproperties/qt/SoftwarePropertiesQt.py
2index 93eb687..90b8d5a 100644
3--- a/softwareproperties/qt/SoftwarePropertiesQt.py
4+++ b/softwareproperties/qt/SoftwarePropertiesQt.py
5@@ -718,8 +718,10 @@ class SoftwarePropertiesQt(SoftwareProperties):
6 home = QDir.homePath()
7 if "SUDO_USER" in os.environ:
8 home = os.path.expanduser("~%s" % os.environ["SUDO_USER"])
9- url = KUrl.fromPath(home)
10- filename = KFileDialog.getOpenFileName(url, 'application/pgp-keys', self.userinterface, _("Import key"))
11+ filename = QFileDialog.getOpenFileName(self.userinterface,
12+ _("Import key"),
13+ home,
14+ _("GPG key file (*.gpg)"))[0]
15 if filename:
16 if not self.add_key(filename):
17 title = _("Error importing selected file")

Subscribers

People subscribed via source and target branches