Improve PageRow code
Clean up ``PageRow``'s code and make methods more strict. Add type checks, remove unnecessary identifiers, and add strict checks when a parameter is a page/array of pages.
- The rules are:
- a page must always be an instance of QtQuick Templates Page.
- a page must not be already present in the view.
- either the array size of pages and properties must match, or properties parameter must be empty or set to null.
- if any of the above rules are broken, it will generate a trace and immediately return null.
Signed-off-by: Matej Starc <matej.starc@protonmail.com>
-
🗯 @ratijasDevelopersomething went wrong in Qt land
qml: Page SubCategoryPage_QMLTYPE_89(0x55cd754983f0) is already in the PageRow file:///usr/local/kde6/lib/qml/org/kde/kirigami/PageRow.qml:223: Error: console.trace(): Invalid arguments
-
🗯 @ratijasDeveloperIt seems that unlike Web API
console.trace()
the Qt version does not accept any arguments, and loudly complains if you pass any. -
🗯 @ratijasDeveloperI looked up what Node/V8 is doing, but couldn't understand a thing xD
-
🗯 @ratijasDeveloperSo anyways I
started blastingpatched Qt😆 https://codereview.qt-project.org/c/qt/qtdeclarative/+/504450
-
@ratijas thank you for fixing it.
Please register or sign in to comment