forked from openlp/openlp
Unicode madness
This commit is contained in:
parent
a73d4cce08
commit
193e96ee5a
@ -343,6 +343,11 @@ class Settings(QtCore.QSettings):
|
|||||||
"""
|
"""
|
||||||
# On OS X (and probably on other platforms too) empty value from QSettings is represented as type
|
# On OS X (and probably on other platforms too) empty value from QSettings is represented as type
|
||||||
# PyQt4.QtCore.QPyNullVariant. This type has to be converted to proper 'None' Python type.
|
# PyQt4.QtCore.QPyNullVariant. This type has to be converted to proper 'None' Python type.
|
||||||
|
# Python wants the test one way but nose wants it the other way Madness!
|
||||||
|
try:
|
||||||
|
if isinstance(setting, QtCore.QPyNullVariant) and setting.isNull():
|
||||||
|
setting = None
|
||||||
|
except AttributeError:
|
||||||
if setting.isNull() and isinstance(setting, QtCore.QPyNullVariant):
|
if setting.isNull() and isinstance(setting, QtCore.QPyNullVariant):
|
||||||
setting = None
|
setting = None
|
||||||
# Handle 'None' type (empty value) properly.
|
# Handle 'None' type (empty value) properly.
|
||||||
|
Loading…
Reference in New Issue
Block a user