Don't use qmlRegisterType with QT-5.14
ClosedPublic

Authored by plevine on Nov 30 2019, 5:37 AM.

Details

Summary

Building Plymouth-kcm-5.17.3 against Qt 5.14.0_beta3 fails to build.

I don't have much experience with QT/KDE programming but these
changes are sufficient to fix the build error on my end.

BUG: 414679

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
plevine created this revision.Nov 30 2019, 5:37 AM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 30 2019, 5:37 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
plevine requested review of this revision.Nov 30 2019, 5:37 AM
davidedmundson accepted this revision.Nov 30 2019, 11:27 AM
davidedmundson added a subscriber: davidedmundson.

You'll find this with the other repos too.

In general I've been reverting the relevant path of the cmake that forces no deprecated.

This revision is now accepted and ready to land.Nov 30 2019, 11:27 AM
zzag added a subscriber: zzag.Nov 30 2019, 12:31 PM
zzag added inline comments.
src/kcm.cpp
55

You could use QT_VERSION_CHECK to make the code more readable, e.g.

#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
    qmlRegisterType<QStandardItemModel>();
    qmlRegisterType<KCMPlymouth>();
#else
    qmlRegisterAnonymousType<QStandardItemModel>("KCMPlymouth", 1);
    qmlRegisterAnonymousType<KCMPlymouth>("KCMPlymouth", 1);
#endif
plevine updated this revision to Diff 70645.Dec 1 2019, 12:00 AM

Use QT_VERSION_CHECK for clarity.

ngraham edited the summary of this revision. (Show Details)Dec 26 2019, 8:13 PM
This revision was automatically updated to reflect the committed changes.