Created attachment 120881 [details] sample app producing described TypeErrors SUMMARY I created a very basic QML application (attached) that is based on QApplication (and not QGuiApplication). I then add a Menu with a MenuItem that has a custom contentItem set. When run the engine will produce a TypeError (though everything still seems to work): file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/MenuItem.qml:98: TypeError: Cannot read property 'height' of null Similarly, when adding a ComboBox also with customized contentItem then the engine produces 5 TypeErrors for each instance of the ComboBox: file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/ComboBox.qml:52: TypeError: Cannot read property 'pressed' of null file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/ComboBox.qml:178: TypeError: Cannot read property 'selectionStart' of null file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:62: TypeError: Cannot read property 'selectedText' of null file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:70: TypeError: Cannot read property 'selectedText' of null file:///usr/lib/qt/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:78: TypeError: Cannot read property 'canPaste' of null The TypeError for the MenuItem can be hidden when adding the following line: arrow: Item {} I have not figured out a solution to prevent the 5 TypeErrors for the ComboBox. STEPS TO REPRODUCE 1. Compile attached sample app 2. Run app 3. OBSERVED RESULT 1 TypeError due to the MenuItem, 5 TypeErrors due to the ComboBox. EXPECTED RESULT No TypeErrors. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.16.0 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.3
Edit: Changed Product to 'unknown'. I had it as Kirigami initially as the first TypeError happens in a line where Kirigami shows up, but it seems to be due to some id problems outside of Kirigami. I don't know which product this falls under, hence 'unknown'.
Always better to guess at the product rather than use Unknown. Why do we even have that lol?
This happens when I click in a TextField in my tiny QML app: file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:61: TypeError: Cannot read property 'selectedText' of null file:///usr/lib64/qt5/qml/QtQuick/Controls.2/org.kde.desktop/private/MobileTextActionsToolBar.qml:69: TypeError: Cannot read property 'selectedText' of null
Git commit a759ed533f8bdc6eef287589706a9199387bb15e by David Faure. Committed on 01/07/2019 at 10:33. Pushed by dfaure into branch 'master'. MobileTextActionsToolBar: fix runtime warnings when controlRoot isn't set yet Summary: This file checks for controlRoot being undefined, everywhere else. FIXED-IN: 5.60 Test Plan: `qmlscene tests/testComboBox.qml` showed MobileTextActionsToolBar.qml:62: TypeError: Cannot read property 'selectedText' of null MobileTextActionsToolBar.qml:70: TypeError: Cannot read property 'selectedText' of null MobileTextActionsToolBar.qml:78: TypeError: Cannot read property 'canPaste' of null Reviewers: mart, apol, broulik, ngraham Reviewed By: apol, ngraham Subscribers: astippich, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D21514 M +3 -3 org.kde.desktop/private/MobileTextActionsToolBar.qml https://commits.kde.org/qqc2-desktop-style/a759ed533f8bdc6eef287589706a9199387bb15e