issue with 'QPyNullVariant' in parsing settings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenLP |
Fix Released
|
Low
|
matysek |
Bug Description
Someone in a comment reported the following issue:
Traceback (most recent call last):
File "openlp/
self.
TypeError: QLineEdit.
Steps to reproduce:
1. run openlp
2. Open settings
3. change something on general tab
4. save it and then you'll get the previous traceback.
Symptoms:
- OSX, latest openlp dev tree
- not sure if osx specific
- Qt 4.8.3, PyQt 4.9.4 and PyQt 4.9.6
- happens only in parsing saved QSettings - with clean install openlp starts but not the second time.
- bug appeared after the 'QString and QVariant auto-conversion' merge
Investigation:
- setting with empty value is not converted to 'None' but to type QPyNullVariant while reading.
How to fix:
- The method 'Setting.value()' should
- convert QPyNullVariant to None if QPyNullVariant.
- convert None to empty string if defaultValue type is string
Some links:
http://
Related branches
- Raoul Snyman: Approve
- Tim Bentley: Approve
-
Diff: 28 lines (+14/-3)1 file modifiedopenlp/core/lib/__init__.py (+14/-3)
description: | updated |
Changed in openlp: | |
status: | New → Fix Committed |
Changed in openlp: | |
status: | Fix Committed → Fix Released |
Changed in openlp: | |
status: | Fix Released → Fix Committed |
Changed in openlp: | |
importance: | Undecided → Low |
Changed in openlp: | |
status: | Fix Committed → Fix Released |