Merge lp:~trb143/openlp/bug-902115 into lp:openlp

Proposed by Tim Bentley
Status: Merged
Approved by: Raoul Snyman
Approved revision: 1786
Merged at revision: 1884
Proposed branch: lp:~trb143/openlp/bug-902115
Merge into: lp:openlp
Diff against target: 55 lines (+4/-6)
3 files modified
openlp/core/lib/__init__.py (+4/-4)
openlp/plugins/presentations/lib/impresscontroller.py (+0/-1)
openlp/plugins/songs/lib/oooimport.py (+0/-1)
To merge this branch: bzr merge lp:~trb143/openlp/bug-902115
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Jonathan Corwin (community) Approve
Andreas Preikschat Pending
Review via email: mp+94663@code.launchpad.net

This proposal supersedes a proposal from 2012-02-25.

Description of the change

Fix thread bug which on linux causing OpenLP and Impress to fail.
Fix Spelling
Fix Qlocale test to handle versions of PyQt less than 4.9

To post a comment you must log in.
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote : Posted in a previous version of this proposal

Should work (when I removed process.waitForStarted() it worked)....

review: Approve
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote : Posted in a previous version of this proposal
Revision history for this message
Jonathan Corwin (j-corwin) wrote : Posted in a previous version of this proposal

Does it work OK on slower machines where it might take a while for Impress to start, and so code which tries to access the Impress API might do so before it has finished loading?

review: Needs Information
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

What would be better is to check if the user is running PyQt4 version 4.9 or higher.

review: Needs Fixing
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Looks good to me.

review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Oh wait... you need to modify line 27 to say:

  return unicode(QtCore.QLocale().createSeparatedList(stringlist))

(extra set of brackets)

review: Needs Fixing
Revision history for this message
Jonathan Corwin (j-corwin) :
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2012-02-19 20:53:41 +0000
+++ openlp/core/lib/__init__.py 2012-02-25 18:59:18 +0000
@@ -56,7 +56,7 @@
5656
57class ServiceItemAction(object):57class ServiceItemAction(object):
58 """58 """
59 Provides an enumeration for the required action moving between service 59 Provides an enumeration for the required action moving between service
60 items by left/right arrow keys60 items by left/right arrow keys
61 """61 """
62 Previous = 162 Previous = 1
@@ -321,15 +321,15 @@
321def create_separated_list(stringlist):321def create_separated_list(stringlist):
322 """322 """
323 Returns a string that represents a join of a list of strings with a323 Returns a string that represents a join of a list of strings with a
324 localized separator. This function corresponts to324 localized separator. This function corresponds to
325 QLocale::createSeparatedList which was introduced in Qt 4.8 and implements325 QLocale::createSeparatedList which was introduced in Qt 4.8 and implements
326 the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns326 the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns
327327
328 ``stringlist``328 ``stringlist``
329 List of unicode strings329 List of unicode strings
330 """330 """
331 if Qt.qVersion() >= u'4.8':331 if Qt.PYQT_VERSION_STR >= u'4.9':
332 return unicode(QtCore.QLocale.createSeparatedList(stringlist))332 return unicode(QtCore.QLocale().createSeparatedList(stringlist))
333 if not stringlist:333 if not stringlist:
334 return u''334 return u''
335 elif len(stringlist) == 1:335 elif len(stringlist) == 1:
336336
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2011-12-27 10:33:55 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2012-02-25 18:59:18 +0000
@@ -105,7 +105,6 @@
105 cmd = get_uno_command()105 cmd = get_uno_command()
106 self.process = QtCore.QProcess()106 self.process = QtCore.QProcess()
107 self.process.startDetached(cmd)107 self.process.startDetached(cmd)
108 self.process.waitForStarted()
109108
110 def get_uno_desktop(self):109 def get_uno_desktop(self):
111 """110 """
112111
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py 2011-12-27 10:33:55 +0000
+++ openlp/plugins/songs/lib/oooimport.py 2012-02-25 18:59:18 +0000
@@ -142,7 +142,6 @@
142 cmd = get_uno_command()142 cmd = get_uno_command()
143 process = QtCore.QProcess()143 process = QtCore.QProcess()
144 process.startDetached(cmd)144 process.startDetached(cmd)
145 process.waitForStarted()
146 self.processStarted = True145 self.processStarted = True
147 except:146 except:
148 log.exception("startOooProcess failed")147 log.exception("startOooProcess failed")