On Qt6, QML apps with editable text fields output these errors on the console: file:///home/nate/kde/usr6/lib64/qml/org/kde/desktop/private/MobileCursor.qml:33:13: Unable to assign [undefined] to bool file:///home/nate/kde/usr6/lib64/qml/org/kde/desktop/private/MobileCursor.qml:33:13: Unable to assign [undefined] to bool file:///home/nate/kde/usr6/lib64/qml/org/kde/desktop/private/MobileCursor.qml:33:13: Unable to assign [undefined] to bool file:///home/nate/kde/usr6/lib64/qml/org/kde/desktop/private/MobileCursor.qml:33:13: Unable to assign [undefined] to bool file:///home/nate/kde/usr6/lib64/qml/org/kde/desktop/private/MobileCursor.qml:33:13: Unable to assign [undefined] to bool The issue is trivially reproducible by launching `elisa`, or `plasma-discover` in a terminal window and focusing a text field. The problem is here: https://invent.kde.org/frameworks/qqc2-desktop-style/-/blob/master/org.kde.desktop/private/MobileCursor.qml#L33 visible: MobileTextActionsToolBar.shouldBeVisible MobileTextActionsToolBar is a singleton accessed from the same directory, hence this file has no import line. And that shouldn't be required, right? And yet it can't find the singleton, and then visible: falls back to true, and then you see the mobile text toolbar too.
See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/254
Thanks!
Git commit 7e1df8f248ee565b9c7d421dbf591660fcbb95cc by Joshua Goins. Committed on 13/06/2023 at 22:09. Pushed by redstrate into branch 'master'. ECMQmlModule: Add support for singleton types, support paths Fixes needed for qqc2-desktop-style to work (see: https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/254). There are two problems here: * Our auto-generated qmldir has no way to specify which components are singletons. * Our auto-generated qmldir does not set the filepaths properly. qqc2-desktop-style installs files under private/ but the qmldir still refers to qml files as if they are in the root directory. The way to mark qml components as singletons is shamelessly stolen from the new Qt6 CMake API - by using set_source_file_properties and QT_QML_SINGLETON_TYPE. M +13 -6 modules/ECMQmlModule.cmake https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/7e1df8f248ee565b9c7d421dbf591660fcbb95cc
Git commit 2ea5c6602d97a088b95f00970cb9ad55479fb197 by Joshua Goins. Committed on 13/06/2023 at 22:10. Pushed by redstrate into branch 'master'. Set MobileTextActionsToolBar as singleton type M +1 -0 CMakeLists.txt https://invent.kde.org/frameworks/qqc2-desktop-style/-/commit/2ea5c6602d97a088b95f00970cb9ad55479fb197