[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] causes self to be owned by Qt instead of PyQt ???
From: redstone-cold <redstone-cold () 163 ! com>
Date: 2015-04-03 11:12:26
Message-ID: dd466da.303.14c7efb6255.Coremail.redstone-cold () 163 ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
reported here https://bugreports.qt.io/browse/QTBUG-45393
在2015年04月03 16时19分, "Phil Thompson"<phil@riverbankcomputing.com>写道:
On 02/04/2015 11:54 pm, Baz Walter wrote:
> On 02/04/15 23:01, Andreas Pakulat wrote:
>> Hi Phil,
>>
>> On Thu, Apr 2, 2015 at 11:11 PM, Phil Thompson
>> <phil@riverbankcomputing.com>
>> wrote:
>>>
>>> So the attached C++ code should compile?
>>
>> Not without a fix for qfilesystemmodel.h. qabstractitemmodel.h as well
>> as
>> qstandarditemmodel.h (and probably other qaim subclasses in qt)
>> explicitly
>> 'reuse' QObject::parent using something like:
>>
>> #ifdef Q_NO_USING_KEYWORD
>> inline QObject *parent() const { return QObject::parent(); }
>> #else
>> using QObject::parent;
>> #endif
>>
>> For qfilesystemmodel.h this is missing and hence one cannot call
>> QObject::parent() with a pointer or instance of it.
>
> Huh. So is it a Qt bug, then? Seems a little strange that it has gone
> unnoticed for so long (since at least 4.7). But maybe there's a
> specific reason why QFileSystemModel is be treated differently to all
> the other model classes.
>
> Looks like Q_NO_USING_KEYWORD has been completely removed in Qt-5.5,
> but obviously that didn't touch qfilesystemmodel.h, so parent() is
> still missing there.
...so it's not a PyQt bug :)
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
[Attachment #5 (text/html)]
<div style="color:#000; font-size: 14px;font-family: arial;"><div>reported here \
https://bugreports.qt.io/browse/QTBUG-45393</div><div><br></div><div><br></div><div><br></div></div><!-- \
jy5ContentSuffix --><div>在2015年04月03 16时19分, "Phil \
Thompson"<phil@riverbankcomputing.com>写道:</div><blockquote \
id="isReplyContent" style="padding-left:1ex; margin: 0px 0px 0px 0.8ex; BORDER-LEFT: \
#ccc 1px solid"><br>On 02/04/2015 11:54 pm, Baz Walter wrote:<br>> On 02/04/15 \
23:01, Andreas Pakulat wrote:<br>>> Hi Phil,<br>>> <br>>> On Thu, \
Apr 2, 2015 at 11:11 PM, Phil Thompson <br>>> <<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>><br>>> \
wrote:<br>>>> <br>>>> So the attached C++ code should \
compile?<br>>> <br>>> Not without a fix for qfilesystemmodel.h. \
qabstractitemmodel.h as well <br>>> as<br>>> qstandarditemmodel.h (and \
probably other qaim subclasses in qt) <br>>> explicitly<br>>> 'reuse' \
QObject::parent using something like:<br>>> <br>>> #ifdef \
Q_NO_USING_KEYWORD<br>>> inline QObject *parent() const { \
return QObject::parent(); }<br>>> #else<br>>> using \
QObject::parent;<br>>> #endif<br>>> <br>>> For qfilesystemmodel.h \
this is missing and hence one cannot call<br>>> QObject::parent() with a \
pointer or instance of it.<br>> <br>> Huh. So is it a Qt bug, then? Seems a \
little strange that it has gone<br>> unnoticed for so long (since at least 4.7). \
But maybe there's a<br>> specific reason why QFileSystemModel is be treated \
differently to all<br>> the other model classes.<br>> <br>> Looks like \
Q_NO_USING_KEYWORD has been completely removed in Qt-5.5,<br>> but obviously that \
didn't touch qfilesystemmodel.h, so parent() is<br>> still missing \
there.<br><br>...so it's not a PyQt bug \
:)<br><br>Phil<br>_______________________________________________<br>PyQt mailing \
list <a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br></blockquote><br><br><span \
title="neteasefooter"><span id="netease_mail_footer"></span></span>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic