← Back to team overview

openlp-core team mailing list archive

[Bug 1095268] Re: issue with 'QPyNullVariant' in parsing settings

 

** Changed in: openlp
       Status: Fix Released => Fix Committed

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1095268

Title:
  issue with 'QPyNullVariant' in parsing settings

Status in OpenLP - Worship Presentation Software:
  Fix Committed

Bug description:
  Someone in a comment reported the following issue:

  Traceback (most recent call last):
    File "openlp/core/ui/generaltab.py", line 277, in load
      self.numberEdit.setText(settings.value(u'ccli number', u''))
  TypeError: QLineEdit.setText(QString): argument 1 has unexpected type 'QPyNullVariant'

  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.isNull() == True
    - convert None to empty string if defaultValue type is string

  Some links:
  http://python.6.n6.nabble.com/QPyNullVariant-td4981824.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1095268/+subscriptions


References