summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | 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. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Improve handling of temporary directories in SQL tests.Friedemann Kleint2014-04-161-1/+2
| | | | | | | | | | | | | | | | | | Initialize directory delayed in shared code and add checks to verify that it is valid. Close attached / cloned databases to prevent locks on files and leaking temporary directories caused by SQLite: QTemporaryDir: Unable to remove "...\Temp\tst_qsqldatabase-P1XkOA" most likely due to the presence of read-only files. QTemporaryDir: Unable to remove "...\Temp\tst_qsqltablemodel-P1XkOA" most likely due to the presence of read-only files. QWARN : tst_QSql::concurrentAccess() QTemporaryDir: Unable to remove "...\Temp\tst_qsql-l0VAKJ" most likely due to the presence of read-only files. In Qt 4, emulate the temporary directory by maintaining a list of files and deleting them in reverse order. Change-Id: If85bbaed04bb1a32e427d642be332996d967f796 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/9a4beb4d36dc0c613e59aa5d88060d521462f56c)
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QSqlTableModel: fix dataChanged() index for removed edited rowMark Brand2013-01-101-0/+12
| | | | | | | | | | | | Last column index is columnCount() - 1 This change is not applicable to Qt 5. Task-number: QTBUG-28961 Change-Id: Ib962ab5f737bf9c216423ee9d0632757d33f3bd2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QSqlTM: respect generated flag in insertRecord() and setRecord()Mark Brand2012-07-131-0/+25
| | | | | | | | | | | | | | | | These methods failed to respect the setting of the generated flag on the fields of source record. INSERT and UPDATE statements should only include fields where generated is TRUE. Test included. Follow-up to 0f15ab4e750690bdb2b649332d5c3276bf24c440. Change-Id: I2f10dbcd7e5e5123489b38a123effe43a673a427 Task-number: QTBUG-23592 Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Jason Dolan <jason.t.dolan@gmail.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Doc: Fixing typoSergio Ahumada2011-06-301-1/+1
|
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* let generated flag control SQL generationMark Brand2011-03-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if QSqlField's QVariant value had type "invalid", this caused the field to be omitted in data-changing SQL statements generated from QSqlRecord edit buffers. Complaints against this mechanism: - It precludes initializing value type to field type, which would otherwise seem sensible and useful, such as when using model.data() in contexts where the field type is not readily available. - QSqlField::clear() does initialize value type to match field type and so is incompatible with this mechanism. - Problems such as described in QTBUG-13211. - Unwanted distinction between "invalid" and "null" when mapping field values to SQL values. - QSqlField's generated flag already provides a mechanism for controlling SQL generation. These complaints are redressed here by replacing this mechanism with reliance on QSqlField's generated flag. The flag is initialized to false in new edit records and set to true when a value is set. Applications can still manipulate generated flags directly to control SQL generation. Generation of SELECT statements already used the generated flag and is unaffected by this change. Merge-request: 1114 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Michael Goddard
* Fix an issue with removing rows in a table model.Michael Goddard2011-02-181-0/+21
| | | | | | | | | | Tables with nulls in a row were not being deleted properly in some cases. Made sure the responsible function no longer has default parameters so this doesn't happen again. Change-Id: I479121172d5ac172ca49da78638b9353d7a67548 Task-number: QTBUG-16007, QTBUG-15979 Reviewed-by: Charles Yin
* Fix some removeRows issues with QSqlTableModel.Michael Goddard2011-02-041-22/+153
| | | | | | | | Added some better unit testing around the problem areas. Change-Id: Ie4749da298aebbae6aec9558ebe8c8f2196c705f Task-number: QTBUG-14916 Reviewed-by: Charles Yin
* Make sure that setRecord emits dataChanged() with OnManualSubmit.Michael Goddard2011-02-041-2/+7
| | | | | | | | | Since the change is immediately visible through data(), this is needed so that QSortFilterProxyModel etc work correctly. Change-Id: Ied7afce2e6a1f516b502d3501f9d214df54e52f2 Task-number: QTBUG-14831 Reviewed-by: Charles Yin
* QSqlTableModel/QSqlQueryModel and insertColumns problem.Michael Goddard2011-02-041-7/+159
| | | | | | | | | | | | | | After inserting a column, fetching data through QSqlTableModel was off by one or more, since it passed the indexInQuery through to QSQM. Also, the headerData would sometimes return a blank string for an inserted column, and sometimes the column number. The autotests have been beefed up a little to check insertRows and insertColumns play nicely. Change-Id: I7399d4c4d94f958884b67ab9b39b5cf2485d8416 Task-number: QTBUG-12626 Reviewed-by: Charles Yin
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | Reviewed-by: Trust Me
* Fix test sql for sql server.Bill King2010-04-071-1/+5
| | | | Sql server requires explicitly setting fields to be nullable.
* Parallelize DB autotests, also some factorizationBill King2010-03-101-56/+61
| | | | | | Add local machine parallelization of auto-tests, not just host to host. Reviewed-by: Justin McPherson
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* Remove excess spam from autotests when postgresql creates primary indexes.Bill King2009-10-141-0/+5
|
* This autotest doesn't make sense for in-memory databases.Bill King2009-10-131-0/+2
|
* Remove extraneous debug statementBill King2009-09-241-2/+0
|
* Merge commit 'origin/4.5' into 4.6Bill King2009-09-151-0/+61
|\
| * Fixes QSqlTableModel: trying to delete the wrong row.Bill King2009-09-151-0/+61
| | | | | | | | | | | | | | Uses the primary key from the index in the query, not the resulting location in the modified dataset. Task-number: 222678
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Fix qsqltablemodel autotestDerick Hawcroft2009-08-181-6/+7
| | | | | | | | | | | | test was broken Reviewed-by:Bill King
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Fix line endings.Alexis Menard2009-07-131-22/+22
| |
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixed the lineendings in the tst_qsqltablemodel.cppDenis Dzyubenko2009-07-131-22/+22
| |
* | Merge commit 'origin/4.5'Bill King2009-07-131-0/+62
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/kbddrivers/usb/main.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qwidget/tst_qwidget.cpp
| * Fixes failure when table has null fields to updateBill King2009-07-131-0/+62
| | | | | | | | | | | | | | Fixes an issue where too many parameters are bound when updating QSqlTableModel where the stored record has NULLs in it. Reviewed-by: Justin McPherson
* | Cleanup of db test cases.Bill King2009-06-231-1/+1
| | | | | | | | | | Mostly cleanup of dropping of tables to a consistent place. Also enable itemmodel tests.
* | Fix the behaviour of sql classes regarding quoted identifiersBill King2009-06-221-5/+10
|/ | | | | | | | | | | | | If no quotes around identifiers are provided by the programmer, identifiers are treated identically to how the underlying engine would behave. i.e. some engines uppercase the identifiers others lowercase them. If the programmer wants case sensitivty and/or use whitespaces they will need to quote their identifiers. The previous (incorrect) behaviour always quoted the identifiers. Originally committed to 4.5, but removed due to BC concerns, this is a reintegration into mainline for inclusion in 4.6 Reviewed-by: Bill King
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* BT Revert "Fix the behaviour of sql classes regarding quoted identifiers"Bill King2009-06-151-10/+5
| | | | | This reverts commit bb7bddc47dd0748b45d22180d9e3c8e5209010b3 due to forward binary compatibility issues in a point release.
* Fix the behaviour of sql classes regarding quoted identifiersabcd2009-04-151-5/+10
| | | | | | | | | | | If no quotes around identifiers are provided by the programmer, identifiers are treated identically to how the underlying engine would behave. i.e. some engines uppercase the identifiers others lowercase them. If the programmer wants case sensitivty and/or use whitespaces they will need to quote their identifiers. The previous (incorrect) behaviour always quoted the identifiers. Reviewed-by: Bill King
* DB Autotest cleanupBill King2009-04-011-78/+89
| | | | | | Make db autotest data set generation more consistent, slightly faster. Also, add ability to easily generate a set of a single databases entries worth of criteria to test.
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+915