summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/db2/qsql_db2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SQL/QSqlField: deprecate internal functions setSqlType()/typeID()Christian Ehrlicher2024-03-101-2/+0
| | | | | | | | | These functions set/get the db-specific internal sql type but it's not used in any of the sql plugins since ages. Any external plugin using this for some reason must be ported away until Qt7. Change-Id: Ifb33e9d3be0b80fb4d0979d31436e89ea6a8208b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* SQL plugins: add moc includesChristian Ehrlicher2023-07-191-0/+2
| | | | | Change-Id: I9ed4b63fd02b4a6fc5f4b614466590cd099609e2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL: small optimization for SQLDriver::escapeIdentifier()Christian Ehrlicher2023-02-281-1/+1
| | | | | | | | Avoid a memmove (and replace it with a memcpy) by not using QString::prepend() but create a completely new string object instead. Change-Id: Ibdb4a9c6b15b96f1743d47e158ff0fb9b2048221 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/DB2: apply misc changesChristian Ehrlicher2023-02-081-42/+39
| | | | | | | Similar to the ODBC changes from 901c86032c Change-Id: I552b2e43d380080bfac62d61b0e27ba42d13024d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* DB2: Fix typo in QMetaTypeHannah von Reth2022-12-291-1/+1
| | | | | | Change-Id: I6ada1fec3ce16670dd7346788db4e9c80ffae8d9 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Sql: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-191-38/+39
| | | | | | Task-number: QTBUG-98434 Change-Id: Ie12ca82fd912617eabe4f602c08914f12878cb32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Sql: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-191-23/+23
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I03477e645a94948cac3e3e2abca52aa4e3e2efff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Adapt SQL drivers to Qt 6 change of QVariant::isNullVolker Hilsheimer2022-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, QVariant::isNull returned true if either the variant didn't contain a value, or if the value was of a nullable type where the type's isNull member function returned true. In Qt 6, QVariant::isNull only returns true for variants that don't contain a value; if the value contained is e.g. a null-QString or QDateTime, then QVariant::isNull returns false. This change requires a follow up in the SQL drivers, which must still treat null-values the same as null-variants, lest they write data into the data base. Add a static helper to QSqlResultPrivate that implements isNull-checking of variants that contain a nullable type relevant for Sql, and add a test case to the QSqlQuery test that exercises that code. Pick-to: 6.2 6.3 Fixes: QTBUG-99408 Fixes: QTBUG-98471 Change-Id: I08b74a33aa3235c37d974f182da1f2bdcfd8217e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace QString::utf16() with data() in memcpy() and QByteArray ctorØystein Heskestad2022-01-071-2/+2
| | | | | | | | | | | QString::utf16() needlessly detaches fromRawData() to ensure a terminating NUL. Use data() where we don't require said NUL, taking care not to call the mutable data() overload, which would detach, too. Task-number: QTBUG-98763 Change-Id: I7075a8f18ab1f82ebbcf8cfab1643e8ab7f38d51 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-2/+2
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-231-36/+36
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-1/+1
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Deprecate QVariant::Type uses in QSqlFieldLars Knoll2020-08-151-6/+6
| | | | | | | | Add metaType()/setMetaType() methods to be used instead of the type() methods taking a QVariant::Type. Change-Id: Ieaba35b73f8061cd83288dd6b50d58322db3c7ed Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove QVariant(int type, void *data, ...) constructorLars Knoll2020-08-151-2/+2
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-061-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* SQL: Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: Ia4c698df60648c85c8e6132641e5ea7bc553129a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-021-14/+14
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-14/+14
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-051-14/+14
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| | | * Fix DB2 plugin building on Linux 64bitJoni Poikelin2017-11-291-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59358 Change-Id: I2e7d52b31f354868c8c4435d8cabe3525d22ede2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | DB2: Pass on the native error codes to QSqlErrorAndy Shaw2018-01-021-11/+46
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Since DB2 can potentially have more than one error code, we need to join these together using ';' as a separator. Task-number: QTBUG-142 Change-Id: Idd376df84a8e3ae4c05b4722b4d0020fa4f3edad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* / / Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-16/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / QSqlField: Add a means to see what the tablename is for a given fieldAndy Shaw2017-07-121-1/+13
|/ | | | | | | | | | | | When you are using a query that pulls from a number of different tables then it can be ambiguous as to which table a particular field belongs to. So this will make it possible to determine the table that a given field belongs to if it is set. Task-number: QTBUG-7170 Change-Id: I49b7890c0523d81272a153df3860df800ff853d5 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
* Use QString::fromLatin1() less to avoid string allocationsAnton Kudryavtsev2016-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | QString::fromLatin1 always allocates memory, but there are cases where we can avoid/reduce allocations or/and reduce text size, e.g.: QStringBuilder expressions Fix: replace QString::fromLatin1 with QL1S QString::fromLatin1().arg(String) pattern Fix: replace with QStringBuilder Overloaded functions with QL1S arg Fix: replace QString::fromLatin1 with QL1S In rare cases if there is no overloaded function with QL1S and we have deal with string literal, replace QString::fromLatin1 with QStringLiteral. Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Always compile sql drivers as pluginsLars Knoll2016-04-071-0/+1700
Compiling the drivers into Qt Sql does not make a lot of sense anymore, as we handle plugins well enough in the build system these days. [ChangeLog][Build system] SQL drivers are now always compiled as plugins. Change-Id: I364b82a480849399d1fafe4b20e9f08922569260 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>