Make KColorScheme compatible with QVariant
ClosedPublic

Authored by vkrause on Sep 18 2019, 6:01 PM.

Details

Summary

This requires default constructability and a meta type declaration. The
use-case for this is to expose a KColorScheme instance to Grantlee.

Diff Detail

Repository
R265 KConfigWidgets
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Sep 18 2019, 6:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 18 2019, 6:01 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
vkrause requested review of this revision.Sep 18 2019, 6:01 PM
dfaure added a subscriber: dfaure.Sep 18 2019, 7:11 PM

Does this break source compatibility with code currently doing Q_DECLARE_METATYPE(KColorScheme) already?

Does this break source compatibility with code currently doing Q_DECLARE_METATYPE(KColorScheme) already?

No, as Q_DECLARE_METATYPE requires the type to have a default ctor, which it did not have until now.

dfaure accepted this revision.Sep 18 2019, 7:50 PM

Haha that's lucky!

This revision is now accepted and ready to land.Sep 18 2019, 7:50 PM
This revision was automatically updated to reflect the committed changes.