Fix warnings
ClosedPublic

Authored by apol on Feb 15 2018, 2:11 AM.

Details

Reviewers
mart
Group Reviewers
Kirigami
Commits
R169:b95460a4f831: Fix warnings
Summary

Make sure the page header is destroyed with the page itself
Don't duplicate logic to fetch the lastItem from the pageStack
Make sure we are not calling null items

Test Plan

manual testing on discover and kirgami gallery

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Feb 15 2018, 2:11 AM
Restricted Application added a project: Kirigami. · View Herald TranscriptFeb 15 2018, 2:11 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Feb 15 2018, 2:11 AM

Much better! I still get a few warnings though:

file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/ToolBarApplicationHeader.qml:49: TypeError: Cannot read property of null
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/ToolBarApplicationHeader.qml:48: TypeError: Cannot read property of null
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/OverlaySheet.qml:244:9: QML NumberAnimation: Binding loop detected for property "topOpenPosition"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/OverlaySheet.qml:406:9: QML Binding: Binding loop detected for property "value"
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/templates/OverlaySheet.qml:406:9: QML Binding: Binding loop detected for property "value"
mart added a subscriber: mart.Feb 15 2018, 10:00 AM
mart accepted this revision.Feb 15 2018, 11:19 AM
This revision is now accepted and ready to land.Feb 15 2018, 11:19 AM
This revision was automatically updated to reflect the committed changes.
ratijas added inline comments.
src/controls/templates/ApplicationHeader.qml
278

Component attached object is a very special type in QML. It doesn't work that way. In fact this whole Connection block does nothing, while that Component.onDestruction only runs when the Connections object is destroyed as a whole.