qt: register qml type ListViewRev15 or ListViewRev11 as ListViewCompat

This commit is contained in:
Fatih Uzunoglu 2023-03-21 18:28:21 +02:00 committed by Steve Lhomme
parent e4702070a5
commit 7abb46903d
1 changed files with 9 additions and 0 deletions

View File

@ -342,6 +342,15 @@ void MainUI::registerQMLTypes()
qmlRegisterType(QUrl("qrc:///util/TouchScreenTapHandlerRev11.qml"), uri, versionMajor, versionMinor, "TouchScreenTapHandlerCompat");
#endif
qmlRegisterType(QUrl(QStringLiteral(
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
"qrc:///util/ListViewRev15.qml"
#else
"qrc:///util/ListViewRev11.qml"
#endif
)),
uri, versionMajor, versionMinor, "ListViewCompat");
qmlProtectModule(uri, versionMajor);
}