summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Check for C++ operators that should be 'const'Sergio Ahumada2012-09-082-4/+4
| | | | | | | | Make sure all C++ class comparison operators are const. Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <faure@kde.org>
* Use QStringList::join(QChar) overload where applicable [QtSql]Marc Mutz2012-09-031-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ie395d82d17710683968d006d22de313ef49dc6e5 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix doc errors.Frederik Gladhorn2012-08-283-9/+1
| | | | | Change-Id: I38d01d3b5d2b9b15edd389ea17142bd75f00e135 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Doc: Adding a landing page for Qt SQL.Jerome Pasion2012-08-062-2/+2
| | | | | | | | -Simple landing page which contains a link to the SQL guide and API. -Gave a new title to C++ API page. Change-Id: I54eca4f6933bafa0affd5825e7fe2e1a2522dad0 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix some typos.Frederik Schwarzer2012-07-262-2/+2
| | | | | | | Change-Id: I3c3c96fbbc19e2a69ac2f22618f15f5262718e50 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-295-0/+13
| | | | | | | | | | | | | | | | | | | | QtPlatformSupport is a static library. It should never export anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary. QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros on their own source trees. It's possible these modules might be separated out from qtbase in the future. For QtDBus, the macros are moving back to where they used to be. This also leaves qglobal.h only creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the core libraries. Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used anywhere in the Qt sources, so simply delete them. And the Q_QUICK1_EXPORT macro in the static section was wrong, so remove it too. Change-Id: I50bdf86e783338f814903b25979721f788a7becf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix docs mentioning Q_EXPORT_PLUGIN2Lars Knoll2012-06-251-1/+1
| | | | | | | | Fix all remaining places where Q_EXPORT_PLUGIN2 was being used in the documentation. Change-Id: I7be67b83c18545d0e74f250b4b26583444b01909 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QFactoryInterface from sql driversLars Knoll2012-06-073-22/+10
| | | | | | | Change-Id: Ib31e6c4ce5264fc1e4281c8846df5630a6479a7c Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QSqlResult: replace virtual hooks with virtual functionsMark Brand2012-06-064-33/+28
| | | | | | | | | | | | | | | | | | Instead of virtual functions which would have broken binary compatibility, virtual_hook() was used to implement the virtual functionality. Now, since the step to Qt 5.0 allows breaking binary compatibility, we take the opporunity to simplify the code using real virtual functions. SetNumericalPrecision --> setNumericalPrecisionPolicy() NextResult --> nextResult() DetachFromResultSet --> detachFromResultSet() BatchOperation --> execBatch() Task-number: QTBUG-25252 Change-Id: Idd3a870f876d8b8a7457559d5f31ec2073786a75 Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Replace QVariant::typeToName usage by QMetaType::typeName call.Jędrzej Nowacki2012-05-281-1/+1
| | | | | | | | | Type information is kept in QMetaType class. QVariant is delegating operations, so it is better to use QMetaType directly. Change-Id: I91209fa1c9dc4303d6bd47c96824d3cd64ce5291 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtSql: remove \link usagesGiuseppe D'Angelo2012-05-111-1/+1
| | | | | | Change-Id: I9723c34184b298e8b0a2be7185416b9e911f948e Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-112-5/+5
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* No longer use deprecated methods for plugin loading.Friedemann Kleint2012-05-091-9/+10
| | | | | Change-Id: I19c66b1c41ea4dd236726c86d7d071b210ec9244 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix most qdoc errors in QtSql.Casper van Donderen2012-04-288-152/+118
| | | | | | | | | - Move 2 images from qtdoc. - Add "make docs" command for qtsql - Fix qdoc command usage errors. Change-Id: Id2f0548d09ed8f77b2317863d443c19d1cccdd83 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-104-62/+46
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Documentation cleanupDebao Zhang2012-03-311-24/+0
| | | | | | | | | | | | | | They are comments of Qt3 support members which have been removed already. Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Add payload to QSqlDriver notification with PSQL implementation.Matt Newell2012-03-312-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Postgres async notifications can contain a payload parameter that is currently discarded. This patch provides the QSqlDriver api change necessary to deliver a payload with each emitted notification by adding a QVariant parameter to the notification signal. It also provides the implementation for the qsqlpsql driver. The qsql_ibase driver has been updated to reflect the change to the notification signal signature. The eventNotificationPSQL test in the qsqldatabase test has been expanded to test proper payload sending and receiving. All tests/auto/sql/kernel tests have been run with sqllite and postgres with no regressions. Task-number: QTBUG-13500 Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix postgres notification support in the QPSQLDriver.Matt Newell2012-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a critical bug in the qsqlpsql driver where notifications aren't delivered when received. Any blocking libpq function(specifically PQexec) will read all the incoming data from the socket, including any pending notifications. This would cause the socket notifier to never be fired for incoming notifications that are already queued inside libpq. The qsqldriver test case was skipping the postgres notification test because of this bug, now its enabled and passing. In order to fix this bug I made a wrapper function for PQexec in QPSQLDriverPrivate that calls _q_handleNotification via QMetaObject::callMethod QueuedConnection in order to deliver pending notifications when control returns to the event loop. I also added a flag to ensure only one call is made each time the event loop is entered. Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Allow named bind values to be used multiple times per queryMatt Newell2012-03-301-35/+42
| | | | | | | | | | | | | | | | | | | | | | Prepared queries should be able to use a name parameter more than once. Currently this will result in undefined behavior and crashes. This patch fixes the bug and implements the needed test case. Task-number: QTBUG-6420 Change-Id: I07d6537e432a9b2781e9ef3d9f597bceb054527e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* | QSqlDriver functions made virtualMatt Newell2012-04-022-186/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain QSqlDriver functions were marked to be made virtual in Qt5. subscribeToNotification, unsubscribeFromNotification, subscribedToNotifications, isIdentifierEscaped, and stripDelimiters. This patch makes them virtual and removes the no longer needed Implementation counterpart functions. It also updates the relevant drivers. This patch has no regressions on the tests in tests/auto/sql/kernel/, tested with sqlite and postgres. Change-Id: Ia2e1c18dfb803531523a456eb4e710031048e594 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | QtSql: make some constructors explicitMarc Mutz2012-03-123-5/+5
|/ | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I3a79f66f9705bc991175f396138efe3088727a85 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-023-113/+113
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove use of Q_BROKEN_DEBUG_STREAM.Stephen Kelly2012-02-221-6/+0
| | | | | | | | No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ensure that QSqlDatabase::database() is still thread-safeAndy Shaw2012-02-171-4/+1
| | | | | | | | | | | | | | | | QSqlDatabase::database() is documented to be thread-safe and when the driver is queried for the numericalPrecisionPolicy set then it can comprimise the thread-safety. Since the driver itself (if one is set) will be queried for the numericalPrecisionPolicy when numericalPrecisionPolicy() is called on the QSqlDatabase then we can have it fallback to the default instead rather than taking the driver's own setting. Task-number: QTBUG-13423 (cherry picked from commit e7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2) Change-Id: Ie7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Various documentation fixes ported from Qt 4.8Teemu Katajisto2012-02-021-2/+3
| | | | | | | | | | | | | | | Selected fixes for qtbase from 4.8 commit 3826203f744a2147bebf5f088de0d524156f59fd Task-number: QTBUG-9466 Task-number: QTBUG-7924 Task-number: QTBUG-20355 Task-number: QTBUG-19367 Task-number: QTBUG-14554 Change-Id: I551251dd8a87d7dd837e5927050ffd14bce9a97c Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* SQL driver implementation to signal notification sourcesTorben Dannhauer2012-02-012-4/+15
| | | | | | | | | | | Implements the new notification signal in all QSql drivers which use notifcation. In qt5 only ibase and psql have a notification implementation. PSQL differentiates correctly between 'SelfSource' and 'OtherSource' whereas ibase only signals 'UnknownSource' as a default implementation. Change-Id: Ifcaa139b7a980ed852cf817b3f93284609360ca7 Reviewed-by: Torben Dannhauer <torben@dannhauer.info> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Interface definition to provide notifications with a source information.Torben Dannhauer2012-02-012-0/+13
| | | | | | | | To differentiate between signals of different sources types, this submission adds an enum and extra signal to provide it. Change-Id: Iad711739c41894e9c74d83072c50ae17edc695f2 Reviewed-by: Torben Dannhauer <torben@dannhauer.info> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3023-23/+23
| | | | | | | | | | 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>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2510-10/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2323-23/+23
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Rename all our interfaces from com.trolltech to org.qt-projectLars Knoll2012-01-191-1/+1
| | | | | | Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0523-23/+23
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Check driver validity before using itHonglei Zhang2011-12-121-3/+4
| | | | | | | | | | | | Even though it is stated in the documentation that the SQL driver must remain valid during the life time of QSqlQuery, there are users who don't follow the rule. It's common that the destructor of QSqlQuery is called after the driver is already deleted. This fix checks the validity of the SQLite driver before QSqliteResult uses it in destructor. Task-number: QTBUG-16967 Change-Id: If0f52113f12e14102da1671cd6e12bdaa267114f Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix typos in Sqlite docs.Stephen Kelly2011-12-051-2/+2
| | | | | | Change-Id: I4a57e9e37831c135b1ad620c8c9586a5eea76220 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* SQLite support only one statement at a timeHonglei Zhang2011-11-231-0/+6
| | | | | | | | | | | SQLite driver support only one statement at a time. This fix makes the exec and prepare call failed if more than one statements are given. This is bug fix for QTBUG-21884. Also the behaviour is documented in the API specification. Task-number: QTBUG-21884 Change-Id: If1e25a0dd9f9ee38961ef478fc7909f6b05e360a Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix most warnings about assignments of QAtomicInt.Friedemann Kleint2011-10-312-7/+4
| | | | | Change-Id: Ide409d72d2637b68ec2a85aaca4bc783a7e911e7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-272-3/+3
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'suzuki toshiya2011-09-121-2/+2
| | | | | | | | | | | | | | | | | | Merge-request: 1299 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> (cherry picked from commit 81f0c44f6a4fd4cfa41af5d5b292008185bf3981) Conflicts: src/qt3support/itemviews/q3listbox.cpp src/qt3support/sql/q3datatable.cpp src/qt3support/text/q3richtext.cpp src/scripttools/debugging/qscriptcompletiontask.cpp src/scripttools/debugging/qscriptdebuggercodeview.cpp Change-Id: Ie70590e77e69fbb9b2322c48c3963fd9cbba19e6 Reviewed-on: http://codereview.qt-project.org/4581 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add operator== and operator!= to qsqlerror classAntonis Tsiapaliokas2011-08-242-0/+22
| | | | | | | | | | Merge-request: 44 Task-number: QTBUG-20543 Change-Id: I7b88985fe095ffd2e48ac05c82dc3f3a92dbb091 Reviewed-on: http://codereview.qt.nokia.com/3425 Reviewed-by: Charles Yin <charles.yin@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove QT3_SUPPORT from qsql, qxmlGabriel de Dietrich2011-07-0612-222/+0
| | | | | | | Change-Id: Iab36ef60de2f0201efa4eb86d8ed5e514d6244fb Reviewed-on: http://codereview.qt.nokia.com/1188 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-2423-384/+384
| | | | | | | 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-2724-0/+8470
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