Make it possible to use KAboutData/License/Person from QML
ClosedPublic

Authored by apol on Nov 21 2018, 6:05 PM.

Details

Summary

Exposes their properties through Q_GADGET.
Makes it possible to export them as QVariant by declaring it and making it possible to create an empty instance of them.

Test Plan

Tests still pass, see Discover patch.

Diff Detail

Repository
R244 KCoreAddons
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5391
Build 5409: arc lint + arc unit
apol created this revision.Nov 21 2018, 6:05 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 21 2018, 6:05 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
apol requested review of this revision.Nov 21 2018, 6:05 PM
anthonyfieroni added a subscriber: anthonyfieroni.

You can't change parameters in methods or constructors, it's a BIC.

You can change default values just fine, it requires re-compilation to use them but no ABI implications.

apol added a comment.Nov 21 2018, 11:41 PM

You can't change parameters in methods or constructors, it's a BIC.

https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B

mpyne added a subscriber: mpyne.Nov 22 2018, 12:44 AM
In D17078#363886, @apol wrote:

You can't change parameters in methods or constructors, it's a BIC.

https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B

To be clear, it is possible to have a change in default values be BIC (as the page describes). The updated code has to still work in compatible fashion if called with old default values (if any), since that is what existing application binaries would have used.

There weren't default values before and even if there were, there's no change in behavior in the methods, so this change would be BC. From a source compat perspective, the changes made here do result in KAboutData becoming implicitly constructible when it wasn't before, which we may not want. Then again, maybe we do?

src/lib/kaboutdata.h
558–560

Do we want to make this constructor explicit since the new default values now make it possible to construct a KAboutData with no parameters at all?

apol updated this revision to Diff 45984.Nov 22 2018, 1:13 AM

Make new constructors explicit

mart added a subscriber: mart.Nov 22 2018, 1:04 PM

adding a default value should be bc, the opposite of course is not..
in its current state, looks good to me

apol added a comment.Nov 26 2018, 4:13 PM

Can somebody accept it or reject it, please? :P

apol updated this revision to Diff 46271.Nov 26 2018, 4:25 PM
apol added a subscriber: aacid.

Add CONSTANT as suggested by @aacid

apol updated this revision to Diff 46272.Nov 26 2018, 4:35 PM

Polishing

apol updated this revision to Diff 46273.Nov 26 2018, 4:39 PM

More @since

apol updated this revision to Diff 46274.Nov 26 2018, 4:42 PM

@since

aacid accepted this revision.Nov 26 2018, 4:45 PM
aacid added inline comments.
src/lib/kaboutdata.h
92

Change "Default arguments @since 5.53" to "name default argument @since 5.53"

This revision is now accepted and ready to land.Nov 26 2018, 4:45 PM
apol marked 2 inline comments as done.Nov 26 2018, 4:47 PM
apol closed this revision.Nov 26 2018, 4:56 PM