~qbzr-dev/qbzr/0.22

« back to all changes in this revision

Viewing changes to lib/run.py

  • Committer: Alexander Belchenko
  • Date: 2012-03-28 09:16:54 UTC
  • Revision ID: bialix@ukr.net-20120328091654-7s16rcko1utqbxo1
qrun: Localized help text for selected command is shown correctly now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
        # XXX handle command aliases???
249
249
        cmd_object = self.cmds_dict.get(cmd_name)
250
250
        if cmd_object:
251
 
            self.ui.help_browser.setHtml(
252
 
                get_help_topic_as_html("commands/" + cmd_name))
 
251
            # [Bug #963542] get_help_topic_as_html returns valid utf-8 encoded
 
252
            # HTML document, but QTextBrowser expects unicode.
 
253
            # (actually QString which is unicode in PyQt4).
 
254
            html_utf8 = get_help_topic_as_html("commands/" + cmd_name)
 
255
            self.ui.help_browser.setHtml(html_utf8.decode('utf-8'))
253
256
        else:
254
257
            self.set_default_help()
255
258