summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-1414-128/+196
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * qpsql: fix spelling in commentMark Brand2013-02-121-2/+1
| | | | | | | | | | Change-Id: I3d1abd6041a4adf425ba7851146659655fc12183 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * move QSqlResultPrivate to private headerMark Brand2013-02-113-68/+140
| | | | | | | | | | | | | | Change-Id: Ice5464989530d521f65703daa080cb2094afef3c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * QSqlResult::savePrepare() simplify logicMark Brand2013-02-091-6/+5
| | | | | | | | | | | | Change-Id: If0b54a4c17f1c71c2bb33ae4d514ad6a9cc17e4c Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * QSqlResult: consolidate SQL parsing for bindingIsrael Lins2013-02-091-26/+3
| | | | | | | | | | | | | | Consolidated SQL parsing for binding values, removing repeated code. Change-Id: I77aadcfd2673b067f7deb52b826d7b5a2ba2ae2a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * QSqlResult: note in doc about misnamed methodMark Brand2013-02-091-0/+2
| | | | | | | | | | | | Change-Id: I488a915622445527c529b35db639ec3b6e887d1d Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * fix QSqlTableModel:revert() for OnFieldChangeMark Brand2013-02-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | revert() should operate in OnFieldChange edit strategy just as submit() does. The reason in Qt 4 for excluding OnFieldChange was that there was no opportunity to revert. The model was refreshed, causing all changes to be lost. In Qt 5 a failed edit remains in the cache until user action, which could be to revert. Change-Id: Ide021c4f83a53834b7ed81f2abfa3aa49317704d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * QSqlTableModel: support refreshing inserted rows with auto columnsMark Brand2013-02-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, selectRow() did not work after INSERTing a new row into a table with an automatically populated column. It did not work because the model did not know the primary values for the new row. Newly inserted rows were therefore not refreshed in OnFieldChange and OnRowChange edit strategies. This change provides support for the typical simple case where a single column is populated by the database and can be retrieved with QSqlQuery::lastInsertId(). Task-Number: QTBUG-29102 Change-Id: Ibf0f0ac8661185bde57034ddf40c2178bece4778 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lukas Geyer <lgeyer@gmx.at> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * QSqlTableModel::setData(): fix non-change detectionMark Brand2013-02-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 10ff9de91bedf93852f13a58287afd8831644759 introduced the optimization of ignoring non-changes, but it overshot the mark. It neglected to consider that QVariant's equality operator does not compare the null flag. It also failed to consider that setData() has a useful side effect of setting the generated flag in a column of a pending INSERT. This is important when the application actually wants a NULL to be inserted into the column. Task-number: QTBUG-29217 Change-Id: I1368f7acc21eebfeb5a8d23746fc38f6f30fd395 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * fix QSqlTableModel::headerData() for empty query with inserted rowMark Brand2013-02-062-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSqlQueryModel::headerData() relied on virtual indexInQuery() to detect whether the requested column at row 0 mapped to an index in the query. This failed when row 0 was a pending insert managed by QSqlTableModel, and therefore not in the query. The only thing that matters here is the column. Task-number: QTBUG-29108 Change-Id: I3e0ae85ba223e444781ec8033386d394bb44f0e8 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * remove misleading statement from ~QSqlDatabase()Mark Brand2013-02-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The presence of the sentence "If this is the last QSqlDatabase object that uses a certain database connection, the database connection is automatically closed" is misleading, whether or not the statement is true. It is about an internal detail of QSqlDatabase's implementation. As such it is not appropriate for user documentation. The user should be focused on how to use addDatabase(), cloneDatabase() and removeDatabase() correctly. Task-number: QTBUG-29481 Change-Id: I0c39584be260e13340834c34098368fcce4a7419 Reviewed-by: Florian Paul Schmidt <mista.tapas@gmx.net> Reviewed-by: Sune Vuorela <sune@vuorela.dk> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * fix doc page urlsOswald Buddenhagen2013-02-041-1/+1
| | | | | | | | | | | | | | they are versioned nowadays Change-Id: I839db633e9d7d63c9d445f8e914b529bd7ce60a2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * substitute fixed version numbers in qdocconf files with variablesOswald Buddenhagen2013-02-011-5/+5
| | | | | | | | | | | | Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * don't prematurely reduce LIBS when adding sql link listsMark Brand2013-01-284-4/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | qsql ibase: remove duplicate class definitionMark Brand2013-02-051-23/+0
| | | | | | | | | | | | | | | | Follow-up to 1580f558472e2c37936fe817fc546a79a8b0a9a5 Task-number: QTBUG-29455 Change-Id: Id254a166ac901fb0cc0ba81db4bf1051a2acb53f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Remove dependency of DB driver headers on qsqlcachedresult_p.h.Friedemann Kleint2013-02-0110-125/+152
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-291-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-281-1/+1
| |\| | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| | * Doc: Fix module name formatSze Howe Koh2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2923-91/+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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2265-65/+65
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1865-65/+65
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-169-0/+48
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Remove the QtSql driver headers from the APIThiago Macieira2013-01-149-0/+48
| | | | | | | | | | | | | | | | | | 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>
* | Bump Qt version to 5.1.0Frederik Gladhorn2013-01-151-5/+5
|/ | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fix warnings in the SQL drivers found by GCC 4.7Thiago Macieira2012-12-284-13/+17
| | | | | | | | | | | qsql_psql.cpp:774:12: error: enumeration value 'CancelQuery' not handled in switch [-Werror=switch] qsql_mysql.cpp:1163:12: error: enumeration value 'CancelQuery' not handled in switch [-Werror=switch] qsql_sqlite.cpp:527:12: error: enumeration value 'CancelQuery' not handled in switch [-Werror=switch] qsql_odbc.cpp:88:97: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format] qsql_odbc.cpp:706:76: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] Change-Id: I79965283057e92a44a0c8375530cfb30107c891c Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Bump Qt version to 5.0.1Sergio Ahumada2012-12-211-5/+5
| | | | | Change-Id: Ie8f437b8dfe8a67c7b34321439dd988a02612437 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use PG_VERSION if PG_MAJORVERSION is not definedAndy Shaw2012-12-201-16/+21
| | | | | | | | | | | When only PG_VERSION was available for getting the client driver version for PostgreSQL it meant that it would not detect the client version and subsequently would not set the connection up correctly as a result. This fixes the blob test already in tst_qsqlquery. Change-Id: Ie2176a43b6be9c0e835498fca5aea129f0cc8fc6 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: Correcting qhp link to Qt SQL's C++ Classes.Jerome Pasion2012-12-171-1/+1
| | | | | | Task-number: QTBUG-28579 Change-Id: I0faae04ab125236554cb39659169780e2ab64629 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Workaround with hardcoded url QT-BUG 28500Nico Vertriest2012-12-111-1/+1
| | | | | Change-Id: I385c14401ced85b12ce65446b224de6910bf3b37 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* SQL: Change in QSqlResultPrivate::positionalToNamedBinding()Caroline Chao2012-12-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | With the change cff46983a, prepared queries can now store a named paramater to be used more than once. When using ?, thus positional binding, there is no named parameter, thus there is no need to store it. When prepare is called from a query with ?, it currently causes an error when the feature QSqlDriver::NamedPlaceholders is true. Because holders values are called while holders is actually empty. QSqlDriver::NamedPlaceholders is true for QOCI plugin only but the problem is independant of the plugin used. Adding a test case with a test driver to make the test runnable without Oracle installed. Change-Id: I6d7491f7e09a7b62d2d4d216b40fedd67e927e27 Reviewed-by: Matt Newell <newellm@blur.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: removed control code+minor rephrasingNico Vertriest2012-12-071-3/+3
| | | | | | | | | QTBUG-28382 Change-Id: Ic166fcb283d3339853c68a71be9aebd6cfed0523 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Docs: Fix some warningsChristian Stenger2012-12-063-5/+3
| | | | | Change-Id: I3898c89e54aa671ff8cb1b25c49cfe3835ab9384 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Remove obsolete statementChristian Stenger2012-12-061-3/+0
| | | | | Change-Id: Ic7f14dae391684a4870e030ab4549b3a59f1ea5f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Always use QAIM to get the default flags.Stephen Kelly2012-11-281-2/+2
| | | | | Change-Id: I801f5c8023e3e3672fde28139a7f34f640e650f5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tr()-Fix: Do not add up translateable strings.Friedemann Kleint2012-11-261-2/+1
| | | | | | | | | Placeholders might go to a different position in translated strings. Change-Id: Id6a84ea931dc0487bd72eb8d01669369a3dce9c6 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix example paths in example manifests that are used by Qt Creator.Eike Ziller2012-11-261-0/+2
| | | | | | Task-number: QTBUG-27801 Change-Id: I345c009fc0e4e1c1eabb43ad142e3b474e7a6fee Reviewed-by: hjk <qthjk@ovi.com>
* create interface QSqlDriver::cancelQuery()Sune Vuorela2012-11-202-1/+27
| | | | | | | | | This is useful for canceling a long running sql query. Note that it needs support from the individual drivers. Change-Id: Ia170a70487ff4ee13c85f12bc13e62fb198617fe Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge branch 'newdocs'Eskil Abrahamsen Blomfeldt2012-11-206-37/+30
|\ | | | | | | | | | | | | | | | | | | | | Added prepare_docs to qt_build_config.prf (it was added directly in configure in the source branch) Conflicts: configure tools/configure/configureapp.cpp Change-Id: I1337c69fc62b1c934e3e39b4409e4857440c9db8
| * Doc: Cleaning up QHP information in module configuration files.Jerome Pasion2012-11-071-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a common standard among all Qt modules. These changes affect the final .qch file for each module. Changes: 1)URL in qt-project.org is confirmed by DevNet maintainer url = http://qt-project.org/doc/<module> 2)Landing page title mapping indexTitle = landing page 3)"C++ Classes" as a child node. The list of C++ classes and the titles are specified in the wiki. 4)Removed extra subprojects. They are not needed for now. Each module may need additional nodes. Change-Id: I1825476c21fe9aaddc9d6b512ff74229f17271a0 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge branch 'master' of ssh://codereview.qt-project.org/qt/qtbase into newdocsJerome Pasion2012-11-022-12/+0
| |\ | | | | | | | | | Change-Id: I7e6cee190a341901dfbf8effb54ebccb91bf7a17
| * | Doc: Removed the HTML template from the .qdocconf filesJerome Pasion2012-10-261-1/+0
| | | | | | | | | | | | | | | | | | | | | -qt-module-defaults.qdocconf already contains the HTML template. Change-Id: I5757741166f0f688ce0e8a4e77ed45fd4d72f1c7 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-262-3/+1
| |\ \ | | | | | | | | | | | | Change-Id: I10cf9f915c602c8e5a0e7d7c9e17b7bc5ca00640
| * \ \ Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-162-11/+7
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: If2168c519daf45390af04af9ef9722770453a493
| * | | | doc: Add a bunch of missing dependsTor Arne Vestbø2012-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I32c3730f8181d73a7c8e36ef382c74b8da754269
| * | | | doc: Fix a few doc errors for QtSQLTor Arne Vestbø2012-10-126-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The examples include path already contains 'sql', so we can't prefix the includes with 'sql' as well. Changing the include path to also include the parent examples directory is not an option, as qdoc will then try to generate output for example single example. Change-Id: Ifae07af86e60e6105a0625f29fbd6bc8f73b2550 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | | | SQL: Fix OCI driver's compile errors.Caroline Chao2012-11-202-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-27979 Change-Id: I4ae4cdba855c05bc6fab0f845ff16a96c8119fdb Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> 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>
* | | | | Fix msvc2010 compiler warnings of switch with default but no case labelsThiago A. Correa2012-11-188-32/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5de4d7405131314c4e2bdb1222d2bb1a2d34a993 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>