[Qt-interest] Qt5 and SQL
Andre Somers
andre at familiesomers.nl
Tue Jun 7 07:39:22 CEST 2011
Op 6-6-2011 17:47, Alan Ezust schreef:
> I see the QtSql module as a nice start for a database independent way
> of accessing databases.
> But the first thing I stumbled on when I was learning it and also when
> teaching it to others is the confusing name given to this class:
> "QSqlDatabase".
>
> it does not represent a database. It is a connection.
>
> Shouldn't someone start the process of renaming it to QSqlConnection,
> having a deprecated typedef to QSqlDatabase in Qt5, so that we can
> remove QSqlDatabase from Qt6?
To be honest, you are the first I have heard up this confusion. *Many*
people are confused about what QThread is (thinking it is a thread
rather than managing one), but I never encountered anyone having
problems with the name of QSqlDatabase. The Qt SQL module has real
issues, but I don't think this is an important one. If one were to
re-design the complete API for it, then sure, refactor QSqlDatabase into
something that makes more technical sense, but just a rename for the
sake of renaming seems none-produtive to me. There are bigger fish to fry.
André
More information about the Qt-interest-old
mailing list