qtdeclarative/tests/auto/quickcontrols/qquicktreeviewdelegate
MohammadHossein Qanbari 49456f2734 QQuickSelectable: Fix selection in TableView and TreeView on Android
The issue was that the TableView was not selectable on the Android
platform. This was due to
`dynamic_cast<QQuickSelectable*>(QQuickTableViewPrivate*)` returning
null, which prevented the QQuickSelectionRectangle's DragHandler
(responsible for selecting cells by dragging) from being added to the
TableView.

Since dynamic_cast is not fully supported on Android, it fails sometimes
(returns null instead of performing the cast), when interface types lack
a key function (a non-inline and non-pure virtual function). To resolve
this, we need at least one key function.
References:
* https://developer.android.com/ndk/guides/cpp-support under "RTTI"
section
* https://developer.android.com/ndk/guides/common-problems under
"RTTI/exceptions not working across library boundaries" section

This patch adds a destructor (key function) for the QQuickSelectable
type to address this issue.

Additionally, related tests in TableViewDelegate and TreeViewDelegate
have been removed from the BLACKLIST.

Fixes: QTBUG-101159
Task-number: QTBUG-114636
Pick-to: 6.8 6.5
Change-Id: I91440b0b2f746e866d242d12fb20918a4830cd39
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-11-28 03:23:37 +01:00
..
data Correct license for test files 2024-02-27 10:32:21 +01:00
CMakeLists.txt Add Qt::Qml before Qt::QmlPrivate to auto tests 2024-10-22 01:27:15 +03:00
testmodel.cpp Correct license for test files 2024-02-27 10:32:21 +01:00
testmodel.h Correct license for test files 2024-02-27 10:32:21 +01:00
tst_qquicktreeviewdelegate.cpp Correct license for test files 2024-02-27 10:32:21 +01:00