QString and QVariant auto-conversion

Bug #779201 reported by matysek
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Critical
Unassigned
Packaging
Fix Released
High
matysek

Bug Description

Since PyQt 4.6 (PyQt uses different version scheme than Qt) support auto conversion of QString to/from python unicode type and auto conversion to/from QVariant type.

Practically, it means that it is not necessary use types QString and/or QVariant in python code.

Using auto-conversion could make the source code simpler.

For more info see

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/incompatible_apis.html
http://www.pyinstaller.org/wiki/PyQtChangeApiVersion

Related branches

Tim Bentley (trb143)
Changed in openlp:
importance: Undecided → Wishlist
Revision history for this message
Tim Bentley (trb143) wrote :

Had a quick look at this and all the LanguageManager code needs to be looked at as it is QT based.

The idea is good but will take some time to get working and not break things

Changed in openlp:
status: New → Confirmed
Changed in openlp:
assignee: nobody → Andreas Preikschat (googol)
Changed in openlp:
status: Confirmed → In Progress
Revision history for this message
matysek (mzibricky) wrote :

This is a type of change which has to be merged at once.

Also the Windows and Mac build scripts has to be updated.

Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote : Re: [Bug 779201] Re: QString and QVariant auto-conversion

> This is a type of change which has to be merged at once.
>
> Also the Windows and Mac build scripts has to be updated.
>
What exactly has to be changed with the build scripts?

Regards

Revision history for this message
matysek (mzibricky) wrote :

Build scripts should replace the runtime hook in pyinstaller directory with a custom one. As described in
http://www.pyinstaller.org/wiki/Recipe/PyQtChangeApiVersion

Changed in openlp:
milestone: none → 2.1.1
Tim Bentley (trb143)
Changed in openlp:
importance: Wishlist → Critical
Changed in openlp:
status: In Progress → Won't Fix
status: Won't Fix → Fix Committed
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

The build script has to be changed.

NOTE: 2.0 still needs the old build script!

Changed in openlp:
status: Fix Committed → Fix Released
Revision history for this message
Dmitriy Marmyshev (marmyshev) wrote :

latest OpenLP, OSX.

Steps:
1 Open settings
2. change something on general tab
3. save it and then:

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'

Revision history for this message
Tim Bentley (trb143) wrote :

Unable to reproduce on Linux. Are you running on OSX as the build scripts may need to be amended to support SIP

Revision history for this message
matysek (mzibricky) wrote :

I need to fix the osx build for that change.

Revision history for this message
matysek (mzibricky) wrote :

The QPyNullVariant is a real bug #1095268.

Changed in openlp:
status: Fix Released → Fix Committed
no longer affects: openlp/packaging
no longer affects: openlp/packaging-2.0
Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.