[Development] Renaming QGenericItemModel

Volker Hilsheimer volker.hilsheimer at qt.io
Wed May 14 12:29:25 CEST 2025


> On 12 May 2025, at 13:29, Kevin Kofler via Development <development at qt-project.org> wrote:
> 
> Volker Hilsheimer via Development wrote:
>> I suspect that “Adaptor” will be a good term to use for such a class.
> 
> Is this not more commonly spelled "Adapter"?
> 
>        Kevin Kofler

Both spellings are permissible, Adaptor is preferred in UK, Adapter in US English. And since we go with US spelling in APIs and documentation, Adapter would indeed be correct.

Thinking more about the name, perhaps the “Item” is not important:

* we have QAbstractListModel and QAbstractTableModel (not QAbstractList/TableItemModel)
* we have QSqlQueryModel - again no Item
* in a QGenericItemModel, there are no items - there is just a begin/end iterator that can be dereferenced

So, perhaps QRangeModel is good/long/clear enough? “Range” is well defined C++ concept (literally), and Model is a well established concept in Qt.


Volker



More information about the Development mailing list