summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* SQLDatabase: merge two global statics into oneChristian Ehrlicher2023-07-231-84/+51
| | | | | | | Merge the two global statics into one. Change-Id: I8a93ba848abe31527551313c8a4a449d05e3d680 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/PSQL: Handle jsonb operators in prepared queriesChristian Ehrlicher2023-07-235-1/+62
| | | | | | | | | | | | Add an option to disable handling of positional binding so jsonb operators are not screwed up [ChangeLog][QtSql][QSqlQuery] Add setEnablePositionalBinding() to be able to disable positional binding. Fixes: QTBUG-96636 Change-Id: I428a9d3b10274b97292ab86a74d9b3971d6f10e9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Do not generate the deprecated 'QtSql/qsql.h'Alexey Edelev2023-07-191-1/+0
| | | | | | Task-number: QTBUG-115029 Change-Id: I1fe496864ce25f20421ca78fbde3fe4eb4b9fc49 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Enable QT_NO_CONTEXTLESS_CONNECT for most of QtBaseGiuseppe D'Angelo2023-07-111-0/+1
| | | | | | | | | It's clean now, keep it as such. Enabling it for QtCore is still OK, because it just hides a function template declared in a header. Change-Id: I8e7dfae179732ba04241a6a3258c2d722e8259df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtSql: Stylistic fixes based on the Qt 6.6 api reviewChristian Ehrlicher2023-07-082-2/+2
| | | | | | | | Amends 12909d7c3df74b88382b727cfd3e215914f291ba and 0efd8854c4b32ec0b011efbf6b3a1990fe684e32. Pick-to: 6.6 Change-Id: Id7cb7377bcd1f32092330d2fc5b2fa5b83ce941f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/SQLite: add case folding for non-ascii charactersChristian Ehrlicher2023-07-081-0/+4
| | | | | | | | | | | | | SQLite does not provide a proper case folding for non-ascii characters due to a lack of a proper ICU library. Therefore add an option so Qt can do it for SQLite. [ChangeLog][SQL][SQLite] Add new option QSQLITE_ENABLE_NON_ASCII_CASE_FOLDING for correct case folding of non-ascii characters. Fixes: QTBUG-18871 Change-Id: Ib62fedf750f05e50a581604253cf30d81e367b42 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Say hello to QtVFS for SQLite3BogDan Vatra2023-07-021-0/+11
| | | | | | | | | | | | | | | This patch allows to open databases using QFile. This way it can open databases from RW locations as android shared storage or even from RO resources e.g. qrc or android assets. [ChangeLog][QtSql][SQLite3 driver] QtVFS for SQLite3 allows to open databases using QFile. This way it can open databases from RW locations such as android shared storage, or even from read-only resources e.g. qrc or android assets. Fixes: QTBUG-107120 Change-Id: I889ad44de966c96105fe1954ee4eda175dd5a886 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Use a global value for warning limit when testing documentation in CITopi Reinio2023-06-271-3/+0
| | | | | | | | | | | | | | | | | | | The most common limit for the maximum number of allowed documentation warnings is zero. Use a global value for 'warninglimit', adopted by all Qt module documentation projects that include the configuration from qtbase/doc/global. This allows for a temporary increase of the limit across all modules as needed - for example, when updating the QDoc binary that the CI provisions to a version that introduces new types of documentation warnings. Increase this base limit temporarily to 10 to help re-enable documentation testing in CI as it's currently disabled. Task-number: QTBUG-113326 Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QSqlResult: remove bad API returning non-const referenceVolker Hilsheimer2023-06-213-9/+37
| | | | | | | | | | | | | | | | | | | | | | QSqlResult::boundValues is a const member function, but returned a non- const reference to a QList<QVariant>. This is a bad and potentially dangerous API, as callers can modify the list stored in QSqlResult. Move that API into the removed_api translation unit, remove it from Qt 6.6 on and replace it with two suitable overloads where the const version returns a QVariantList by value, and the non-const overload returns a mutable reference. Driver implementations that used to call the const overload to get a mutable reference are now calling the non-const overload instead (those calls are all made in the non-const exec() or equivalent driver implementations). As a drive-by, replace "vector" with "list" in the documentation. Pick-to: 6.6 Change-Id: I6e4fd8f5749b939cdb609bf5876735e9b30b2b5a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Update Cached Table example meta-dataVolker Hilsheimer2023-05-241-1/+1
| | | | | | | | | | | | | | Drop "Example" from the example's title, add SQL instead, and add it to the Input/Output category of examples. It's a documented example, does something meaningful, and looks reasonable. Having one SQL example categorised so that it's easy to see that Qt includes that functionality seems like a good idea. The other examples are mostly small API examples that are still good to have as fully-functional apps rather than just snippets. Pick-to: 6.5 Change-Id: Ib960f38db39c791f7ff5a2b9bf3157ee32b362ec Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* SQL: Make QSqlDatabase::DriverDict creation thread-safeChristian Ehrlicher2023-05-241-15/+14
| | | | | | | | | | Make the QSqlDatabase::DriverDict thread-safe and make sure it's properly cleaned up on destruction. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-112961 Change-Id: I1ff70e477579231754ef829fdede944d6042894d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlDatabase: use a QReadWriteLock to access DriverDictChristian Ehrlicher2023-05-231-0/+3
| | | | | | | | | | | | | DriverDict might be accessed from different threads so we have to make sure it's thread-safe. Use the already existing QReadWriteLock from QConnectionDict for later merging of these two global instances. The two instances do not interfere each other (DriverDict is a dictionary for custom registered sql drivers, QConnectionDict contains all current active database connections) so the dual-use of the mutex is fine. Pick-to: 6.5 6.2 5.15 Change-Id: I84c77df666e72e826d0d3d291cecd5417bbd1baf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clarify module changes in Qt6Jaishree Vyas2023-05-091-1/+1
| | | | | | | | | Changed Briefs for better understanding Fixes: QTBUG-109324 Pick-to: 6.5 Change-Id: I15b0c0dc12b1bf96626fb8ea4ad16d04b2b118ca Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QSqlField: add move ctor & move operatorChristian Ehrlicher2023-04-262-37/+17
| | | | | | | | Add the move ctor and move operator for QSqlField Task-number: QTBUG-109938 Change-Id: Ib66eff76c3a920de9cfb3288f4219555005e7ae5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSqlRecord: use QSharedData for private classChristian Ehrlicher2023-04-262-25/+12
| | | | | | | Use QSharedData for the private class instead a home-brew version. Change-Id: Id3625bb0eb8f81c9caa672e2453dab3d44b15ea9 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove unused documentation code snippetsFriedemann Kleint2023-04-172-258/+0
| | | | | | | | | | | | | | | | | | | Modules: - Core - Gui - Widgets - Open(Widgets) - PrintSupport - Sql - Network - Concurrent - Testlib Pick-to: 6.5 Change-Id: I63e58c01bec4bd162486020f0085227fdaa83b18 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QSQLDatabase: avoid some code duplicationChristian Ehrlicher2023-04-141-15/+11
| | | | | | | | | Avoid some code duplication and enhance the documentation about thread-safeness of QSQLDatabase::cloneDatabase() Fixes: QTBUG-60505 Change-Id: I6ca6b9f47d818d49ca51395da14051e40317cef6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlError: Make QSqlErrorPrivate implicitly sharedChristian Ehrlicher2023-04-122-23/+12
| | | | | | | | | Make QSqlError implicitly shared and adjust the ctors / assignment operators to be consistent with other implicitly shared Qt classes. Fixes: QTBUG-91912 Change-Id: Ie73292817fd4e7b274a3033a74d62e712a01c2b0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSqlQuery: add boundValueName()/boundValueNames()Christian Ehrlicher2023-04-074-2/+51
| | | | | | | | | | [ChangeLog][SQL][SqlQuery] Added two new functions boundValueName()/boundValueNames() to return the names of the bound values. Fixes: QTBUG-97847 Change-Id: I8df5f15e8df13141a34d38b0a2e13b37f4e7829c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/QSqlRelationalTableModel escape the auto-generated aliasChristian Ehrlicher2023-04-061-0/+1
| | | | | | | | | | | | The alias created by QSqlRelationTableModel to avoid duplicated field names was not escaped which lead to an inconsistency in the returned alias name from the database (e.g. postgres lowers all unescaped column names). Also adjust the test for QSqlRelationTableModel to use escaped table names for it's tests and fix it for QIBASE. Change-Id: I01426320c0c1a70cb9bf8e6dfa2f8b07dbb1c06b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/MySQL: add option MYSQL_OPT_TLS_VERSION & MYSQL_OPT_SSL_MODEChristian Ehrlicher2023-04-061-0/+10
| | | | | | | | | | | | | | Add the two options MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE to properly support encrypted connections to MySQL 8.0 servers. MYSQL_OPT_SSL_MODE will not work when compiled against the MariaDB C-Connector since it's not supported by the MariaDB client. [ChangeLog][QtSql][MySQL] Added the two new connect options MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE. Fixes: QTBUG-84797 Change-Id: Iec7d682fc00072ce5b2a824c4ea00fca4575a93e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlError: also compare nativeErrorCode() in operator==() / operator!=()Christian Ehrlicher2023-04-031-4/+8
| | | | | | | | | | | | A QSqlError is not equal when the native error code differs. The database and driver text should not be considered during the comparison because they might differ due to e.g. different locales. [ChangeLog][QtSql][QSqlError] The comparison operators have been fixed to take both error type and error code into account. Change-Id: Ie7511f183f88dd454eb165c6ff237e51b79d1c08 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use Qt CMake APIs to exclude files from Unity BuildAmir Masoud Abdol2023-04-031-3/+0
| | | | | | | | | | | | | | | | | | | | This is a bit of a cleanup, mainly around unity build, and a few other minor things: - I replaced the direct inclusion of sources files using `set_source_files_properties`, and instead used `NO_UNITY_BUILD_SOURCES` when possible. In most cases, they are being excluded in their respective `qt_internal_extend_target` but sometimes I had to make a new extension. - In few cases, we had to manually exclude the NO_PCH files, so, I instead passed them directly to the NO_PCH_SOURCES which also exclude them from the unity build as well. - Removed a few unnecessary "" Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I466576592c1d115a2da4d88672c1e4b9f995f2ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSqlError: misc cleanupChristian Ehrlicher2023-04-012-10/+10
| | | | | | | | | - fix formatting for qsqlerror.cpp/.h - replace a size() == 1 "x"_L1 with u'x' Pick-to: 6.5 Change-Id: I74c92f27be4345737fcfc73368f834a2f7920808 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSqlIndex: add move ctor & move operatorChristian Ehrlicher2023-03-312-0/+24
| | | | | | | | | Add the move ctor and move operator for QSqlIndex, also add an explicit testcase for QSqlIndex Task-number: QTBUG-109938 Change-Id: I46cc6a24c2e7d5b23d2ac3427cafd01b9ba257ed Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* SQL/SQLDatabase: do not copy q within QSqlDatabasePrivate::copy()Christian Ehrlicher2023-03-161-9/+5
| | | | | | | | | | Copying the QSqlDatabase pointer inside QSqlDatabasePrivate::copy() is not a good idea since it must point to the owning instance and not another one. Since it's not used anywhere we can safely remove it. Change-Id: Ie45b594305059afd9b8d8b25d4864dd77769acf7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL: add QIBASE to tocChristian Ehrlicher2023-03-121-0/+1
| | | | | | | | | Add QIBASE in the toc for the supported sql drivers - was removed by accident. Pick-to: 6.5 6.2 Change-Id: I70a295e59939317e6b99bb2bd4aad39b0b813509 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/ODBC: Return all native error codesChristian Ehrlicher2023-03-071-3/+3
| | | | | | | | | | | | | | ODBC can (similar to DB2) return more than one native error code for an error but only the last one was recorded which may made the error diagnostic more complicated. Therefore return a concatenated list of native error codes the way it's done for DB2. [ChangeLog][SQL][ODBC] QSqlError::errorCode() might return a semicolon separated list of native error codes. Fixes: QTBUG-45087 Change-Id: I70d02adeb33e72897f13e0c72fbbd2c60f307e2f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlDatabase: deprecate QSqlDatabase::exec()Christian Ehrlicher2023-03-062-4/+6
| | | | | | | | The note that QSqlDatabase::exec() is deprecated was added more than 12 years ago so it's time to also mark the function as such. Change-Id: Ic5e7c31b3ff5b21e16e2640548cba1a4baaeeb1c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-281-1/+1
| | | | | | Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7 Pick-to: 6.5 6.4 6.2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* A QtSql driver for Mimer SQLFredrik Ålund2023-02-207-2/+179
| | | | | | | | | | | | | | | | | The QtSql for Mimer SQL sqldriver makes it possible to work with the Mimer SQL database on different plattforms. There are drivers for several other databases in QtSql and a driver for Mimer SQL will benefit many users. To build the Mimer SQL driver, download Mimer SQL from https://developer.mimer.com [ChangeLog][QtSql] Added a QtSql plugin to work with the Mimer SQL database Fixes: QTBUG-111219 Change-Id: Id6ba5de4de01189d0516ffbfa89efcb0d013115f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-161-0/+3
| | | | | | | | | | | | | Add exclusions for issues that are likely not fixable (3rd party code, X11 define clashes, etc) in 3rd party, tools and plugins. Pick-to: 6.5 Task-number: QTBUG-109394 Done-with: Amir Masoud Abdol <amir.abdol@qt.io> Change-Id: I698c004201a76a48389271c130e44fba20f5adf7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* SQL/MySQL: add options to explicitly specify the protocol typeChristian Ehrlicher2023-02-121-1/+12
| | | | | | | | | | | | [ChangeLog][QtSql] Added the ability to specify the MySQL/MariaDB connection type using the "MYSQL_OPT_PROTOCOL" connection string option. In case the connection type is "MEMORY" for shared memory, applications can specify the shared memory segment name using the "MYSQL_SHARED_MEMORY_BASE_NAME" option. Fixes: QTBUG-2551 Change-Id: I91e0981994c045fb74478d0e765e2ec24eefeece Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-101-5/+0
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Fix usages of deleted QVariant constructorsSze Howe Koh2023-01-253-4/+4
| | | | | | | | Finish the job started at 879d30394a41b7b7124fc8139e787a9bdbe0dfee Pick-to: 6.5 6.4 6.2 Change-Id: I217a4830ac8e17d5d1f8900e2d3134fbabf8b9a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* SQL: use qsizetype and range-based for loops where possibleChristian Ehrlicher2023-01-207-53/+48
| | | | | | | | Some public functions are still using int instead qsizetype which can't be changed until Qt7. Change-Id: Ib6f210c344acce9f3836e8a5493a741eb8b2b385 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* SQL: include cleanupChristian Ehrlicher2023-01-187-12/+4
| | | | | | | | Removed some unused includes in the sql sources Change-Id: Ifbe1df401e0f4042650f8ce9902cb9977d2aa484 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSqlRecord: add missing C++11 move SMFsMarc Mutz2023-01-132-2/+38
| | | | | | | | | | [ChangeLog][QtSql][QSqlRecord] Added move constructor, -assignment operator, and swap(). Task-number: QTBUG-109938 Change-Id: I54f2666defbf56f5ba2faea6358722ebd7cac157 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtSql: Disambiguate typedefsFriedemann Kleint2023-01-122-26/+26
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 6.4 6.2 Change-Id: I3f94044671cdbd0a1bb0964bf291e36508223b50 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL: more documentation and test cleanupsChristian Ehrlicher2023-01-063-77/+20
| | | | | | | | Remove some stuff no longer supported and refine others. Pick-to: 6.5 Change-Id: I29730d5acfcf4a7ef3f569f101d3a4f72dd8b3aa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL: rework the connection options documentation (typos)Christian Ehrlicher2022-12-291-15/+17
| | | | | | | | Fix some typos found after the initial commit for the connect options documentation update Change-Id: I9cf201363117a2f05e611c26a058f035fa945ddb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QSqlDatabase: remove a pointless const_castGiuseppe D'Angelo2022-12-231-1/+1
| | | | | | | | | | | | The history of that one line of code is... interesting, to say the least. `defaultConnection` was originally declared as `char *`, which happened to work on older MSVC versions. Then it gained a workaround for other platforms by conditionally marking it const, with a const_cast to keep the code working on MSVC. Now it is unconditionally declared as a const char *, but the const_cast is still there. Get rid of it. Change-Id: Ibfb6728e05f15f540137c94f2d278bd5db988b63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support connecting Oracle DB as system userJohannes Oikarinen2022-12-221-0/+7
| | | | | | | | Adding support to different authentication modes to Oracle DB. Adjust the connection string parsing a little bit as a drive-by. Change-Id: I24ed70ed5085f22ba58eff70caa685579d31c96f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL: rework the connection options documentationChristian Ehrlicher2022-12-222-92/+199
| | | | | | | | | Move the documentation of the connection options to the SQL Drivers page and try to add a small but useful documention to each option. Fixes: QTBUG-109507 Change-Id: Id1d51d7a666ac0f15cde8d73bff153dad271d34b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL: misc cleanup in QSqlRecord/QSqlFieldChristian Ehrlicher2022-12-222-35/+19
| | | | | | | | Cleanup an unused function in QSqlRecordPrivate and use member initializers for the ctors in QSqlRecord/QSqlField Change-Id: I7d585e70c83373b3092e9f1425233af42b8c379d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/MySQL: add connect option MYSQL_OPT_LOCAL_INFILEChristian Ehrlicher2022-12-081-0/+1
| | | | | | | | | Add the connect option MYSQL_OPT_LOCAL_INFILE to be able to specify the client-side LOCAL capability for LOAD DATA operations Fixes: QTBUG-104916 Change-Id: I9914250059e7dc1a705941d3b409fa624e105ecd Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* SQL/MySQL: rework driver option parsingChristian Ehrlicher2022-10-221-5/+12
| | | | | | | | | | Rework the parsing of client option to make it easier to add new options. Add the two options MYSQL_OPT_SSL_CRL and MYSQL_OPT_SSL_CRLPATH and deprecate the SSL_foo options without the MYSQL_OPT_ prefix. Change-Id: Ibaf5f553d77d9c102ca2bfef2fe68be0572f594b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-046-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce the qt_deprecates pragmaAlexey Edelev2022-09-061-0/+1
| | | | | | | | | | | | | | The qt_deprecates pragma indicates that the file passed as argument is deprecated and supposed to be replaced by the file where the pragma is defined. Syncqt procedure generates the file passed as argument automatically with the deprecation warning. After the deprecation period the pragma should be removed and the deprecated file will not be included to the Qt installation too. The pragma is only handled by the cpp version of syncqt cpp and supposed to replace the 'deprecatedheaders' record in sync.profiles. Change-Id: Ibe69423a5de67f58907a3edbc5961f5ab63944de Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>