| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tag code that constructs SQL statements, parses results, or deals with
user credentials as security critical. This is the driver code, the
implementation of QSqlResult, QSqlTableModel, and the QSqlDatabase
implementation (which deals with, and optionally stores, credentials).
The rest of the code is not critical and gets the default tag.
Fixes: QTBUG-135591
Pick-to: 6.10 6.9 6.8
Change-Id: I18fb565fd27ed8d1c9c1f3a1f572816b718eb3e8
Reviewed-by: Mate Barany <mate.barany@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Firbird 2.5 added SQL_BOOLEAN in 2014 (https://www.firebirdsql.org/file/community/conference-2014/pdf/02_fb.2014.whatsnew.30.en.pdf).
Simply add the missing define to fix compilation.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-138904
Change-Id: I4bd4a04be46a844fa18506b1a298b984a0299cbb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The firebird api expects the timestamp (ISC_TIMESTAMP_TZ) of a timestamp with time zone is provided in UTC.
Pick-to: 6.8 6.7
Task-number: QTBUG-128493
Change-Id: Iacc85ca1141407f5ab73fd0198c7b2db770bf589
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Johann Anhofer <johann.anhofer@meon-medical.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since QSqlDriver::lastError() always contains the last error, it is not
a valid source to check if the last operation failed or not. Therefore
remove the check for lastError() when initializing the timezone mapping
- the function is optional since an old database might not contain the
timezone mapping table which is perfectly fine.
Pick-to: 6.8
Fixes: QTBUG-127175
Task-number: QTBUG-125467
Change-Id: I22ea75c004654cead9a4461d2eaccfcbe8a116be
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
Reviewed-by: Hamish Moffatt <hamish@risingsoftware.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: I6f3b596ed4f0adc9873dd0a5f54f055a991a6207
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Simplify date/time conversion by using QTime::fromMSecsSinceStartOfDay()
/ QTime::toMSecsSinceStartOfDay() and avoiding some intermediate
variables.
Pick-to: 6.8
Change-Id: I16e673405a347417866cdf100a13d817c1b17ff8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
Amends 4b0b41ec3b362715012f8c771b72c4704f8170f3.
Pick-to: 6.8
Change-Id: If51e22fb9b19755a0d8f222f8c0044563f8c55f8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
|
|
| |
Make some untranslated texts translatable.
Pick-to: 6.8
Change-Id: I636cdcaff749d6770d82095e4a2381097f83ed2c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make sure that QByteArray does not detach when not needed and avoid some
copies by using QByteArray::fromRawData().
Pick-to: 6.8
Change-Id: I4454a3113c6bd1fe30b404af091f5cc0f904f78a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
| |
Pass 'const char *' when the string doesn't get modified.
Pick-to: 6.8
Change-Id: I8b2e06b027362debcd81282dc3123235a7e643a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The lower bit of the sqltype is used to express NULL values and needs
therefore masked out. Do this before the acutal operations for better
readability/debugability.
Pick-to: 6.8
Change-Id: I71ee97f4c38241ccc9804562e2826ce9b53567ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Cleanup the code by replacing repeated access to sqlda->sqlvar[] with a
temporary (const) ref to enhance readability and avoid repeated lookups.
Pick-to: 6.8
Change-Id: I716812f4446bac7fb3e92bc6fbb099845836624f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
|
| |
|
|
|
|
|
|
|
| |
Cache the return value of QIBaseResult::record() to avoid the recreation
(e.g. when using QSqlQuery::value(QString) instead index-based ones).
Pick-to: 6.8
Change-Id: I88568d99ba96e19ae6b661d058e7709ebc5ef2a2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
... instead Q_CC_MSVC to be in sync with qlocale_tools_p.h and avoid
compiler erros when used with msvc versions not providing int128
support.
Pick-to: 6.8
Change-Id: Ia2166a6260a9340a5e5bbca3f46c3b77a9f8d50d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The previous patch missed the handling of SQL_INT128 in
qIBaseTypeName2().
This amends 373ae6cbd24cf0ddbed453e14b1f683e76c92bb5
Pick-to: 6.8
Change-Id: I646bd5af23c14761195f9c1089dc4cbbe2e94790
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement partial support for SQL_INT128 datatype which is used for
DECIMAL/NUMERIC columns with a precision > 18. This support is only
available when QT_SUPPORTS_INT128 is defined and for MSVC.
Binding values to columns which need SQL_INT128 is supported but
numbers given as QString will be converted to doubles even if
QSql::HighPrecision is set.
[ChangeLog][SQL][IBASE] Added support for SQL_INT128 datatype.
Task-number: QTBUG-124575
Change-Id: If3fb1eb0f19dc60f000d163f3bf45da7acb08c87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
|
| |
|
|
|
|
|
| |
Factor out setting numeric values for better readability.
Change-Id: I8980c63e87934e3bc3777897e9cd42aef17caf51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When connecting to an old Firebird instence with a Qt Firebird plugin
linked against Firebird >= 4 the timezone table is not available and
therefore open() will fail. Therefore downgrade the non-existence of
this table to a qCInfo().
Fixes: QTBUG-125467
Change-Id: Iae6d110bc2a48b5b90ffb9cb38f3fba60f30770f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
|
| |
|
|
|
|
|
|
| |
Looks like the CI does not compile the IBase/Firebird plugin so this
compile error slipped through.
Change-Id: I2e20088e10baa91f2e1e5e2b5656dfb7bdf42896
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
|
| |
|
|
|
|
|
|
| |
Move the calculation of the decimal scale into own function and preserve
HighPrecision string values by not converting them into doubles before.
Change-Id: I839923189e9f6b1f8fb9ce234c987423703b79bf
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
| |
Print a warning when we encounter an unsupported data type.
Pick-to: 6.7 6.5
Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
| |
Use the categorized logger qt.sql.ibase
Change-Id: Id7cdc54b8b01ee5af0526e3c522c2511697380d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Change-Id: I9ed4b63fd02b4a6fc5f4b614466590cd099609e2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
a7deddba519fc1f6fd637496e92ca5daccf6d453 implemented a warning for
disallowed null parameters. A check, was missing, if the argument is
actually null.
This patch adds the missing check.
Fixes: QTBUG-114683
Pick-to: 6.6 6.5
Change-Id: Iecbd636599a28284a0a9afe2987e48552f3658ff
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QIbaseResult turns null into zero when database field doesn't
accept a null argument.
This patch adds a warning in that case. It would be better to return
with an error, but that breaks existing behavior with code relying on
it.
Fixes: QTBUG-114683
Pick-to: 6.6 6.5
Change-Id: Ib50b7b6b4dd6c51489ba8b355f7baa8b1b14dc15
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
|
| |
Replace qPrintable() and toLocal8Bit() with qUtf16Printable()
Change-Id: Id30b5ba611b005faab91a08b10a9dc5569fd7a07
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Sync the IBASE driver behavior for primaryIndex() and record() with the
rest by assuming that the given table name has the correct casing.
Change the tests for these two function to pass an unescaped table name.
Change-Id: I6d96359f97e1acc6970b9a22fdf0e968a616b7bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Add support for time zones in the IBASE driver, which was introduced in
firebird 4.x. TIMESTAMP WITH TIME ZONE data type is supported in order
to store and retrieve a QDateTime with the time zone.
Task-number: QTBUG-111879
Change-Id: I631b4262d17796a17630379b7d659f88244a23ad
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
|
| |
Fix some tests so they will correctly work with Interbase (Firebird 3.x)
Change-Id: Ib3c8ceaf31fa01af3a00a9772350b49cee8b2342
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
Misc cleanup of the IBASE driver - use qsizetype and range-based for
loops.
Change-Id: I69fe8ed3303fb352b59989c625de5a51239cf604
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Task-number: QTBUG-98434
Change-Id: Ia621f9d937649dda41a7b0d13a61e6f1397f6dde
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
| |
Task-number: QTBUG-98434
Change-Id: Ie12ca82fd912617eabe4f602c08914f12878cb32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
QMap was a transitive include, apparently; and we have mostly
standardized on specifying the module where each include comes from.
Change-Id: I1a54db879e744120f5b10eb0b16f8ba36cde8300
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Pick-to: 5.15 6.2
Change-Id: I6354275d04ee9474d4baeaaf0b14a52aca3dd70c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
|
|
|
| |
Change-Id: I38721155f090173862da8beab8cb04b2e015dcff
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
| |
Pick-to: 6.0 5.15
Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
| |
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is added to Interbase in v7 and Firebird in v3 which has been
available for sometime now. This means the minimum supported for
Interbase is now v7.
[ChangeLog][QtSQL][Interbase] The minimum required version for Interbase
is now v7.
Fixes: QTBUG-83401
Change-Id: I9927fd962f25c935be8ed5d2b7c76c00fb88cd8c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
|
|
|
|
|
| |
The fix ensures that it can find the column for the array correctly
when reading/writing and also handles the integer typed arrays correctly
too.
Pick-to: 5.15
Fixes: QTBUG-83409
Change-Id: I92d982bdf0927e6ebc6dce84fec9ad6c44c26c25
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
| |
Change-Id: If21d33262b8ca53c17a7d236baaa828907116cab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
It was marked internal anyway. Use the constructor taking a
QMetaType instead.
Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Since Interbase/Firebird has a limit for column and table names then
this function can be used by QSqlRelationalTableModel to make sure that
the aliases created are within that limit.
Change-Id: I0cb1c65b34befcb3690ccad3f081556dd2691344
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Interbase is case sensitive when tables/fields are escaped so we should
ensure that we pass the value as is.
Pick-to: 5.15
Change-Id: Ia6c4edc9c1e675bd95913c85d47bf22c418d2113
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|