[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: [patch] Avoid crash in KoColorPopupAction
From: Thomas Zander <zander () kde ! org>
Date: 2009-07-31 6:13:03
Message-ID: 200907310913.03723.zander () kde ! org
[Download RAW message or body]
On Thursday 30 July 2009 23:46:52 ext Jarosław Staniek wrote:
> Hi, for review:
> When KoColorPopupAction (for whatever reason) receives invalid QColor,
> KoColor asserts [1].
>
> The patch falls back to transparent black color and issues a warning.
Its a short patch, which I think is good :)
I do have some suggestions;
QColor(0, 0, 0, 255) is equivalent to QColor() but thats more readable. So
maybe you can use that instead?
The kWarning should get an appropriate debug area. (30004 seems applicable)
I suggest putting the if () { } part in an #ifdef NDEBUG to avoid this check
and the printing of the warning in real packages.
Looks good to me otherwise.
--
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic