Marc-André Lureau writes:
> All QObject types have the base QObject as their first field. This
> allows the simplification of qobject_to().
>
> This explicitly guarantees that existing casts work correctly (even
> though we'd prefer to get rid of such casts in any location except the
> qobject.h
Markus Armbruster writes:
> Marc-André Lureau writes:
>
>> On Thu, Apr 19, 2018 at 5:20 PM, Eric Blake wrote:
>>> On 04/19/2018 10:01 AM, Marc-André Lureau wrote:
All QObject types have the base QObject as their first field. This
allows the simplification of qobject_to().
Th
Peter Maydell writes:
> On 24 April 2018 at 13:18, Markus Armbruster wrote:
>> We define hundreds of QOM types without ever bothering to check the
>> super type comes first. We don't even bother to clearly document it has
>> to come first.
>
> If you don't put the super type first then the firs
On 24 April 2018 at 13:18, Markus Armbruster wrote:
> We define hundreds of QOM types without ever bothering to check the
> super type comes first. We don't even bother to clearly document it has
> to come first.
If you don't put the super type first then the first time you
do MyParent *p = MY_P
Marc-André Lureau writes:
> On Thu, Apr 19, 2018 at 5:20 PM, Eric Blake wrote:
>> On 04/19/2018 10:01 AM, Marc-André Lureau wrote:
>>> All QObject types have the base QObject as their first field. This
>>> allows the simplification of qobject_to().
>>>
>>> This explicitly guarantees that existin
On Thu, Apr 19, 2018 at 5:20 PM, Eric Blake wrote:
> On 04/19/2018 10:01 AM, Marc-André Lureau wrote:
>> All QObject types have the base QObject as their first field. This
>> allows the simplification of qobject_to().
>>
>> This explicitly guarantees that existing casts work correctly (even
>> tho
On 04/19/2018 10:01 AM, Marc-André Lureau wrote:
> All QObject types have the base QObject as their first field. This
> allows the simplification of qobject_to().
>
> This explicitly guarantees that existing casts work correctly (even
> though we'd prefer to get rid of such casts in any location e
All QObject types have the base QObject as their first field. This
allows the simplification of qobject_to().
This explicitly guarantees that existing casts work correctly (even
though we'd prefer to get rid of such casts in any location except the
qobject.h macros)
Signed-off-by: Marc-André Lure