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
1=== modified file 'openlp/core/lib/__init__.py'
2--- openlp/core/lib/__init__.py 2012-02-19 20:53:41 +0000
3+++ openlp/core/lib/__init__.py 2012-02-25 18:59:18 +0000
4@@ -56,7 +56,7 @@
5
6 class ServiceItemAction(object):
7 """
8- Provides an enumeration for the required action moving between service
9+ Provides an enumeration for the required action moving between service
10 items by left/right arrow keys
11 """
12 Previous = 1
13@@ -321,15 +321,15 @@
14 def create_separated_list(stringlist):
15 """
16 Returns a string that represents a join of a list of strings with a
17- localized separator. This function corresponts to
18+ localized separator. This function corresponds to
19 QLocale::createSeparatedList which was introduced in Qt 4.8 and implements
20 the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns
21
22 ``stringlist``
23 List of unicode strings
24 """
25- if Qt.qVersion() >= u'4.8':
26- return unicode(QtCore.QLocale.createSeparatedList(stringlist))
27+ if Qt.PYQT_VERSION_STR >= u'4.9':
28+ return unicode(QtCore.QLocale().createSeparatedList(stringlist))
29 if not stringlist:
30 return u''
31 elif len(stringlist) == 1:
32
33=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
34--- openlp/plugins/presentations/lib/impresscontroller.py 2011-12-27 10:33:55 +0000
35+++ openlp/plugins/presentations/lib/impresscontroller.py 2012-02-25 18:59:18 +0000
36@@ -105,7 +105,6 @@
37 cmd = get_uno_command()
38 self.process = QtCore.QProcess()
39 self.process.startDetached(cmd)
40- self.process.waitForStarted()
41
42 def get_uno_desktop(self):
43 """
44
45=== modified file 'openlp/plugins/songs/lib/oooimport.py'
46--- openlp/plugins/songs/lib/oooimport.py 2011-12-27 10:33:55 +0000
47+++ openlp/plugins/songs/lib/oooimport.py 2012-02-25 18:59:18 +0000
48@@ -142,7 +142,6 @@
49 cmd = get_uno_command()
50 process = QtCore.QProcess()
51 process.startDetached(cmd)
52- process.waitForStarted()
53 self.processStarted = True
54 except:
55 log.exception("startOooProcess failed")