summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* 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-032-2/+2
| | | | | | | | | | | 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>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QSqlQueryModel: suppress insert and remove signals while resettingMark Brand2012-08-302-4/+86
| | | | | | | | | | There is no need to emit signals for inserting and removing rows and columns while resetting the model. Suppress these signals in such a way that subclasses can benefit without worrying about it. Change-Id: I04447c87173be54a7323b97608cdd40ae245b80b Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSqlQueryModel: fix nested beginResetModel/endResetModelMark Brand2012-08-302-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to 83c9ebbd6692cde99ee692e6549c591100f12545. Consider the case where calls to the reset methods on the same object are nested as in the following sequence: 1. beginResetModel() 2. beginResetModel() 3. endResetModel() 4. endResetModel() In such cases, only the outermost calls, i.e., 1) and 4), should emit signals. After 83c9ebbd6692cde99ee692e6549c591100f12545, 1) and 3) emitted the signals, which is wrong. This is corrected by keeping track of the nesting level. Such sequences can come about when a base class calls the begin/end methods between the calls made by the subclass. QSqlTableModel::select() is an example of this. Test included. Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* docs: remove \reimp from non-virtual methodsMark Brand2012-08-302-3/+2
| | | | | | | It seems we need \internal in this case. Change-Id: I3f290bb0d22f9f3b5d04d27b13a7ef8961b2dd6c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Exclude the examples/widgets/doc dir for all but widgets.Frederik Gladhorn2012-08-291-0/+2
| | | | | | | | There are too many references to the QWidget lib documentation in there. On the other hand this keeps snippets working. Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* documentation: grammar nitpickMark Brand2012-08-291-3/+3
| | | | | | Change-Id: Ibf16731f04f2c53adeff1b8b1fcc6f1555e3613d Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Bill King <bill.king@nokia.com>
* Fix doc errors.Frederik Gladhorn2012-08-284-11/+3
| | | | | Change-Id: I38d01d3b5d2b9b15edd389ea17142bd75f00e135 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* qsql_oci: use OCI_COMMIT_ON_SUCCESS for SELECT without transactionMark Brand2012-08-131-7/+2
| | | | | | | | | | Otherwise, the open statement, say in QSqlQueryModel, will prevent other statements from running. Task-number: QTBUG-18608 Change-Id: Icdd6817fb981678be6fb70ade21a8123e152dcf6 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* rename qt_module_config.prf => qt_module.prfOswald Buddenhagen2012-08-081-1/+1
| | | | | | | this is more logical, following the qt_plugin and qt_tool scheme. Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add possibility to add OpenSSL, DBUS, MySQL path under WindowsAndreas Holzammer2012-08-071-0/+5
| | | | | | | | | | | Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Doc: Adding a landing page for Qt SQL.Jerome Pasion2012-08-063-3/+37
| | | | | | | | -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>
* QSqlTM: add reimplemented record() methodMark Brand2012-07-172-3/+34
| | | | | | | | | | | QSqlQueryModel::record(row) populates the record it returns with values from virtual data(), so the values themselves can be supplied by QSqlTableModel. However, it is also desirable to be able to interrogate QSqlTableModel for the actual current record in its cache, including properties such as the generated flag. Change-Id: I733901913b7d237d5762448e953a99b5bd83fc7f Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* QSqlTM: use generated flag more correctly in setRecord()/insertRecord()Mark Brand2012-07-171-11/+19
| | | | | | | | | | | | The generated flag should affect the generation of SQL commands rather than how the fields of the source record are applied to the model before submitting. This correction allows setRecord() to be used to change TRUE generated flags to FALSE. Clarified documentation on this point and updated change log. Change-Id: I7ee124930822561ed8beee6c6259970b3e929c9b Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Fix error when inserting to tables with datetime fields with QODBCThiago A. Correa2012-07-161-4/+42
| | | | | | | | | | | | | SQL Server 10 introduced stricter rules for TIMESTAMP validation, making it necessary to specify the decimal digits. Other databases might do the same as well, so this patch introduces a check for the TIMESTAMP column size and adjusts the decimal digits parameter as needed. Task-number: QTBUG-2192 Change-Id: If6d798c6c928ebda75bc474e49a07fbbfbe5816c Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: Fix typo foreigh -> foreignSergio Ahumada2012-07-161-1/+1
| | | | | | Task-number: QTBUG-23260 Change-Id: I922a8b5cba5d8784305fb1779ccd352ab2ece365 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add support for SQLSTATE error codesAndras Mantia2012-07-031-12/+18
| | | | | | | | | | | | | Postgres can report detailed information about an error using error codes. See http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html . The current driver doesn't report the error, nor is it supported by the QSqlError object. The patch appends the error to the error message, helping applications to: - handle different errors in a specific way - show correct, translated error messages, independently on the language of the postgres installation Change-Id: Ica3530ac33d3aaa9985e06f6c1f302ece9891033 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* 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-252-2/+2
| | | | | | | | 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>
* fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
* automatically add QT_BUILD_FOO_LIB to DEFINESOswald Buddenhagen2012-06-191-1/+0
| | | | | Change-Id: I35d9861e48469eb5cc8824e361450684047e6559 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* clean up projects from QPRO_PWD nonsense, etc.Oswald Buddenhagen2012-06-191-1/+0
| | | | | Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTIONOswald Buddenhagen2012-06-191-2/+0
| | | | | | | less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate module prisOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* automatically add the version header to HEADERSOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make qt_module_config.prf install the module pri fileOswald Buddenhagen2012-06-191-1/+0
| | | | | | | | | absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.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>
* Use the correct ifdef (QT_WIDGETS_LIB) in qsqlrelationaldelegate.hKent Hansen2012-06-061-2/+2
| | | | | Change-Id: I4cdb1eef7dab55c7d295463fe8ad29b5480b0788 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QSqlResult: replace virtual hooks with virtual functionsMark Brand2012-06-0615-63/+63
| | | | | | | | | | | | | | | | | | 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>
* Itemviews: compile with QT_STRICT_ITERATORSThiago Macieira2012-05-261-1/+1
| | | | | | | Just a few mixed up iterators. Change-Id: I19f62457ee24bc844fadd182ba61866e259e9636 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Add a default license footer.Casper van Donderen2012-05-111-0/+1
| | | | | | | | The CSS for the footer is not completely correct, but at this time it is better to have something than nothing. Change-Id: I7371e1e458a2abafcdb0fca5564ad73e209d64c3 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* QtSql: remove \link usagesGiuseppe D'Angelo2012-05-112-10/+10
| | | | | | 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>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-102-4/+3
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Properly implement a 'make docs' target for subdirs and apps/libsMarius Storm-Olsen2012-05-092-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only call qdoc for projects which sets the QMAKE_DOCS variable to point to a qdocconf file. Exclude examples/ and tests/ from the qdoc run, by adding no_docs_target to CONFIG for those projects. Change-Id: Ic856c8f19db59309302d0602b3e99735609e525a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.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>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtSql]Thiago Macieira2012-05-055-23/+23
| | | | | | | | | | 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>
* Change QtSql documentation to recommend QString::toUtf8Thiago Macieira2012-05-031-3/+3
| | | | | Change-Id: I604166677ea182553adffc4835050f2964f2aef9 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add "make docs" target for QtNetwork and sanitize other qdocconfs.Casper van Donderen2012-05-021-20/+20
| | | | | Change-Id: Ic9d6384b20162debeb69cb067c96c330c0fd999a Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-1/+1
| | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Doc: Fix most qdoc errors in QtSql.Casper van Donderen2012-04-2835-167/+3667
| | | | | | | | | - 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>
* Fix memory leaks in 64-bits ODBC driverHonglei Zhang2012-04-261-2/+4
| | | | | | | | | | | | | | On 64-bits Windows system, integers and longs are still 4 bytes values. Several functions that were previously defined with SQLINTEGER and SQLUINTEGER parameters have been changed where appropiate to use new SQLLEN and SQLULEN typedefs. SQLGetStmtAttr() is one of these functions. This fix replaces SQLINTEGER with SQLULEN in appropriate functions to avoid memory leaks. Task-number: QTBUG-25256 Change-Id: I744927f42b8578ece60815df360e3b337ebf452a Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlQueryModel::setQuery() don't use deprecated reset()Mark Brand2012-04-234-50/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the method attempted to reset only as a last resort. Now reset() is deprecated and resetting must happen between emitting modelAboutToBeReset() and modelReset(). Since this suffices in all cases to notify views that they must reinterrogate the model, it is no longer necessary to signal explicitly row removals and insertions within the scope of the reset. Additionally, fetchMore() is now called within the scope of the reset so insert signals do not have to be emitted here either. This improved handling of resetting in QSqlQueryModel also allows the cache in QSqlTableModel to be cleared directly at select(). This change may actually allow views to operate more efficiently since they no longer have to react to separate row removal and insert signals. Views can avoid pointless deallocation and reallocation by considering row count only after the reset is finished. The cost is that the columns and horizontal headers must be considered in the view at each setQuery() call. In any case, it is not clear that trying to be smart about this in the model justifies additional complexity. Tests had to be adjusted where they expected explicit row removal and insert signals. Change-Id: I4f7eac1419824361d7d9bdcc6a87092b33e80d7a Task-Id: QTBUG-25419 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* QSqlQueryModel::fetchMore() documentation fixMark Brand2012-04-231-1/+1
| | | | | | Change-Id: If046e674abad9c2dcff934a2fdd80d4133e1f4ad Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* remove useless workaroundMark Brand2012-04-171-2/+1
| | | | | | | | | | | | | | The workaround attempts to let the application reserve memory in QString for receiving the stored procedure output parameter. This does not work because the reserved capacity is not preserved through QVariant. Unfortunately, the application must actually populate QString with at least the number of characters that will be received. Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>