On Tue, Apr 20, 2010 at 8:00 AM, Matti Airas <[email protected]> wrote:
> On 19.04.2010 23:50, ext Lauro Moura wrote:
>
>> As this PSEP is related to API changes, what about things like the bug
>> #116 [1]: "QHttp doesn't store the reference to a QFile"?
>>
>> [1] http://bugs.openbossa.org/show_bug.cgi?id=116
>
> I think it'd be better to keep the PSEPs as atomic as possible: have them
> describe one (and one only) feature. Hence, I'd make this a PSEP of its own.
> However, I'm not quite sure what the API change proposal here is...
>
The API change here would be making some Qt methods increment the
refcount of objects what aren't owned but just required to be alive.
In this case, QHttp().get(...,qfile_instance) requires the
qfile_instance to be alive until the (asynchronous) fetch process
finishes. So, the bug author
was talking about making calls like this storing a reference to the
object, almost like the following pseudo code:
class QHttp(QObject):
def get(self, ..., fileobject):
self.qfile = fileobject
It may not look like a API matter in terms of signature but changes
the behavior of these calls. Anyway, this seems to be related to the
"Pythonic API" but can be put in a proper PSEP in the future.
--
Lauro Moura
INdT - Instituto Nokia de Tecnologia
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside