summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QTBUG-18435 fix stored procedure output parameters on ODBCMark Brand2012-04-171-5/+6
| | | | | | | | | | | | | | | | Follow-up to c55a99965d8c08d5f924d49db4fe4aa49df8096. 3 problems prevented stored procedure output parameters from working. - SQLBindParameter needs access to buffer provided by QByteArray. - The length of the buffer is measured in bytes. - A typo corrupted conversion back to QString. Also, data() makes more sense than constData() to expose the buffer. Task-Id: QTBUG-18435 Change-Id: I66444b13c0f584ed79bcf026e5a23caff83c22cb Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * QTBUG-1363: fix QSqlField.length() for ODBCMark Brand2012-04-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Applied Bill King's suggestion in QTBUG-1363. Columns of hStmt must be accessed in order. Verified using ODBC driver on SQL Server 2005 on Windows 7. Added test for length of text field for MS SQL Server over ODBC. Task-Id: QTBUG-1363 Change-Id: I6673dafe75e3ef394d41e439adb45096c1421068 Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-1010-112/+123
|\| | | | | | | | | | | | | | | | | | | 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
| * Convert Boolean value into integerHonglei Zhang2012-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | According to documentation, SQLite doesn't have a separate Boolean storage class. Instead, values are stored as integers 0(false) and 1(true). In QSqlQuery::bindValue(), if a boolean value is bound to a placeholder, it is converted to text true and false. This fix converts boolean value to integer 0 and 1. Task-number: QTBUG-23895 Change-Id: I4945971172f0b5e5819446700390033a1a4ce301 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * 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-314-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-302-42/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix crash when an invalid filter is setHonglei Zhang2012-03-302-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | QSqlTableModel::headerData() generates a crash if an invalid filter is set. QSqlQueryModel::indexInQuery() should check the index value before applied to d->colOffsets[]. QSqlQueryModel::initRecordAndPrimaryIndex() is updated to sync the size of rec and colOffsets. Task-number: QTBUG-23879 Change-Id: Ic9f88bb288592aa6fb3c1415cc818632dadaab56 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Update QSqlRelationalTableModel about reference table aliasHonglei Zhang2012-03-301-6/+11
| | | | | | | | | | | | | | | | | | | | | | The current documentation does not mention how the reference table name is aliased in the relational table model. This makes it difficult to use function setFilter(). This commit adds relevant information to the documentation. Task-number: QTBUG-15989 Change-Id: I02cbefb3f2b66c9772557a1fea3d93c2d1696ee9 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-0210-207/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge master into api_changesKent Hansen2012-03-234-153/+141
|\| | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * QSql*Model: add SQL syntax helperMark Brand2012-03-224-86/+97
| | | | | | | | | | Change-Id: Ia53e30d7a2f2bb5b4f76c32fcf0fe526d1e4ab51 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTM/QSqlRTM: improve style and readabilityMark Brand2012-03-222-86/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General changes: const, scope, braces, hash[] for clarity, comment wording and spelling. QSqlRelationalTableModel::selectStatement() readability: Renamed private method. QVector<Class>.value() already defaults to null object value, so there is no point in handling this case explicitly. Alias rec for d->rec added more noise than clarity. Using "tables" list only adds an extra step. Simple concatenation does the trick. Deduplicate code for building table expression and JOIN condition. Change-Id: Ia52afaf3c3937a26595d5ae867982664002562d8 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlRTM: fix whitespaceMark Brand2012-03-221-3/+3
| | | | | | | | | | Change-Id: I0ed9ab93657d35a0e8c74469f72c77fe1fc4c7c1 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-164-43/+98
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * QSqlTableModel::removeRows() enforce edit strategyMark Brand2012-03-151-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, we don't want more than one row in the cache with uncommitted changes. This could happen if deletion in the database fails while other changes are pending. Chosen solution is to return false if other rows have pending changes. Also, we only allow 1 row removed at a time. Updated test, changes and documentation. Change-Id: I68baf6d221789b4754e891535070011c759a2155 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData(): no longer autosubmit for OnRowChangeMark Brand2012-03-151-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The model can never do a good job of knowing when user moves to a new row in the view. Faking it by detecting when another row is changed was not a good solution because it cannot detect when the last edited row is left. Either the view should automatically submit when the user leaves a row or the application should provide a way to submit. This change made it possible to reuse the logic of flags() in setData(). Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel: disallow insert if changes are pendingMark Brand2012-03-151-7/+9
| | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, inserting rows should not be allowed if there are pending changes in cache. Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData()/setRecord(): fix incorrect rowMark Brand2012-03-151-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, before submitting new changes, setData() and setRecord() attempt to submit pending changes and revert them upon failure. However, they fail to consider that reverting pending insertions removes rows from the model. As a result, the new change can be applied to a row higher than intended. One possible solution would be to adjust the targetted index for the removed rows, so that the intended row is affected by the new change. But this still causes the strange editing experience as rows jump up just as they are being edited. It does not seem right in the first place for the model to initiate reverting changes. It should be up to the application to decide what to do when data cannot be committed. In particular, setData() and setRecord() should not have the side effect of reverting already pending changes. The chosen solution is simply to refuse new changes that don't make sense for the edit strategy. For OnFieldChange, flag() will indicate read-only when editing is blocked by a pending change. Since setData() and setRecord() submit data immediately for OnFieldChange, it no longer makes sense to resubmit changes automatically before a new change. For OnRowChange, setData() keeps the behavior of automatically submitting a pending row before starting on a new row. This is historical behavior and is probably motivated by the fact that QTableView does not automatically call submit() when editing leaves a row. The obvious shortcoming of this is that the last row to be edited will not be submitted automatically. It also prevents us from flagging rows other than the pending row as read-only. For OnRowChange, setRecord(), being row-oriented by nature, should submit the change immediately rather than waiting for the next call to setRecord(). This makes setRecord() consistent with insertRecord(). Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel bugfix: consider uncached rows submittedMark Brand2012-03-151-0/+2
| | | | | | | | | | Change-Id: I7ec0529b88fd8e3ae0cf8dadfcb5899579e52745 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * Fix memory leak when sqlite3_open_v2 failsHonglei Zhang2012-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SQLite documentation, a database connection handle is usually returned, even if an error occurs. This behavior has caused Qt to leak memory when opening a database is failed. Now, even if sqlite3_open_v2() does not return SQLITE_OK, Qt tries to release SQLite database handle by calling sqlite3_close(). Task-number: QTBUG-15773 Change-Id: I6538e2897216828a9cfb95b7d4a5cec437aa6c28 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
| * QSqlTableModel::isDirty(): new overloaded methodMark Brand2012-03-122-0/+20
| | | | | | | | | | | | | | | | | | | | | | Checks if model has any changes to submit. Includes new test covering isDirty(index) as well the new overloaded function. Task-number: QTBUG-3108 Change-Id: I0ccbda45d5d9f06434cf1e1c037a9efb76d0cc37 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-121-1/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| * QSqlTableModel::indexInQuery: fix inserted row accountingMark Brand2012-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit b979956ec46093e5668c2b264f9b68da3cbb0326 introduced a distinction between rows that have a pending INSERT operation and rows that have already been inserted in the database but still are in the change cache. Both cases are rows that are not in the underlying query. Unfortunately, we overlooked a case where the point of the test is whether the row is in the query. Change-Id: I0f58bed232d9336fed6e67c3d140fd580ec35868 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* | 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>
* QSqlTableModel::selectRow(): complete documentationMark Brand2012-03-071-0/+2
| | | | | | | | Mention in changes and document Qt version (merci à dfaure). Follow-up to 291e2c7d5416af4d16dc0a6e60df7980ba745a3d. Change-Id: Ie5626e9cd268812c1173ca494ccd8d6bd9be2687 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Improve type detection for query resultsAndy Shaw2012-03-071-4/+29
| | | | | | | | | | | | | | When an aggregate function is used for a column in a SQL resultset then it should ensure that the right data type is reported for that column. This also concerns expressions when the returned column does not map directly to a table column. Test included for this. Task-number: QTBUG-22038 Change-Id: I07487694c0ed393d46af06e232914fe923356a99 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* QSqlTableModel: use selectRow() for field and row edit strategiesMark Brand2012-03-071-12/+24
| | | | | | | | | | | | | | | | Calling select refreshes the query data but disrupts view navigation. For OnFieldChange and OnRecordChange it makes sense to only select the row in question. This does not disturb view navigation. Assume disruption of view navigation is not a problem for OnManualSubmit because the user or application decides when submitAll is called. Task-number: QTBUG-2875 Change-Id: I1e5f68668fb9102f6296d67d543e80daa403f1c4 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>