> 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. > > Kevin Ottens wrote: > 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.
If there are no Q_ENUMS it will not work as it is now. You can see QPalette source and it has it. - Denis ----------------------------------------------------------- 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 > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel