[Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

Thiago Macieira thiago.macieira at intel.com
Wed Jul 31 20:04:04 CEST 2013


On quarta-feira, 31 de julho de 2013 16:53:46, Niels Dekker wrote:
> On 2013-07-31 16:24, Sergio Ahumada wrote:
> > I think those headers were made private in Qt 5.1 (they were
> > public by mistake).
> > Anyways, what if you do something like:
> > QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
> 
> Thank you, Sergio. So even Qt 4 users should not #include
> <QtSql/QODBCDriver> or do 'new QODBCDriver', right?

Right.

> FWIW, I do think calling QSqlDatabase::addDatabase(new QODBCDriver) is
> more type safe than calling QSqlDatabase::addDatabase("QODBC"): Typo's
> in the class name 'QODBCDriver' are likely to be detected earlier than
> typo's in the string "QODBC".

Correct, but that implies making the class public. It can't be, because it 
includes private API (other _p.h headers).

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130731/41f8e302/attachment.sig>


More information about the Interest mailing list