Review Request 112880: Added KColorSchemeToken class.

Kevin Ottens ervin at kde.org
Wed Oct 9 18:11:36 BST 2013



> On Oct. 1, 2013, 2:47 p.m., Sebastian Kügler wrote:
> > kdeui/colors/kcolorschemetoken.h, line 70
> > <http://git.reviewboard.kde.org/r/112880/diff/6/?file=192050#file192050line70>
> >
> >     using int here loses the type-safety. Why no use the corresponding enums? It would also make the code more readable.
> >     
> >     (Same issue for all the other methods.)
> 
> Denis Kuplyakov wrote:
>     I have tried it, but have such errors:
>     Error: Unknown method parameter type: QPalette::ColorGroup
>     
>     See this: http://qt-project.org/forums/viewthread/10308/ . It seems that the int is only way to make it works correct.
> 
> Sebastian Kügler wrote:
>     Have you tried registering that enum using qmlRegisterType?
> 
> Denis Kuplyakov wrote:
>     Yes, I have, but 0 is always go to function. Have you read the link above, such behaviour was described there.

Likely missing a Q_ENUMS somewhere to get that to work. You might want to roll your own enum type and map it to QPalette::* internally.


- Kevin


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


On Oct. 6, 2013, 7:24 p.m., Denis Kuplyakov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112880/
> -----------------------------------------------------------
> 
> (Updated Oct. 6, 2013, 7:24 p.m.)
> 
> 
> Review request for KDE Frameworks and kdelibs.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> It is wrapper to access KColorScheme's methods from QML code.
> Also added Q_GADGET to KColorScheme to enable Q_ENUMS using, to make them accessible from QML code.
> 
> As it will be accepted, QML-clone of KgPopupItem will be posted for review to libkdegames, as it uses it to access KDE's color theme.
> 
> More info:
> * search for "KDE theme colors API for QML" thread at kdelibs and kdegames mailinglists *
> 
> 
> Diffs
> -----
> 
>   kdeui/CMakeLists.txt b439e04 
>   includes/CMakeLists.txt cdf0143 
>   includes/KColorSchemeToken PRE-CREATION 
>   kdeui/colors/kcolorscheme.h 17570fd 
>   kdeui/colors/kcolorscheme.cpp a6650ac 
>   kdeui/colors/kcolorschemetoken.h PRE-CREATION 
>   kdeui/colors/kcolorschemetoken.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/112880/diff/
> 
> 
> Testing
> -------
> 
> I've tested it with KReversi's deniskup/gsoc2013/newdesign branch.
> 
> 
> Thanks,
> 
> Denis Kuplyakov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131009/c2836272/attachment.htm>


More information about the kde-core-devel mailing list