summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Fix connection string code snippet for ODBC on WindowsAndy Shaw2019-09-241-1/+1
| | | | | | Fixes: QTBUG-15133 Change-Id: I86d77aec039fdfaf262ad056c944c7cfc30e0041 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add SQLite specific documentation when specifying a database nameAndy Shaw2019-09-211-0/+8
| | | | | | Fixes: QTBUG-67847 Change-Id: I3c640233526260b596e8224dc48f713a3f0cff56 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-05-031-0/+1
| | | | | | | | | | | | | | Instead of generating .html page for each file in an example project, generate links to code.qt.io, under the correct path and branch, where the user can browse the example source. Store all URLs under QT_INSTALL_DOCS/config where other qt5 submodules can access them. The repository name appears in the URL, so we cannot define a single URL for all modules. Task-number: QTBUG-74391 Change-Id: I63d4d6d2c352877797b1ee8e057d48c0cd789bff Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Add dontdocument.qdoc filesMartin Smith2019-05-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | Each module that has publically declared classes or structs that are not meant to be documented is given a dontdocument.qdoc file to tell qdoc that these classes are not meant to be documentented. Then qdoc will not print warnings about missing \class comments for these classes and structs. Change-Id: I9195f0b546032e1c7642c9da34d85a0a4a9bfb08 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Replace executedQuery when executing a new queryJesus Fernandez2019-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | Only the first successful query was stored in the variable. When a new query is executed the function QSqlResult::setActive was not replacing the last executed query. Fixes: QTBUG-28883 Change-Id: Ib4938c42e6264f9edd0764b4a392da7988f68fc0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QtBase: replace 0 with \nullptr in documentationChristian Ehrlicher2019-01-281-5/+5
| | | | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I914b6b2151554c06acc2d244eff004524cbb9a82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Always escape the table names when creating the SQL statementAndy Shaw2019-01-234-8/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since some databases are case sensitive if part of the query is quoted, then we should ensure that all instances of the table name are escaped unless the test is delibrately testing the non-escaped case. As a result, this commit also removes some expected failures pertaining to PostgreSQL and also adds an entry to the list of tables being dropped when a test is finished. [ChangeLog][Sql][PostgreSQL] QSqlDatabase is now stricter about table names when used with record() and primaryIndex(). If the tablename was not quoted when it was created, then the table name passed to record() and primaryIndex() needs to be in lower case so that PostgreSQL is able to find it. Fixes: QTBUG-65788 Change-Id: Id1f54cb66b761c39edf858501b730ede7eec1fd3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-211-3/+3
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * QSqlRelationalDelegate: compile with QT_NO_CAST_FROM_BYTEARRAYChristian Ehrlicher2019-01-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | QSqlRelationalDelegate::setEditorData() does not compile when QT_NO_CAST_FROM_BYTEARRAY is defined. Since it's a public header this will break user code. Fix it by calling QByteArray::data() instead of relying on the implicit cast. Fixes: QTBUG-72764 Change-Id: I9c111dd25f48c9c9780d9f9a5b6b75eed0c8d6ed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Doc: replace QItemDelegate with QStyledItemDelegateChristian Ehrlicher2019-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since QStyledItemDelegate should be preferred over QItemDelegate the documentation should point to QStyledItemDelegate instead. Also mark some internal classes which derive from QItemDelegate so they will not be forgotten during Qt6 porting. Change-Id: I2dd17feedf8593afac5ca16d2546e1f0bc0250ae Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Add overload of QSqlDatabase::cloneDatabase to allow cloning cross threadsAndy Shaw2018-12-232-0/+35
| | | | | | | | | | | | | | | | | | | | | | Since QSqlDatabase::database() cannot be used to access another database from another thread, then the overload is provided to make it possible to clone with just the connection name. This will handle the cloning internally safely then. Fixes: QTBUG-72545 Change-Id: I861cc5aa2c38c1e3797f6f086594a1228f05bada Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-083-13/+13
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * QtSql: fix code snippetsChristian Ehrlicher2018-10-033-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code snippets retrieving the native database driver handles was using qstrcmp() wrong since that is returning 0 when the strings are equal. In some snippets there was even a plain char * comparison which would not work at all. Fix all the places by correctly using qstrcmp() and replace the checks for the valid pointer by not checking for 0. Fixes: QTBUG-70598 Change-Id: I5c53dcfc51c958203fc60fa6a23dd6b27faa1d96 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-291-1/+1
|\| | | | | | | Change-Id: I6083c3e61b7dbe188f83676f7e7bb268e5ccf2f3
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| | * Modernize the "datestring" featureLiang Qi2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-091-0/+2
|\| | | | | | | | | | | Change-Id: I36cda712b4cf960de70e497aef52fbc491099f1c
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-071-0/+2
| |\| | | | | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| | * Doc: Check before including the \snippet from a .pro fileVenugopal Shivashankar2018-08-301-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Implement clearItemData in common modelsLuca Beldi2018-09-062-0/+13
|/ / | | | | | | | | | | | | | | | | | | A virtual method clearItemData was added to QAIM for Qt6. This patch implements that method to all Qt concrete models for which it makes sense. Task-number: QTBUG-69616 Change-Id: If980fcfc36f723128bc56ec4587c5c3a338dbbcc Reviewed-by: David Faure <david.faure@kdab.com>
* | Doc: Explicitly state that QSqlTableModel only handles EditRoleAndy Shaw2018-09-031-0/+4
| | | | | | | | | | | | | | | | Fixes: 5.12.0 Task-number: QTBUG-70234 Change-Id: I65c6aa60048182c5408dca2aa20098af363b10ec Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | QSqlQuery: Specify documentation of named placeholdersChristian Ehrlicher2018-08-281-1/+3
| | | | | | | | | | | | | | | | | | | | Named placeholders can only contain characters in the range of [a-zA-Z0-9_] but this was not documented anywhere. Task-number: QTBUG-69775 Change-Id: I5c4eff7674b1fc04cef60e7d7f44cd87414ffbe9 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-13/+13
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * doc: Add missing override and remove redundant virtual for snippetsAlexander Volkov2018-08-161-13/+13
| | | | | | | | | | Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-37/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Remove the src/sql/README.module fileThiago Macieira2018-08-041-37/+0
| | | | | | | | | | | | | | | | It's stale. Thanks to Olivier B. for pointing out. Change-Id: Ie01831ddac5446fdbdeefffd15463530818cff9e Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-071-2/+4
|\| | | | | | | Change-Id: Idf2bef470663864069bbf7e41af07b534936863a
| * QSqlDatabase: Skip confusing thread warning on invalid QSqlDatabaseDavid Faure2018-04-061-2/+4
| | | | | | | | | | | | | | | | | | If the db isn't valid, then that's the actual issue, not the fact that we're getting the same invalid db (with the same driver QSqlNullDriver) in multiple threads. Change-Id: I95490818ed78e741c3823e115f139c2cff01b0b1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-282-4/+4
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * QSqlResult: use QVector<int> instead QList<int> for indexes valueChristian Ehrlicher2018-03-232-4/+4
| | | | | | | | | | | | | | | | Minor tweak: QList<int> is taking 64bit per entry, QVector<int> only 32bit - this should reduce memory usage a little bit. Change-Id: I3e17269feb4840343f5cecfc71f8fccd70edc80f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-081-17/+17
|\| | | | | | | Change-Id: Idf471ca5c6cf211813466b539ce45bdc1ae9b97c
| * QSqlField: rearrange QSqlFieldPrivate membersChristian Ehrlicher2018-03-071-17/+17
| | | | | | | | | | | | | | | | Rearrange QSqlFieldPrivate members to only need 64Byte instead 72 in an 64bit environment. Change-Id: I620c18aca06a11b7ab4bd8e99b377b9d823da7f4 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Sql: Add a feature for the SQL item modelsUlf Hermann2018-02-2010-2/+37
|/ | | | | | | | ... 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>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * MSVC: Don't set a DLL base address for 64-bitThiago Macieira2018-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The linker complains: LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization And it's not really required anymore, as the recommended /DYNAMICBASE is the default. Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-191-2/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp Change-Id: Ib61b74a69922ec1e9eecbba5f75352b4ec167fa9
* | \ Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-2/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * | Doc: Mention exact Qt version the third party attributions apply toKai Koehne2018-01-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do add, remove or update third party code in minor releases, sometimes even in patch level releases. However, the documentation is supposed to be valid for all existing Qt 5 versions, but doing this for attributions would require infrastructure we don't have. Therefore rather make it explicit which Qt version the attributions apply to. Also mention since when Qt is available under LGPLv3 (starting with Qt 5.4). Task-number: QTBUG-65665 Change-Id: I328b5bf0c143f78ea61aad51f0644c3cbb6dee49 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Fix typosJarek Kobus2018-02-131-1/+1
| | | | | | | | | | | | | | | Change-Id: Id625efea998f2b4dce9970b903830dc3b3efcd3d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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>
* | | doc: Fix several minor qdoc warningsMartin Smith2018-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixes included undocumented enum values, which are now marked as omitted, adding a test for Q_CLANG_QDOC for a couple windows enum values, adding \fn commands for a pair of member functions in QLocale, and a \fn command for an obsolete function in QSqlError. Change-Id: I12a8ea7287039096b9cfe7870d2ab213a3d78dcf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | doc: Add missing template clause in \fn commandMartin Smith2018-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The template clause was missing in the \fn command for a member function of a template class. Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-123-7/+26
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * \ \ Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-113-7/+26
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| | * | doc: Hints for using SAP HANA databaseJoachim Puhr2018-01-092-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the HANA ODBC driver does not provide scrollable results per default, the connection has to be established with a specific option. Change-Id: I14751a94f61d6fffd6d56c39076c24ec4d1f88ef Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joachim Puhr <jpuhr@gmx.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>