summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/tds
Commit message (Collapse)AuthorAgeFilesLines
* qsql: apply Qt's PIMPL idiom to Q*ResultPrivateMark Brand2015-12-052-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QResult and QResultPrivate are not derived from QObject and QObjectPrivate respectively, but can still benefit from Qt's PIMPL idiom. There are several interrelated aspects to this: - Base all driver ResultPrivate classes on QResultPrivate. Previously, each level in the Result hierarchy tended to keep its own private data class. - The ResultPrivate class initializes its own Result (q_ptr) and Driver members. This ensures that these pointers are correctly set in time for the ResultPrivate constructors and Result constructors. This is more efficient and makes it a lot easier to follow what's being allocated, initialized, and cleaned-up. - Use macros Q_DECLARE_PRIVATE, Q_DECLARE_PUBLIC, Q_D, and Q_Q for access to and from ResultPrivate objects. - ResultPrivate classes refer frequently to their counterpart DriverPrivate. Various patterns were used to do this. Now Q_DECLARE_SQLDRIVER_PRIVATE arranges this uniformly while hiding ugly casting. It creates a public method in the ResultPrivate returning the correctly typed pointer to the corresponding DriverPrivate object. Since the method is public, the Result class and helper classes and functions can also use it. - The explicit const is removed from QResultPrivate::sqldriver, even though it is treated (mostly) like a const within the context of Result and ResultPrivate. This is the same pattern seen in Qt's PIMPL idiom. The macro created getter methods take care of const. - qsql_mysql was using a signal/slot connection to zero its own copy of the driver pointer when the driver was destroyed. This is no longer necessary. Change-Id: Ida4933bc92fb3e9a05ea4b53b48085894734e36e Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* qsql: add missing Q_DECL_OVERRIDEMark Brand2015-11-302-22/+22
| | | | | Change-Id: Ic562ee9e287f21d73b94f6dc3c4884a2ed33b9fe Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* qsql: remove stray includes and forward declsMark Brand2015-11-261-2/+1
| | | | | | Change-Id: I9b8f6283c7e98ab071473f684f3fc22b1c0c7273 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-112-14/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Expose QSqlDriverPrivate dbmsType in public QSqlDriver apiMatt Broadstone2014-09-241-1/+1
| | | | | | | | | | dbmsType was previously kept as a private variable in QSqlDriverPrivate, however it's particularly useful for QODBC users. [ChangeLog][QtSql][QSqlDriver] Add support for determining DBMS type from SQL driver. Change-Id: If1c221520da9ac4ccef85a02db078679d76eac92 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update license headers and add new license filesMatti Paaso2014-09-242-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Replace win32-g++ with mingw scopeKai Koehne2014-01-171-1/+1
| | | | | | | | Commit 773dd01 introduced a general mingw platform scope, which is cleaner and more flexible than matching the spec name. Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTDSDriver: fix index out of rangeMark Brand2013-04-041-1/+1
| | | | | | | | Follow-up to 5544208e2. Change-Id: Iba3ff291622533e8050ddc0494e4488233727ebe Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSqlDriver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATEMark Brand2013-04-042-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 406c8ef6e67da introduced deriving the private SQL driver classes from QSqlDriverPrivate. However, the drivers continued to keep their own pointer to the private class, even though QObject provides the same pointer. Worse yet, the private class is allocated too late and not even passed to QSqlDriver. The result is that QSqlDriver allocates a separate instance of QSqlDriverPrivate. This is likely to cause all kinds of chaos. The private class needs to be allocated in time pass it to QSqlDriver which passes it on to QObject. This commit covers the the base class and drivers: ibase mysql odbc psql sqlite tds Fixes for the remaining drivers will follow. Change-Id: Id8e7ec4205b0ca6cd00bd022c9cd24f137089245 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Move the dbmstype to QSqlDriverPrivate so it can be used for all driversAndy Shaw2013-04-021-3/+3
| | | | | | | | | By moving it to QSqlDriverPrivate we make it easier to check what database is actually connected which is particularly useful for the autotests. Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Adapt the newly-renamed SQL driver headers to proper private headersThiago Macieira2013-02-261-5/+11
| | | | | | | | | | Add the "We mean it" text and remove the now-unnecessary syncqt macros that used to prevent those headers from being added to the master includes. Change-Id: I03ac2a452bc6ac43ebba502bc0ecbf5ee1adf314 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Rename the SQL driver header files to _p.h (make private)Thiago Macieira2013-02-263-2/+2
| | | | | | | | | | | | | The drivers were never public API. They were exposed by mistake in public headers. What's more, they have #include'd a private header (qsqlcachedresult_p.h) since at least Qt 4.5.1. That means no one used those headers in Qt 4 (private headers weren't installed then) and it's unlikely anyone did in 5.0. Change-Id: Ie0a47bcf0260ee6bdd3d8494b78fd1eec28a2d6b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * don't prematurely reduce LIBS when adding sql link listsMark Brand2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | It's possible that different database libraries share dependencies. We need to keep their link lists intact here so that QtSql's .prl and .pc files will have them in the right order. Particularly important when building the drivers into QtSql and using static linking. Change-Id: Id371b127099f2790fe7cccd0c7059607600f447d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Remove dependency of DB driver headers on qsqlcachedresult_p.h.Friedemann Kleint2013-02-012-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | Move the QXXResult classes inheriting the private class QSqlCachedResult from header into the source files for SQLite, SQLite2, Interbase/Firebird and TDS/Sybase and Oracle. Task-number: QTBUG-28088 Change-Id: Ia16d30e442e313c8165282b8a3f012fd95d96759 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | Fix warning about type-punned pointersThiago Macieira2013-01-261-18/+24
|/ | | | | | | | | | | | | | The d->buffer array was 2x the required size and every other void* actually stored a DBINT (int) indicating the binding status of the null. The qIsNull function checked that value, but got the warning printed. Instead, let's just do the right thing and have a struct for each column. Solves the problem more neatly. Change-Id: I2daaf05c876da7e0e13fb983c58916d946518846 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-182-2/+2
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove the QtSql driver headers from the APIThiago Macieira2013-01-141-0/+5
| | | | | | | | | These headers are technically private API, since they include private headers. They should be _p.h actually, but that change I'll leave for 5.1. Change-Id: I2dec222854e147da0fc166de311012472954012e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix error reporting in TDS SQL driver.Aaron McCarthy2012-11-181-2/+4
| | | | | | | | | | | | | | | | | | | | The error and message handlers used by the freetds library were getting reset to back to the default every time a database was opened. The Qt TDS SQL driver was calling dbinit() from QTDSDriver::open(). This had two problems: 1. dbinit() would reset the error handler previously set by a call to dberrhandle(). A db error would then cause the application to abort. 2. freetds expects dbinit() and dbexit() to be called symmetrically. Opening multiple database connections would result in freetds not cleaning up on application close. Solved by moving the dbinit() call into the QTDSDriver constructor. Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-48/+48
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* remove mentions of borland from project filesOswald Buddenhagen2012-09-191-2/+0
| | | | | Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* sql: Include own headers firstSergio Ahumada2012-09-191-2/+2
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I225bc0f09988167ae7f938f7f21a77d05a3d191b Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtSql]Thiago Macieira2012-05-051-3/+3
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Icb3ab0e1f4f3173563f3de36115b5457cf1ba856 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Introduce Q_DECLARE_OPAQUE_POINTERJoão Abecasis2012-02-091-12/+3
| | | | | | | | | | | | To hide the IsPointerToTypeDerivedFromQObject monstruosity :-) Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated to mention requirements on registered types and how they can be circumvented for pointer types with the new macro. Change-Id: If83b037a8e2f28761eb903525e87008107298801 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-302-2/+2
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Store the is-a QObject fact with the metatype declaration.Stephen Kelly2012-01-241-0/+12
| | | | | | | | | | | | | | This is a source incompatible change for Q_DECLARE_METATYPE(T*), which now requires T to be fully defined. The consequences of this are: * Forward declared types can no longer be declared as a metatype. (though this is a very uncommon thing to do). There is a trivial workaround where necessary. Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-232-2/+2
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-052-2/+2
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compiler warnings.Friedemann Kleint2011-09-281-0/+1
| | | | | | | Change-Id: I6b6d86097074a12c9c4e3d22fe61a6b962ffa21e Reviewed-on: http://codereview.qt-project.org/5627 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-242-34/+34
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-273-0/+981
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12