QMLScreen: do not declare the engine a member
ClosedPublic

Authored by gladhorn on Jul 30 2018, 7:07 AM.

Details

Summary

There is no need for this, the only use of the engine is when creating QQMLOutputComponent.

Diff Detail

Repository
R104 KScreen
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gladhorn created this revision.Jul 30 2018, 7:07 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 30 2018, 7:07 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gladhorn requested review of this revision.Jul 30 2018, 7:07 AM
romangg accepted this revision.Jul 30 2018, 7:29 AM
romangg added a subscriber: romangg.

Note, that m_engine is set in widget.cpp. But it's just a Cpp call to setEngine, which is defined extra. So removing the property macro should be fine.

This revision is now accepted and ready to land.Jul 30 2018, 7:29 AM
broulik added inline comments.
kcm/src/declarative/qmlscreen.h
108–109

This entire custom engine handling could be removed, with QMLScreen using qmlEngine(this) when creating an QMLOutput

gladhorn added inline comments.Jul 30 2018, 7:42 AM
kcm/src/declarative/qmlscreen.h
108–109

I had briefly tried and got a nullptr from qmlEngine, but I didn't really spend time on it.

gladhorn updated this revision to Diff 38857.Jul 31 2018, 4:36 PM

Remove more cruft

This revision was automatically updated to reflect the committed changes.