[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [Panel-devel] Patch to cache standard applet background
From: Thomas Georgiou <tageorgiou () gmail ! com>
Date: 2007-07-29 21:58:28
Message-ID: 200707291758.28291.TAGeorgiou () gmail ! com
[Download RAW message or body]
On Sunday 29 July 2007 03:31:38 pm Zack Rusin wrote:
> + if (cachedBackground || cachedBackground->size() !=
> QSize(leftWidth + contentWidth + rightWidth, topHeight + contentHeight +
> bottomHeight)) {
> I don't think this part works.
> if (pointerIsValid || invalidPointer->size() != QSize(...))
> I guess cachedBackground is always valid.
> + if (!cachedBackground) {
> + delete cachedBackground;
> + }
>
> the "if" part is redundant. delete cachedBackground by itself is ok.
This was the only way i could get it to work. Feel free to try and fix it and
explain to me why.
> + p2->drawPixmap(leftOffset, topOffset, *cachedBackground);
> this part works by accident (if at all :) ).
Ah, thanks, I'll end the painter next time. Feel free to do it if you want.
Out of curiosity, what would happen if the painter was a pointer and deleted
before it was ended?
Thomas Georgiou
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic