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

bzr-revno: 1884
This commit is contained in:
Tim Bentley 2012-02-25 19:25:24 +00:00
commit f9ba07f48d
3 changed files with 4 additions and 6 deletions

View File

@ -56,7 +56,7 @@ class SlideLimits(object):
class ServiceItemAction(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 items by left/right arrow keys
""" """
Previous = 1 Previous = 1
@ -321,15 +321,15 @@ def check_directory_exists(dir):
def create_separated_list(stringlist): def create_separated_list(stringlist):
""" """
Returns a string that represents a join of a list of strings with a 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 QLocale::createSeparatedList which was introduced in Qt 4.8 and implements
the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns
``stringlist`` ``stringlist``
List of unicode strings List of unicode strings
""" """
if Qt.qVersion() >= u'4.8': if Qt.PYQT_VERSION_STR >= u'4.9':
return unicode(QtCore.QLocale.createSeparatedList(stringlist)) return unicode(QtCore.QLocale().createSeparatedList(stringlist))
if not stringlist: if not stringlist:
return u'' return u''
elif len(stringlist) == 1: elif len(stringlist) == 1:

View File

@ -105,7 +105,6 @@ class ImpressController(PresentationController):
cmd = get_uno_command() cmd = get_uno_command()
self.process = QtCore.QProcess() self.process = QtCore.QProcess()
self.process.startDetached(cmd) self.process.startDetached(cmd)
self.process.waitForStarted()
def get_uno_desktop(self): def get_uno_desktop(self):
""" """

View File

@ -142,7 +142,6 @@ class OooImport(SongImport):
cmd = get_uno_command() cmd = get_uno_command()
process = QtCore.QProcess() process = QtCore.QProcess()
process.startDetached(cmd) process.startDetached(cmd)
process.waitForStarted()
self.processStarted = True self.processStarted = True
except: except:
log.exception("startOooProcess failed") log.exception("startOooProcess failed")