[Desktop Containment] Create AppletAppearance component only once
ClosedPublic

Authored by broulik on Aug 27 2016, 5:55 PM.

Details

Summary

Instead cache the created component. Also check its status rather than doing a string comparison on errorString and only call it if it actually failed.
Moreover, initialize AppletAppearnce already with category set.

Test Plan

Still works.

QML Engine has a component cache but still I think calling Qt.createComponent repeatedly (especially since gc will collect it later on when it falls out of scope) should be avoided?

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 6322.Aug 27 2016, 5:55 PM
broulik retitled this revision from to [Desktop Containment] Create AppletAppearance component only once.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 27 2016, 5:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Aug 27 2016, 6:04 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Aug 27 2016, 6:04 PM
This revision was automatically updated to reflect the committed changes.