From c1c1de547288ad70be78809ffa4897aa0afa991a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 25 Feb 2012 13:01:47 +0000 Subject: [PATCH 1/3] Fix Impress and OpenLP so it now starts . Fix Spelling Remove QLocale code for now as not supported by PyQt Fixes: https://launchpad.net/bugs/902115 --- openlp/core/lib/__init__.py | 9 +++++---- openlp/plugins/presentations/lib/impresscontroller.py | 1 - openlp/plugins/songs/lib/oooimport.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 9390ef650..2df8f23c2 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -56,7 +56,7 @@ class SlideLimits(object): class ServiceItemAction(object): """ - Provides an enumeration for the required action moving between service + Provides an enumeration for the required action moving between service items by left/right arrow keys """ Previous = 1 @@ -321,15 +321,16 @@ def check_directory_exists(dir): def create_separated_list(stringlist): """ Returns a string that represents a join of a list of strings with a - localized separator. This function corresponts to + localized separator. This function corresponds to QLocale::createSeparatedList which was introduced in Qt 4.8 and implements the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns ``stringlist`` List of unicode strings """ - if Qt.qVersion() >= u'4.8': - return unicode(QtCore.QLocale.createSeparatedList(stringlist)) + #Not available via pyqt yet so will not work! + #if Qt.qVersion() >= u'4.8': + # return unicode(QtCore.QLocale.createSeparatedList(stringlist)) if not stringlist: return u'' elif len(stringlist) == 1: diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index 3e6c5450a..0fd725b83 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -105,7 +105,6 @@ class ImpressController(PresentationController): cmd = get_uno_command() self.process = QtCore.QProcess() self.process.startDetached(cmd) - self.process.waitForStarted() def get_uno_desktop(self): """ diff --git a/openlp/plugins/songs/lib/oooimport.py b/openlp/plugins/songs/lib/oooimport.py index f98cf2dda..5820b1e94 100644 --- a/openlp/plugins/songs/lib/oooimport.py +++ b/openlp/plugins/songs/lib/oooimport.py @@ -142,7 +142,6 @@ class OooImport(SongImport): cmd = get_uno_command() process = QtCore.QProcess() process.startDetached(cmd) - process.waitForStarted() self.processStarted = True except: log.exception("startOooProcess failed") From 3e1ba89a41d7361461282e07150805d0e1664b45 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 25 Feb 2012 17:44:21 +0000 Subject: [PATCH 2/3] Fix locale test --- openlp/core/lib/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 2df8f23c2..650ae911d 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -328,9 +328,8 @@ def create_separated_list(stringlist): ``stringlist`` List of unicode strings """ - #Not available via pyqt yet so will not work! - #if Qt.qVersion() >= u'4.8': - # return unicode(QtCore.QLocale.createSeparatedList(stringlist)) + if Qt.PYQT_VERSION_STR >= u'4.9': + return unicode(QtCore.QLocale.createSeparatedList(stringlist)) if not stringlist: return u'' elif len(stringlist) == 1: From 025fe7e145b1a4896b32256d94890a8dc7e15754 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 25 Feb 2012 18:31:02 +0000 Subject: [PATCH 3/3] Correct brackets --- openlp/core/lib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 650ae911d..d1e3b5308 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -329,7 +329,7 @@ def create_separated_list(stringlist): List of unicode strings """ if Qt.PYQT_VERSION_STR >= u'4.9': - return unicode(QtCore.QLocale.createSeparatedList(stringlist)) + return unicode(QtCore.QLocale().createSeparatedList(stringlist)) if not stringlist: return u'' elif len(stringlist) == 1: