[Development] How to fix TableView's API break?

Pierre-Yves Siret py.siret at gmail.com
Mon Dec 19 09:52:17 CET 2022


Le lun. 19 déc. 2022 à 04:51, Giuseppe D'Angelo via Development <
development at qt-project.org> a écrit :

> To me this is quite weird. This must be the *only* place in Qt
> model/view APIs where (column,row) is used instead of (row,column), and
> I don't seem to find any justification for this.
>
> Does anyone know?
>
>
> ---
>
> What's more: there's inconsistencies already all over the place in
> TableView! For instance positional functions take (x,y), and not (y,x):
>

Related issue : https://bugreports.qt.io/browse/QTBUG-104733
QML TableModel redefining QAIM methods with different signatures.

---
>
> So, how to fix the above? One could easily fix the API break, but one is
> left with broken APIs all over the place. There's no straightforward
> deprecation mechanism for QML either, and we've dropped versioned includes.
>
> Should one concoct TableViewV2 and TreeViewV2 to fix all the above
> shortcomings? If so, can we have an exception to the feature freeze?
>

That's a hard question to answer and that's a shame we have to, not
releasing an API that goes against 20 years of Qt history would have been
easier.

I don't think QML versioning would help. Having completely different
function signatures between `import QtQuick x` versus `import QtQuick y`
would be super error prone.
Maybe a compile time flag? a runtime one? To switch between the current way
it is done and a saner and consistent with the rest of Qt one.

Regards,
Pierre-Yves Siret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20221219/af43cb87/attachment.htm>


More information about the Development mailing list