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

Scott Aron Bloom scott.bloom at onshorecs.com
Wed Jul 31 22:15:08 CEST 2013


Frankly... I would extend his concern to CSS/StyleSheets/QML etc etc..

That more and more of software development is going to "code it and pray it works when you test it while also praying you exercise the text at runtime" worries me as well :)

Scott

-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Constantin Makshin
Sent: Wednesday, July 31, 2013 1:01 PM
To: Qt Interest
Subject: Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

While class names and #include-s are certainly safer because they are checked at compile-time, but text names unleash the real power of QtSql — unified API (which, IMHO, doesn't make much sense if you stick your application to one particular RDBMS) and ability to make the database interface selectable by the final user. :)

P.S.:
I know SQL is not 100% the same everywhere, but this problem is much less serious than different native database APIs. :)

On 07/31/2013 07:23 PM, Niels Dekker wrote:
> On 2013-07-31 16:52, Mark Brand wrote:
>> The SQL driver headers were made explicitly private. For  the 
>> reasoning behind this, see commit 
>> 1ee11474622e7da068fb1cd26f509ed10848a3b5 and the related change in Gerrit.
> 
> Thanks, I found the commit at
> http://qt.gitorious.org/~peter-h/qt/peter-hs-qtbase/commit/1ee11474622e7da068fb1cd26f509ed10848a3b5 
>   It says that "no one used those headers in Qt 4", but well... I did  
> :-)
> 
>> If you follow the pattern in the "Detailed Description" [1] of the 
>> documentation of the QSqlDatabase class, you won't need to explicitly 
>> instantiate the driver in your code, or include the header that 
>> declares its constructor.
> 
> FWIW, in general, as a C++ programmer, I prefer to type class names 
> and #include statements, which are checked at compile time, rather 
> than literal strings, which are only checked at run-time. But if the 
> QODBCDriver class is unsupported, I'll stop using it, of course!
> 
>> [1] https://qt-project.org/doc/qt-5.1/qtsql/qsqldatabase.html#details
> 
> Thanks for the link!
> 
> Kind regards, Niels
> --
> Niels Dekker
> http://www.xs4all.nl/~nd/dekkerware
> Scientific programmer at LKEB, Leiden University Medical Center



More information about the Interest mailing list