[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KDE theme colors API for QML
From:       Kevin Krammer <krammer () kde ! org>
Date:       2013-08-15 11:15:12
Message-ID: 201308151315.13261.krammer () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday, 2013-08-09, Денис Купляков wrote:
> > In case you are referring to C++ code that is currently using
> > KColorScheme enums, then no, that code can stay unchanged.
> 
> I don't understand how it can be made? I have seen many uses like
> KColorScheme::NormalBackground, but it will need to be rewriten to
> BackgroundRole::NormalBackground if BackgroundRole is wrapper class
> for enum?

No, KColorScheme is still there, so usage of its enum is also still valid.

> > Any QML adapter would simply translate the values.
> > If the enums of the adapter are equal to the one of KColorScheme (which
> > is likely because this is the desired use), then "translating" is a
> > simple cast.
> 
> Still we need to stay in sync between this adapter and KColorScheme
> enums that is not good in part of maintaining code.

First I wouldn't expect that the enum changes a lot, if at all. Second, since 
this adaptor is only there for exporting an existing enum, it could be 
autogenerated during build time, thus always be in sync.

> I still want to know about is Q_GADGET solution or not?

Hmm, yes, that might work as well. Might be an idea to suggest that for KDE 
Frameworks 5.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic