Fix org.kde.plasma.calendar with Qt 5.10
ClosedPublic

Authored by fvogt on Sep 30 2017, 5:10 PM.

Details

Summary

Module internal types are not implicitly available anymore simply by placing
them inside the module's main directory. It is now necessary to mention them
as internal types in the qmldir file.

See qtdeclarative commits 22a2cc43387ec3b9f74a6c01f8665378a4541147 (introduced
the change) and 930aea8b9ca59a24838cf7f279653e3b2ee40cee (explanation)

Test Plan

Built whole stack with Qt 5.10. The digital clock plasmoid does not
load due to the DaysCalendar type not being available. With these changes to
qmldir and a reload of the plasmoid it works.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt created this revision.Sep 30 2017, 5:10 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptSep 30 2017, 5:10 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
broulik accepted this revision.Oct 1 2017, 8:32 PM
broulik added a subscriber: broulik.

Meh.

I suspect there are other modules affected as well?

This revision is now accepted and ready to land.Oct 1 2017, 8:32 PM
This revision was automatically updated to reflect the committed changes.
fvogt added a comment.Oct 1 2017, 9:25 PM

Meh.

I suspect there are other modules affected as well?

I'm not sure, I didn't test anything beyond the default plasma configuration.
A quick scan with a script showed mostly false positives, but also

./qml/org/kde/plasma/components.3/CheckIndicator.qml
./qml/org/kde/plasma/components.3/RadioIndicator.qml

So it probably needs to be fixed for those as well.
I'm not sure where those are actually used.

Despite just having built p-f from git I still get

Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.fuzzyclock/contents/ui/main.qml:51:34: Type PlasmaCalendar.MonthView unavailable
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/calendar/MonthView.qml:222:22: DaysCalendar is not a type

Do I need a newer Qt 5.10 snapshot for this?

fvogt added a comment.Oct 5 2017, 7:14 AM

Despite just having built p-f from git I still get

Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.fuzzyclock/contents/ui/main.qml:51:34: Type PlasmaCalendar.MonthView unavailable
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/calendar/MonthView.qml:222:22: DaysCalendar is not a type

Do I need a newer Qt 5.10 snapshot for this?

I just checked and indeed, 930aea8b9ca59a24838cf7f279653e3b2ee40cee in qtdeclarative ("Fix implicit loading of internal types when using explicit imports") is also necessary.
I thought I tested it without that commit, but apparently not.