PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 408 - QIODevice.readData() and .readLineData() have output parameters in their signatures
: QIODevice.readData() and .readLineData() have output parameters in their sign...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 0.4.1
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-10-12 17:38 EEST by Dan Halbert
Modified: 2010-11-25 17:48 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Halbert 2010-10-12 17:38:02 EEST
In C++, QIODevice::readLine(char * data, qint64 maxSize) and
::readLineData(char * data, qint64 maxSize) take a first argument that is an
output parameter, and return a count of how many bytes were read.

In PySide, these methods also take two arguments. The first argument is
supposed to be a string. Of course, that doesn't make sense, since it's an
output parameter.

In PyQt API1, read() and readData() take one argument, maxSize, and return a
byte array. They don't return the count. Not sure if that changes in API2.
Comment 1 Dan Halbert 2010-10-12 17:39:20 EEST
Blah, typo in first sentence; should be:

In C++, QIODevice::readData(char * data, qint64 maxSize) and
QIODevice::readLineData(char * data, qint64 maxSize) take a first argument that
is an output parameter, and return a count of how many bytes were read.

In PySide, these methods also take two arguments. The first argument is
supposed to be a string. Of course, that doesn't make sense, since it's an
output parameter.

In PyQt API1, read() and readData() take one argument, maxSize, and return a
byte array. They don't return the count. Not sure if that changes in API2.
Comment 2 Hugo Parente Lima 2010-10-19 16:41:03 EEST
Fixed in commits

pyside/65022ffef62096033bcff49c4544640dac92f44e
shiboken/dc5e4520f3551c3d0aff0383f4a199541d83c772
shiboken/2106919936da6d34a1319ad20e283f8cf8fffbce
Comment 3 renato filho 2010-11-25 17:48:12 EET
released on 1.0.0~beta1