knotificationitem: api prettiness

Aaron J. Seigo aseigo at kde.org
Wed May 27 13:27:26 CEST 2009


On Tuesday 26 May 2009, Marco Martin wrote:
> Hi all,
> was talking with richmoore about the api of libknotificationitem, wat did
> emerged is a thing i wasn't happy about but couldn't quite quantify before:
>
> 1) we have two way to set icons: by name and by pixmap, right now by name
> is setIcon()
> by pixmap is setImage()
> (that should reflect in dbus too)
> that looks a bit weird, would be better maybe setIconName() and setIcon()?

another proposal:

setIconByName
setIconByPixmap

that way we don't end up with a setIcon(QIcon) that the compiler would use 
silently when someone ports from KSystemTray to KNotificationItem (we really 
want to discourage use of the setIcon(QIcon) method) and it says exactly what 
it's doing.

thoughts?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090527/66fbde7c/attachment.sig 


More information about the Plasma-devel mailing list