introduce ApplicationItem
ClosedPublic

Authored by mart on Mar 24 2017, 6:05 PM.

Details

Summary

This item, can emulate ApplicationWindow and
is supposed to be used in applications that for some reason
need the UI to be loaded in QQuickView

Test Plan

tried the gallery to use an ApplicationItem instead of an
ApplicationWindow, seems to work in the same way

Diff Detail

Repository
R169 Kirigami
Branch
arcpatch-D5166
Lint
No Linters Available
Unit
No Unit Test Coverage
mart created this revision.Mar 24 2017, 6:05 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptMar 24 2017, 6:05 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol edited edge metadata.Mar 24 2017, 6:36 PM

Shouldn't we make the ApplicationWindow use the ApplicationItem instead of fully forking the code?

mart added a comment.Mar 24 2017, 7:16 PM
In D5166#97372, @apol wrote:

Shouldn't we make the ApplicationWindow use the ApplicationItem instead of fully forking the code?

I'm not sure it's possible, as it would change the parent/child relationships of contentItem/header/footer and a piece would need to be forked anyways as ApplicationWindow inherits from AbstractApplicationWindow and ApplicationItem inherits from AbstractApplicationItem

leinir accepted this revision.Apr 4 2017, 9:41 AM

i am inclined to ship this - there are the following couple of things which do show up, but the item works as expected anyway, and i now have a version of Calligra Gemini using Kirigami for a large part of its UI (there are details to be sorted as yet, including a not inconsiderable amount of UX reworking because of the old non-Kirigami-esque workflow design created by Cohere back in the day, but that is not caused by Kirigami, of course, and in particular not this item - so for the parts which are Kirigami-based now, it works :) )

file:///usr/share/calligragemini/qml/WelcomePage.qml:35:19: QML GlobalDrawer: cannot find any window to open popup in.
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/AbstractApplicationItem.qml:306: TypeError: Cannot read property of null
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/AbstractApplicationItem.qml:105: TypeError: Cannot read property 'drawerOpen' of null

This revision is now accepted and ready to land.Apr 4 2017, 9:41 AM
mart added a comment.Apr 6 2017, 9:07 AM
In D5166#99686, @leinir wrote:

i am inclined to ship this - there are the following couple of things which do show up, but the item works as expected anyway, and i now have a version of Calligra Gemini using Kirigami for a large part of its UI (there are details to be sorted as yet, including a not inconsiderable amount of UX reworking because of the old non-Kirigami-esque workflow design created by Cohere back in the day, but that is not caused by Kirigami, of course, and in particular not this item - so for the parts which are Kirigami-based now, it works :) )

file:///usr/share/calligragemini/qml/WelcomePage.qml:35:19: QML GlobalDrawer: cannot find any window to open popup in.
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/AbstractApplicationItem.qml:306: TypeError: Cannot read property of null
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/AbstractApplicationItem.qml:105: TypeError: Cannot read property 'drawerOpen' of null

yeah, i encounterd them.
unfortunately everything inheriting from QQC2 Popup will work kinda wonky under QQuickViews.. reparenting at the proper moment seems tough to make the thing still functional and just generate that warning

mart updated this revision to Diff 13136.Apr 6 2017, 9:09 AM
  • add to qrc
This revision was automatically updated to reflect the committed changes.