Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0
-
None
-
fc0bbf8a78c19a71287c5f37a23d74b723fb35c0 (qt/qtquickcontrols/5.15)
Description
Commit 22d708697f6 (27-Apr-2020) added a new warning message in Accessible if attached to a non-Item:
--- a/src/quick/items/qquickaccessibleattached.cpp +++ b/src/quick/items/qquickaccessibleattached.cpp @@ -335,14 +337,15 @@ QQuickAccessibleAttached::QQuickAccessibleAttached(QObject *parent) : QObject(parent), m_role(QAccessible::NoRole) { Q_ASSERT(parent); - QQuickItem *item = qobject_cast<QQuickItem*>(parent); - if (!item) + if (!item()) { + qmlWarning(parent) << "Accessible must be attached to an Item"; return; + }
This prints a warning when loading TableViewColumn.qml, because TableViewColumn extends QtObject, not Item, but sets Accessible.role at line 139:
Accessible.role: Accessible.ColumnHeader
Since it's just a warning, the program still runs, but the spurious terminal output is annoying.
Attachments
Issue Links
- duplicates
-
QTBUG-86890 Warning with FileDialog
- Closed