Issue #254 resolved doesn't handle QString objects well

Maxime Chéramy
created an issue

In Python 2.x, PyQt uses QString objects to represent unicode strings. With Python 3, PyQt dropped the QString to simply use the default Python string type.

In the method def _findNextToken(self, line, pos):, the line argument is of type QString with Python2. This is a problem at several places in that method, for example : identifier[0] in '0123456789'

One easy solution is to convert line:

     line = unicode(line)
except NameError:

This can be done at the beginning of _findNextToken or in parseLine.

Comments (2)

  1. Log in to comment