[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: I'm feeling dim...
From: Sven Langkamp <longamp () reallygood ! de>
Date: 2004-09-09 19:51:15
Message-ID: 4140B433.9050402 () reallygood ! de
[Download RAW message or body]
Boudewijn Rempt wrote:
>On Thursday 09 September 2004 21:17, Sven Langkamp wrote:
>
>
>>Boudewijn Rempt wrote:
>>
>>
>>>But for the life of me I don't understand the following:
>>>
>>>given a method KisPainter::bitBlt(..., KisPaintDeviceSP dev,...);
>>>
>>>and a
>>>
>>>KisPaintDeviceSP dev = new KisLayer();
>>>
>>>why do I have to do
>>>
>>>bitBlt(..., dev.data(), ...); ?
>>>
>>>I know it works, but it looks wrong, and besides, I cannot figure out
>>>whose method data() is -- it looks like it comes from the shared pointer
>>>wrapper, but I cannot find it there.
>>>
>>>
>>Inherited from KisPaintDevice.
>>
>>
>
>But that's what I don't get -- normally, you use -> to get
>the methods of the shared pointered object, so . should point to
>the shared pointer wrapper. And KisPaintDevice::data() gives a
>tile manager back, not a KisPaintDevice -- which is the type of
>the parameter.
>
I was wrong. KSharedPointer.data() returns the pointer it contains which
is in this case the KisPaintDevice pointer.
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic