[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 \
&nbsp;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"&lt;phil@riverbankcomputing.com&gt;写道:</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>&gt; On 02/04/15 \
23:01, Andreas Pakulat wrote:<br>&gt;&gt; Hi Phil,<br>&gt;&gt; <br>&gt;&gt; On Thu, \
Apr 2, 2015 at 11:11 PM, Phil Thompson <br>&gt;&gt; &lt;<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt;<br>&gt;&gt; \
wrote:<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; So the attached C++ code should \
compile?<br>&gt;&gt; <br>&gt;&gt; Not without a fix for qfilesystemmodel.h. \
qabstractitemmodel.h as well <br>&gt;&gt; as<br>&gt;&gt; qstandarditemmodel.h (and \
probably other qaim subclasses in qt) <br>&gt;&gt; explicitly<br>&gt;&gt; 'reuse' \
QObject::parent using something like:<br>&gt;&gt; <br>&gt;&gt; #ifdef \
Q_NO_USING_KEYWORD<br>&gt;&gt; &nbsp; &nbsp; &nbsp;inline QObject *parent() const { \
return QObject::parent(); }<br>&gt;&gt; #else<br>&gt;&gt; &nbsp; &nbsp; &nbsp;using \
QObject::parent;<br>&gt;&gt; #endif<br>&gt;&gt; <br>&gt;&gt; For qfilesystemmodel.h \
this is missing and hence one cannot call<br>&gt;&gt; QObject::parent() with a \
pointer or instance of it.<br>&gt; <br>&gt; Huh. So is it a Qt bug, then? Seems a \
little strange that it has gone<br>&gt; unnoticed for so long (since at least 4.7). \
But maybe there's a<br>&gt; specific reason why QFileSystemModel is be treated \
differently to all<br>&gt; the other model classes.<br>&gt; <br>&gt; Looks like \
Q_NO_USING_KEYWORD has been completely removed in Qt-5.5,<br>&gt; but obviously that \
didn't touch qfilesystemmodel.h, so parent() is<br>&gt; still missing \
there.<br><br>...so it's not a PyQt bug \
:)<br><br>Phil<br>_______________________________________________<br>PyQt mailing \
list &nbsp; &nbsp;<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