Review Request: Add fromTheme property to QIconItem in QtExtraComponents for theme icons in QML

Mark Gaiser markg85 at gmail.com
Tue Nov 1 15:52:17 GMT 2011



> On Nov. 1, 2011, 3:09 p.m., Aaron J. Seigo wrote:
> > plasma/declarativeimports/qtextracomponents/qiconitem.h, line 31
> > <http://git.reviewboard.kde.org/r/103009/diff/1/?file=39961#file39961line31>
> >
> >     could these be automatically detected? e.g. if it can't be resolved into a path to an icon, then call QIcon::fromTheme?
> 
> Mark Gaiser wrote:
>     I guess it can if i use a QVariant. If a string is given i use fromTheme. Would that be a nice solution?
> 
> Marco Martin wrote:
>     you can try to make icon a qvariant, then in seticon have
>     if canconvert<QIcon>()
>     ..
>     else if canconvert<QString>()
>     ...

Right, that is the same thing i thought "could" work. I will give that a try when i get home. Btw. in that case you also lose the fromTheme property since the icon property is enough if the QVariant thing works.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103009/#review7802
-----------------------------------------------------------


On Oct. 31, 2011, 9:27 p.m., Mark Gaiser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103009/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2011, 9:27 p.m.)
> 
> 
> Review request for KDE Runtime and Plasma.
> 
> 
> Description
> -------
> 
> Hi,
> 
> I found it very strange that QIcon::fromTheme was "just working". Sadly in KDE's brand new PlasmaComponents it was simply impossible to use the system icons without using plasma to view the QML. This patch adds a property to QIconItem named: "fromTheme" which allows you to get the icons from the theme you currently use. This patch alone isn't helping a lot of people but i have a second patch ready for PlasmaComponents.Button to make use of this.
> 
> Oke to commit?
> 
> 
> Diffs
> -----
> 
>   plasma/declarativeimports/qtextracomponents/qiconitem.h 9972a98 
>   plasma/declarativeimports/qtextracomponents/qiconitem.cpp d72381e 
> 
> Diff: http://git.reviewboard.kde.org/r/103009/diff/diff
> 
> 
> Testing
> -------
> 
> Tested it with a bunch of different icons in and it all just seems to work fine.
> 
> 
> Thanks,
> 
> Mark Gaiser
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111101/ac7235f6/attachment.htm>
-------------- next part --------------
_______________________________________________
Plasma-devel mailing list
Plasma-devel at kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the kde-core-devel mailing list