Merge lp:~rohangarg/ubuntu-release-upgrader/kubuntu into lp:ubuntu-release-upgrader

Proposed by Rohan Garg
Status: Rejected
Rejected by: Julian Andres Klode
Proposed branch: lp:~rohangarg/ubuntu-release-upgrader/kubuntu
Merge into: lp:ubuntu-release-upgrader
Diff against target: 72 lines (+13/-19)
2 files modified
DistUpgrade/DistUpgradeFetcherKDE.py (+12/-15)
DistUpgrade/dialog_release_notes.ui (+1/-4)
To merge this branch: bzr merge lp:~rohangarg/ubuntu-release-upgrader/kubuntu
Reviewer Review Type Date Requested Status
Harald Sitter Needs Fixing
Review via email: mp+203595@code.launchpad.net

Description of the change

I've modified the KDE release notes ui so that it :

a) Shows the HTML notes in a QWebView
b) Uses an icon for the window

To post a comment you must log in.
2726. By Rohan Garg

Use the HTML release notes and a QWebView instead of the regular text release notes

Revision history for this message
Harald Sitter (apachelogger) wrote :

19 + self.dialogue.releaseNotesBrowser.setUrl(QUrl(uri))
20 + self.dialogue.releaseNotesBrowser.loadFinished.connect(self.releaseNotesLoaded)

connect first

I am wondering whether there isn't a way to preserve the full error handling the distinction between not being able to get a http reply and not being able to reach the server seems rather useful.

also, was this tested on precise? I am not certain of the webview quality in that relese.

review: Needs Fixing
Revision history for this message
Rohan Garg (rohangarg) wrote :

> 19 + self.dialogue.releaseNotesBrowser.setUrl(QUrl(uri))
> 20 + self.dialogue.releaseNotesBrowser.loadFinished.connect(self.releas
> eNotesLoaded)
>
> connect first
>

Will do.

> I am wondering whether there isn't a way to preserve the full error handling
> the distinction between not being able to get a http reply and not being able
> to reach the server seems rather useful.
>

QWebView doesn't offer a detailed error message unfortunately. Though I only had a cursory glance at the API.

> also, was this tested on precise? I am not certain of the webview quality in
> that relese.

Yep. This was tested on precise. Works fine there.

Revision history for this message
Rohan Garg (rohangarg) wrote :

Poke?

Revision history for this message
Harald Sitter (apachelogger) wrote :

> Poke?

I still only see the same proposal.

FWIW though, ::page() should give you access to most handy error hanlding in qwebview.

Revision history for this message
Julian Andres Klode (juliank) wrote :

If there is still something going on, please resubmit a new merge proposal. I rejected that now as it has not seen any activity in 4 years.

Unmerged revisions

2726. By Rohan Garg

Use the HTML release notes and a QWebView instead of the regular text release notes

2725. By Rohan Garg

Release note fetcher should have an icon

2724. By Launchpad Translations on behalf of ubuntu-core-dev

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DistUpgrade/DistUpgradeFetcherKDE.py'
2--- DistUpgrade/DistUpgradeFetcherKDE.py 2013-11-15 23:36:53 +0000
3+++ DistUpgrade/DistUpgradeFetcherKDE.py 2014-01-28 18:32:42 +0000
4@@ -103,26 +103,15 @@
5 cancelButton.setIcon(KIcon("dialog-cancel"))
6 self.dialogue.setWindowTitle(_("Release Notes"))
7 self.dialogue.show()
8- if self.new_dist.releaseNotesURI is not None:
9- uri = self._expandUri(self.new_dist.releaseNotesURI)
10+ if self.new_dist.releaseNotesHtmlUri != None:
11+ uri = self._expandUri(self.new_dist.releaseNotesHtmlUri)
12 # download/display the release notes
13 # FIXME: add some progress reporting here
14 result = None
15 try:
16- release_notes = urlopen(uri)
17- notes = release_notes.read().decode("UTF-8", "replace")
18- self.dialogue.scrolled_notes.setText(notes)
19+ self.dialogue.releaseNotesBrowser.setUrl(QUrl(uri))
20+ self.dialogue.releaseNotesBrowser.loadFinished.connect(self.releaseNotesLoaded)
21 result = self.dialogue.exec_()
22- except HTTPError:
23- primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
24- _("Could not find the release notes")
25- secondary = _("The server may be overloaded. ")
26- KMessageBox.sorry(None, primary + "<br />" + secondary, "")
27- except IOError:
28- primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
29- _("Could not download the release notes")
30- secondary = _("Please check your internet connection.")
31- KMessageBox.sorry(None, primary + "<br />" + secondary, "")
32 # user clicked cancel
33 if result == QDialog.Accepted:
34 self.progressDialogue.show()
35@@ -135,6 +124,13 @@
36 sys.exit()
37 return False
38
39+ def releaseNotesLoaded(self, ok):
40+ if not ok:
41+ primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
42+ _("Could not load the release notes")
43+ secondary = _("The server may be overloaded. ")
44+ KMessageBox.sorry(None, primary + "<br />" + secondary, "")
45+
46
47 class KDEAcquireProgressAdapter(apt.progress.base.AcquireProgress):
48 def __init__(self, progress, label, parent):
49@@ -197,6 +193,7 @@
50 license, copyright, text, homePage, bugEmail)
51
52 aboutData.addAuthor(ki18n("Jonathan Riddell"), ki18n("Author"))
53+ aboutData.setProgramIconName("system-software-update")
54
55 options = KCmdLineOptions()
56
57
58=== modified file 'DistUpgrade/dialog_release_notes.ui'
59--- DistUpgrade/dialog_release_notes.ui 2012-06-28 16:12:09 +0000
60+++ DistUpgrade/dialog_release_notes.ui 2014-01-28 18:32:42 +0000
61@@ -14,10 +14,7 @@
62 </property>
63 <layout class="QGridLayout" name="gridLayout" >
64 <item row="0" column="0" >
65- <widget class="QTextEdit" name="scrolled_notes" >
66- <property name="readOnly" >
67- <bool>true</bool>
68- </property>
69+ <widget class="QWebView" name="releaseNotesBrowser" >
70 </widget>
71 </item>
72 <item row="1" column="0" >

Subscribers

People subscribed via source and target branches