| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I1a8ae38121b3a9880ac67f80133df3c15b9951c9
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tell me this isn't confusing:
Got keys from plugin meta data ("QMYSQL3", "QMYSQL", "QMARIADB")
QSqlDatabase: driver not loaded
QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3
This also merges the two messages into a single line, which is nicer for
rich logging environments.
Pick-to: 6.8 6.9
Change-Id: Ieb80c6571213dddc518bfffdb6c86632df8f932c
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Rename the parameter 'code' to 'nativeErrorCode' to match the getter
nativeErrorCode() with the ctor's parameters.
Pick-to: 6.9 6.8
Change-Id: Ic95b45c75a57796536d845249c719b5d0d0e7587
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a thread-safe version of
QCoreApplication::instance() != nullptr
for Qt 6.x, because QCoreApplication::self is not atomic and thus
reading it from outside the main thread could be a data race.
That's not to say it always is: if by construction the code can only run
in the main thread or while QCoreApplication definitely exists, that's
safe. Therefore, this commit focuses on places that are meant to be used
in multi-threaded environment (ruling out most of QtGui and QtWidgets)
or where the code was going to dereference the returned pointer anyway.
Change-Id: I6fc556c5fe5cbe0b5902fffdfb6b3bb345b0ee50
Reviewed-by: Marc Mutz <[email protected]>
|
|
|
|
|
|
|
|
| |
This avoids doing a conversion from 8-bit to UTF-16 and thus allocating
memory on the call to these functions.
Change-Id: Ibed5fc9ef19a21ea475efffdb978f45c1b9b3cc0
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was likely never intended, and was a mistake in the API design,
missing the second const after the pointer. It should have been:
static const char *const defaultConnection;
This commit fixes that mistake by replacing the variable with a
constexpr one that can't be modified.
We can actually do better by moving the name to the header, so it will
get emitted in each library, application, or plugin instead of trying to
load from QtSql.
[ChangeLog][Potentially Source-Incompatible Changes] The static
QSqlDatabase::connectionName member variable has changed from a
non-const pointer to a constexpr array. Modifying the pointer was most
likely a mistake in code and would produce a misbehaving application.
Change-Id: Icf2eddc865c2d6dde0c7fffda06e55e215e5f26d
Reviewed-by: Marc Mutz <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QSqlQuery has been made movable in Qt 6.2
(14f9f00fdb2dc428610c08e3d9d03e38e9602166). The pre-existing copy
operations have been deprecated, but not removed, in order to preserve
SC/BC.
This left us with two issues:
1) Whether or not to keep the deprecated copies in Qt 7. The answer is
no: the copy operations are impossible to implement in a way consistent
with value semantics (the state of the DB driver can't be copied in
general). Therefore, mark the related APIs as to-be-removed, and not
just deprecated.
2) While we no longer copy QSqlQuery from Qt code directly, QMetaType
still detects the presence of the copy constructor and extracts it,
triggering the deprecation warning.
Rather than unconditionally suppressing the warning (which will hide any
similar issue we might have in the future), add a local workaround that
raises a runtime warning if QSqlQuery is copied through QMetaType, while
not raising the deprecation warning when building Qt itself.
[ChangeLog][QtSql][QSqlQuery] Copying a QSqlQuery object via QMetaType
now raises a runtime warning. Note that copy operations for QSqlQuery
objects have already been deprecated since Qt 6.2, and are planned to be
removed in Qt 7.
Fixes: QTBUG-132752
Task-number: QTBUG-91766
Pick-to: 6.9
Change-Id: I48714ad53ec706a5e4e055c45a1c05f372382940
Reviewed-by: Marc Mutz <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A QSqlDriver instance is directly bound to a QSqlDatabase object. But
there was no way to get the QSqlDatabase out of a QSqlQuery/QSqlDriver.
Fix it by storing the connection name also in the driver during
creation and add a getter for it.
[ChangeLog][QtSql][QSqlDriver] Added connectionName() which returns the
connection name of the associated QSqlDatabase instance.
Pick-to: 6.9
Task-number: QTBUG-123603
Change-Id: If78b85413cf6ca965ff6bf9f3600cb54169b5569
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.9 6.8
Change-Id: I5b65f543d7a36386181e493d8b9ce0267132d686
Reviewed-by: Giuseppe D'Angelo <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have some patterns for how to document certain functions, but we
also vary the sentences a lot, and you have to look up one
documentation piece and copy it, essentially. If we ever want to
change them, we end up with shotgun surgery.
So apply DRY to the documentation and start a collection of macros to
help with repetitive C++ class documentation tasks.
The first macro is for member-swap(), and this third patch is for
documentation that used a non-standard phrasing for documenting
member-swap(). By using the macro, the documentation automatically
conforms to what the documentation team picks as the \memberswap
expansion going forward.
As a drive-by, fix doc block indentation to the Qt standard of 4
spaces (only in changed lines), and add a few blank lines where they
were missing before.
Fixes: QTBUG-129573
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: If007602d7690572fcbb848a8d0235416c908cfd2
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Ivan Solovev <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have some patterns for how to document certain functions, but we
also vary the sentences a lot, and you have to look up one
documentation piece and copy it, essentially. If we ever want to
change them, we end up with shotgun surgery.
So apply DRY to the documentation and start a collection of macros to
help with repetitive C++ class documentation tasks.
The first macro is for member-swap(), and this second patch is for
documentation that used the simplified phrasing ("Swaps this X with \a
other."), which this patch adopts as the text for \memberswap, too,
because it doesn't repeat the macro argument, making it easier to find a
grammatically-fitting argument than in the traditional phrasing.
This doesn't change the documentation, except as follows:
* standardizes on simpified instead of traditional phrasing for docs
that already use the \memberswap macro
* adds the "very fast and never fails" blurb, if it was missing
* changes the function's argument name to `other`, as required by
the macro.
Task-number: QTBUG-129573
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I1123e783ce0da76c5997ff74007d77504ac5b334
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Ivan Solovev <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have some patterns for how to document certain functions, but we
also vary the sentences a lot, and you have to look up one
documentation piece and copy it, essentially. If we ever want to
change them, we end up with shotgun surgery.
So apply DRY to the documentation and start a collection of macros to
help with repetitive C++ class documentation tasks.
The first macro is for member-swap(), and the first patch is for
documentation that used the traditional phrasing ("Swaps the X \a
other with this X.").
This doesn't change the documentation, except as follows:
* adds the "very fast and never fails" blurb, if it was missing
* changes the function's argument name to `other`, as required by
the macro.
Task-number: QTBUG-129573
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: Ib494bd218334724b3b43796ba6f71fb52b83aa94
Reviewed-by: Ivan Solovev <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Some features are server-dependent and therefore an open db connection
is needed to make sure that the feature is available.
Pick-to: 6.8 6.7 6.5
Fixes: QTBUG-10016
Change-Id: Ia9a117a64ba5fe7cdd69bf95a41cfc301ab5fd94
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Don't move them around during deprecation.
Pick-to: 6.8
Change-Id: I647fec5a440ea063463dc285def5d793726a9e61
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
... which is directly after Q_OBJECT/Q_GADGET
Pick-to: 6.8
Change-Id: I3fb2b2e810a68e0ae811e55b286bc5f40364295f
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add a note to all functions now taking a QAnyStringView that their
signature changed from QString to QAnyStringView
Pick-to: 6.8
Change-Id: Ib9743b5b2c437724c6308e74ef3c5820136a34f5
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since name clashes between logging categories are so common, having a
way to explicitly avoid them is important. So far, we are depending on
internals of Q_LOGGING_CATEGORY to place the "static" in the right
location. That's less than ideal.
Task-number: QTBUG-67692
Change-Id: Ifeda5297d1d1220a57118b3bf7c7310e4ddd4f93
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change all functions taking a QStringView to take a QAnyStringView and
remove all functions taking a const QStringRef since this can now be
fully handled by the QAnyStringView ones.
This amends f2dba1919427bcc0f510d7f60e3fafbd6f41430d and
993f31801446c1d851c7c8d54c9b55216acd0993
[ChangeLog][QtSql][QSqlRecord] All functions taking a QString were
changed to take a QAnyStringView.
Pick-to: 6.8
Change-Id: Ia1c968c4e2a7a93aa26d090ef6605271305c14a6
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
| |
Move it to the private implementation to be later used as a template
when switching to QAnyStringView.
Change-Id: If9977711757677546cfc058602ada9f54b978509
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
... to be in sync with QObject naming.
This amends b4c63b89dfe136d0579bf1b6422c4d878cdd74ab.
Change-Id: I25301f65aa880205d8c0cfd6f4bfa9fdba34a01c
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires some fixes in several classes that are also included
in this patch.
The QTestEvent hierarchy is all-inline and changes layout depending on
QT_GUI_LIB and QT_WIDGETS_LIB, so we can't just export it. Suppress the
warning in that header for now. Created QTBUG-104486 to track a fix for
the real issue.
The QFutureInterface hierarchy is also all-inline, but templates, so
doesn't trigger, except the <void> specialization. Created
QTBUG-125115 to track a fix for the real issue.
Done-with: Marc Mutz <[email protected]>
Task-number: QTBUG-45582
Change-Id: I96b3e109aa989b70e0d4809b90bd53a369e50d55
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
This function was forgotten when the Qt3 support was removed during
initial Qt5 porting (f306d18fe6555a9a5c60560745773b0bf5685ec3).
Pick-to: 6.7
Change-Id: I83a0be0db7e81bd9d4f84683a013e1d4faab2dd8
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Samuel Gaist <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add QSqlDatabase::moveToThread() to be able to move the driver instance
to another thread.
[ChangeLog][Sql][QSqLDatabase] QSqlDatabase gained two new functions
moveToThread() and currentThread() to be able to use it in another
thread than the one it was created in.
Fixes: QTBUG-39957
Change-Id: I9cb51358f73a3a2fa72813bfdbe059279d388bd7
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Wrap `connections` to std::as_const() to avoid unexpected detach
due to use of QHash::asKeyValueRange() in range-based for loop.
Change-Id: I2bf69782dc9dc63df0b3f9dfe395427909fba310
Reviewed-by: Christian Ehrlicher <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.qsqldatabase
Change-Id: I25216d0809ff0316371a62913b56e1f56ab37ab4
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.qsqlquery
Change-Id: Ib5c26751ef013261080207fc13b80b91c644a640
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
| |
Change-Id: Ia544da629d495abdfdd0efe0e0991124a9f5d7ae
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Retrieve the default value (if set) of a column during
QSqlDatabase::record() but not for QSqlQuery::record() as it's done for
the other drivers which support retrieving the default column value.
Fixes: QTBUG-122723
Change-Id: I92e052bfa6d88e019c0151fbcbc1483a65770c55
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
| |
Change-Id: I9a77b6ea0026748c7f97f73b327118f7a9212d52
Reviewed-by: Topi Reiniö <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: I50e2158aeade4256ad1dfffd17b1f286a9001ae8
Reviewed-by: Edward Welbourne <[email protected]>
|
|
|
|
|
|
|
|
| |
... as it is no longer needed.
Pick-to: 6.7
Change-Id: Ia60b6e53675260ef0e793ac1b44c913af1454b35
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.
Task-number: QTBUG-120566
Change-Id: I23103a921cd391f24ce0ffd915a4ae2f98686d21
Reviewed-by: Nicholas Bennett <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.
Task-number: QTBUG-120566
Change-Id: I3803f5246c1814d627a16fa2569d1342b54f6adf
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.
Task-number: QTBUG-120566
Change-Id: Iaf844eb6f60427dab7fba6ac20b16ffa11f217b8
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
| |
There is no need to know if a function was added in Qt4 or earlier so
remove all \since 4.x tags.
Amends 747581e0bf491376e39d56f6ce3ce72f0bb9c434
Change-Id: I470bc785b1e31685caec561dafaec0ba97208d99
Reviewed-by: Leena Miettinen <[email protected]>
|
|
|
|
|
|
|
|
| |
There is no need to know if a function was added in Qt4 or earlier so
remove all \since 4.x tags
Change-Id: I5cf4e89a3e30c13fac076f1ae7abb33a625e366c
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.
Task-number: QTBUG-120566
Change-Id: Ibbafde35bb5600453ed3a3de36b6bf2b5c560e5f
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.
Task-number: QTBUG-120566
Change-Id: I593ba9f322273991661c1d14fb51dcb23678ea0f
Reviewed-by: Kai Köhne <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and the getter to isPositionalBindingEnabled() for QSqlQuery and
QSqlResult.
This amends e532933a2a9ff0219f0179880e05c95e0ec5e19d
[ChangeLog][QtSql][QSqlQuery] Add setPositionalBindingEnabled() to be
able to disable positional binding.
Pick-to: 6.7
Task-number: QTBUG-119952
Fixes: QTBUG-120548
Change-Id: I0a0afb652d0fc9421f5692b0927a66b2a9b7b854
Reviewed-by: Friedemann Kleint <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an overload to QSqlQuery::isNull()/::value() taking a QStringView -
those two functions can now use the newly introduced
QSqlRecord::indexOf(QStringView)
[ChangeLog][QtSql][QSqlRecord] QSqlQuery::isNull() and value() gained a
new overload taking a QStringView.
Change-Id: Icebce88b94a7413130bdd7ec0098f51726d05892
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Add overloads to all functions taking a QString and internally using
QSqlRecord::indexOf() - no need to create a full-blown QString here.
[ChangeLog][QtSql][QSqlRecord] All functions taking a QString got an
overload taking a QStringView.
Change-Id: Ieb7ffcf572b5450ac81cb7d6108010052dc877ee
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Misc style fixes in preparation for the new overloads taking
QStringView.
Pick-to: 6.7 6.6 6.5
Change-Id: I3b838543aefd08bf115488e571b1bb6eec8d968d
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Check if QCoreApplication::instance() and print a warning if not instead
creating and assertion later on.
Fixes: QTBUG-117621
Change-Id: Iffb4f7097edbbaf19cb584bff6e5ba1535bf88a0
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-116937
Pick-to: 6.6
Change-Id: Ic5f08c3a7d0f2c0c926ced0d194fd5a2aea191fd
Reviewed-by: Paul Wicking <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-116848
Pick-to: 6.6
Change-Id: Ia137a21de5bab406a133ee032b6ccf3089de8d22
Reviewed-by: Topi Reiniö <[email protected]>
Reviewed-by: Fredrik Ålund <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also declare the type as shared using Q_DECLARE_SHARED
Found during Qt 6.6 API review.
This commit amends 46e909a37a38289a601333ae6f205e8946152287.
[ChangeLog][QtSql] QSqlIndex is now a relocatable type.
Pick-to: 6.6
Change-Id: I78394cba082b4df2e4d8a6aab8e8e87f2340962c
Reviewed-by: Marc Mutz <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QSqlField and QSqlRecord implemented all special member functions and
the member swap() function, but were missing the Q_DECLARE_SHARED
macro.
Found during Qt 6.6 API review
[ChangeLog][QtSql] QSqlField and QSqlRecord are now relocatable
types.
Pick-to: 6.6
Change-Id: Ia10f1d3fd9f634864be5b36d1d3903301adfa9ab
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes
(qdoc) warning: Undocumented parameter 'enable' in QSqlQuery::enablePositionalBinding()
Amends the documentation introduced in e532933a2a9
Change-Id: I638cf7e1dc1c9af911f6ca52bc27e6072fae1035
Reviewed-by: Andreas Eliasson <[email protected]>
Reviewed-by: Andy Shaw <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
| |
Merge the two global statics into one.
Change-Id: I8a93ba848abe31527551313c8a4a449d05e3d680
Reviewed-by: Andy Shaw <[email protected]>
|