Fix "Type error" when creating a TextField with focus: true

Authored by dfaure on Jul 20 2019, 11:48 AM.

Description

Fix "Type error" when creating a TextField with focus: true

Summary:
Added simple example "line-edit with clear button" written by Laurent,
to demonstrate the issue.

This leads to a "Type error" warning in MobileTextActionsToolBar.qml
or more precisely with my qtdeclarative fix
https://codereview.qt-project.org/c/qt/qtdeclarative/+/263542
it says:
MobileTextActionsToolBar.qml:47: TypeError: Cannot read property 'height' of null

which means controlRoot.Window.contentItem is null.

I'm not 100% confident with this fix, because it feels like stuff
won't be updated when contentItem is non-null later... But I can't
see a bug, I guess it would only happen on mobile?

Test Plan: qmlscene tests/LineEditWithClearButton.qml

Reviewers: mart, davidedmundson, apol, broulik

Reviewed By: apol

Subscribers: broulik

Differential Revision: https://phabricator.kde.org/D21517