forked from openlp/openlp
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:
commit
f9ba07f48d
@ -321,15 +321,15 @@ 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))
|
||||
if Qt.PYQT_VERSION_STR >= u'4.9':
|
||||
return unicode(QtCore.QLocale().createSeparatedList(stringlist))
|
||||
if not stringlist:
|
||||
return u''
|
||||
elif len(stringlist) == 1:
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user