summaryrefslogtreecommitdiffstats
path: root/src/sql/models
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the QSqlQuery to be invalid when creating a sql modelAndy Shaw2018-08-282-2/+2
| | | | | | | | | | | | | | | When QSqlQueryModel or QSqlTableModel is created it will create a QSqlQuery which defaults to using the default QSqlDatabase connection. If this connection belongs to another thread then it will throw a warning as this is not safe to use. Since the QSqlQuery is always recreated when a query is set, the instance which is a member of the class can effectively be invalid until a new one is set. Task-number: QTBUG-69213 Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Show the display role inside the editor for the relation in a QComboBoxAndy Shaw2018-05-291-1/+22
| | | | | | | | | | | | | | | When a QComboBox is used as the editor for a relation inside a view then it could end up showing the contents of the EditRole. This would be the field which is used to represent the entry as opposed to the DisplayRole which is what the user would expect to see is. Therefore, setEditorData() is overridden to ensure that it is showing the right data to the user. When the model gets updated, it will take the corresponding EditRole value as before to ensure it is updated correctly. Task-number: QTBUG-59632 Change-Id: Ibbccc3e9477de1cdefb654051b97dd111df36382 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-6/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * doc: Explicitly mention that QSqlRecord fields are generated by defaultAndy Shaw2018-05-231-6/+6
| | | | | | | | | | | | Task-number: QTBUG-38460 Change-Id: I5982d018ebf239eb95dba59e2c5559bf5b5ce6ca Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Sql: Add a feature for the SQL item modelsUlf Hermann2018-02-206-1/+12
|/ | | | | | | | ... and make sure we can build if it's switched off. Change-Id: I9565a2ce632a861a99e1276f3edf4f0d094b5451 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* doc: Add documentation for swap() functionsMartin Smith2018-01-241-0/+6
| | | | | | | | The functions had been added without documentation. This update adds the documentation. Change-Id: Ib29e9356b26c248b5fcc9f13ecf77371fbae054a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-192-3/+3
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-193-28/+28
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QSqlTableModel: avoid copying QSqlRecord instancesDavid Faure2017-08-102-6/+10
| | | | | | | | | | | | | | Profiling a large model showed that QSqlRecord was being copied and destroyed from a few places, due to use of QMap<int, ModifiedRow>::value() where ModifiedRow has two QSqlRecord members. This can easily be avoided (in the common case with no modified rows) by using constFind() instead. My testcase (iterating over a model with 126936 rows) went from 1266 ms to 896 ms. Change-Id: I04e98b5573ef24165bf6cff19946e5bedd0fb0ba Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Convert features.combobox to QT_[REQUIRE_]CONFIGStephan Binner2017-07-251-0/+2
| | | | | | | | | | Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.listview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-211-0/+2
| | | | | | | | | | Change-Id: I707a839bcfc7ad481342d1adb98c9b593f5ca6e2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Fix some qdoc warnings for 5.10Friedemann Kleint2017-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/io/qfiledevice.cpp:741: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:772: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:790: warning: No such parameter 'time' in QFileDevice::setFileTime() src/corelib/io/qfiledevice.cpp:790: warning: Undocumented parameter 'fileTime' in QFileDevice::setFileTime() src/corelib/io/qfileinfo.cpp:1344: warning: Can't link to 'FileTime' src/corelib/kernel/qcoreapplication.cpp:2007: warning: Can't link to 'isTranslatorInstalled()' src/gui/opengl/qopenglextrafunctions.h:468: warning: No documentation for 'QOpenGLExtraFunctions::glBlendBarrier(void )' src/gui/opengl/qopenglextrafunctions.h:494: warning: No documentation for 'QOpenGLExtraFunctions::glGetGraphicsResetStatus(void )' src/gui/opengl/qopenglextrafunctions.h:475: warning: No documentation for 'QOpenGLExtraFunctions::glPopDebugGroup(void )' src/sql/models/qsqlquerymodel.cpp:217: warning: Unknown command '\override' Change-Id: Ide0ce911f6faf964fda8f32fac433da7d2cb11de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use modern C++ keywordsJesus Fernandez2017-05-301-11/+11
| | | | | | | | | | | | | | Unifies the usage of modern C++ keywords with the previous commit. Change-Id: I2dbcf3774634cbd3a24eb1cac58f34bae241cfea Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Modify QSqlQueryModel roleNamesJesus Fernandez2017-05-262-0/+26
|/ | | | | | | | | | | | | | | QSqlQueryModel::roleNames was exposing the default QAbstractItemModel roles. Only "display" role makes sense because it's a read-only model and it is not providing any other data information. [ChangeLog][Important Behavior Changes] The names of the roles returned by QSqlQueryModel::roleNames now only include a name for the Qt::DisplayRole. Previously all the roles names of QSqlQueryModel were returned. Task-number: QTBUG-60857 Change-Id: Ib18aa0e7083a828648767d700c5af05b6aa84f4f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix QSqlRelationDelegate when using quotation marksJesus Fernandez2017-04-241-3/+19
| | | | | | | | | | Strip the quotes from the field name in QSqlRelationalDelegate implementation to able to find the field in the dictionary. Task-number: QTBUG-59137 Change-Id: I2f1dc9ce3b9c91ca6cc3d3b82e61e1456c3b22c7 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use QStringBuilder moreAnton Kudryavtsev2017-03-301-2/+2
| | | | | Change-Id: If5283e364e921d99ffa7a8fa1abb07356a4a2682 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Fix "zero as null pointer constant" warningJesus Fernandez2017-02-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | qsqlrelationaldelegate.h:60:52: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] explicit QSqlRelationalDelegate(QObject *aParent = 0) qsqlrelationaldelegate.h:72:87: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : 0; qsqlrelationaldelegate.h:93:87: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : 0; Change-Id: I6e7de3cccf705b74018f522165886104194bf9be Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-082-1/+8
|\| | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * Unbreak ubsan developer-buildMarc Mutz2017-02-072-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang 3.8's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QDBusConnectionPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other case. Fix by autotest-exporting the classes. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU, and the ctor, just because it's the correct thing to do. Change-Id: I991f81f88d2a48e85d94d9f3ac61473c0b7056d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use QString::asprintf(), QStringBuilder, and the multi-arg overload of ↵Alexander Volkov2017-01-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | QString::arg() ... instead of sequential .arg(const QString &) callings. It saves memory allocations and prevents unexpected results if replacing strings contain place markers. Found with clazy's qstring-arg check. Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | doc: Fix all remaining "Cannot tie" errors in QtBaseMartin Smith2017-01-061-3/+0
|/ | | | | | | | | | | | Most of these involved moving or removing extraneous aide-memoir comments left by programmers between qdoc comments and their functions. There were also some cases where Q_CLANG_QDOC had to be tested to make something visible to clangqdoc. And there were a few functions that should not have been documented at all. Change-Id: I3bf7c397a9e5ddbffc40cc1fee7f19cad71a1ae7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add missing override into Qt modulesAlexander Volkov2016-12-011-2/+2
| | | | | Change-Id: I014ac8c7b590c77b054fbb01f0ab5601c44ca88e Reviewed-by: hjk <hjk@qt.io>
* QSqlRelation: mark shared-come-qt6Marc Mutz2016-09-171-1/+12
| | | | | | | ... and plaster API with nothrow (well, one function). Change-Id: I36fd64c6fda5390954c82bba307c720d3b3215df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qtsqlglobal.h and qtsqlglobal_p.hLars Knoll2016-07-036-0/+7
| | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. QtSql already had such a header, but its name (qsql.h) was not in line with what's being used in all other modules. So add a qtsqlglobal.h header, deprecate qsql.h and turn it into a a forwarding header to that new global header file. Change-Id: Ibaeb95b008cf08ba062cbfe8a3f4d3bf79294390 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * Fix typo in QSqlTableModel documentationVladislav Tronko2016-05-061-1/+1
| | | | | | | | | | Change-Id: I4e9ab7469b028464186d3067759a2cf6fb187b07 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | QtSql: eradicate remaining Q_FOREACH loopsMarc Mutz2016-02-171-1/+2
| | | | | | | | | | | | Change-Id: I86afe7104d506b840130517ae8066588fab2d745 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Updated license headersJani Heikkinen2016-01-1510-140/+200
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QSqlQueryModel::clear(): Call begin/endResetModel().Friedemann Kleint2015-11-193-0/+6
| | | | | | | | | Call begin/endResetModel() in QSqlQueryModel and all derived classes. Task-number: QTBUG-49404 Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QtSql: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-083-5/+5
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: Ie14e5280c430b6a254f8f686534450c1e5995374 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Doc: added doc for non-documented functionsNico Vertriest2015-05-181-0/+8
| | | | | | | Task-number: QTBUG-36985 Change-Id: I85f58c2877d83b98bf3427cbb0f567575803524f Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Update copyright headersJani Heikkinen2015-02-1110-70/+70
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Use prefix instead of postfix for iteratorsMaks Naumov2015-02-081-1/+2
| | | | | | | | | | The postfix increment(decrement) creates a temp copy of *this before the modification and then returns that copy. It's needed only when using the old iterator and then incrementing it. Change-Id: I7f6702de78f5f987cec3556047e76049b4ee063a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-034-37/+37
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-2410-190/+110
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: correction return statement QSqlDatabase QSqlTableModel::database()Nico Vertriest2014-09-241-1/+1
| | | | | | | Task-number: QTBUG-37358 Change-Id: I68a0110a01ac21871e8a369c7ab94d2dadf1d80b Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* [QtSql][QSqlTableModel] fix failure to refresh in selectRow()Mark Brand2014-04-271-1/+2
| | | | | | | | | | Caused by missing braces, leaving the break outside the scope of the if clause. Task-number: QTBUG-38509 Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Fix miscellaneous typosSze Howe Koh2013-10-301-1/+1
| | | | | | Change-Id: Iaf0dd8974c3ad78beffa995c596a76fb3e4cceab Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-083-29/+29
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QSqlTableModel: expose methods for getting primary valuesMark Brand2013-04-023-29/+25
| | | | | | | These methods are very useful in subclasses. Change-Id: Ifdfee9d90cbdad97f349e46b587582f1d9e7cd7a Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-144-13/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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>