[Panel-devel] [PATCH] Extend setSvg to display a specific	elementID
    Aaron J. Seigo 
    aseigo at kde.org
       
    Fri Dec 21 07:43:08 CET 2007
    
    
  
On Thursday 20 December 2007, Shawn Starr wrote:
> One extra thing:
>
> Icon::Private::Private()
>
>     : svg("widgets/iconbutton"),
>
>       iconSvg(0),
>       iconSvgElement(0), <---------
>
> Initialize the QString as empty.
QString initializes to QString(). no need to init.
+    if (!elementid.isEmpty()) {
+        d->iconSvgElement = elementId;
+    }
you don't want the if () there; consider:
icon->setSvg(firstSvg, "foo);
icon->setSvg(secondSvg);
it will still try and render "foo" element, which we don't want anymore. so 
just always assign d->iconSvgElement whatever gets handed in.
otherwise, looks good, please commit.
-- 
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 Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071220/6c2bc477/attachment.pgp 
    
    
More information about the Panel-devel
mailing list