summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add alt text for \image tags for QtSqlEren Bursali11 days2-0/+5
| | | | | | | | | Adding alt texts that were needed for qdoc Pick-to: 6.10 Change-Id: I0d6a32d3e4368b60016229bf04c24c6978896d9b Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
* SQL/MariaDB: Enable MYSQL_OPT_TLS_VERSIONChristian Ehrlicher11 days1-1/+1
| | | | | | | | | MYSQL_OPT_TLS_VERSION is supported since MariaDB C Connector 3.1.10 so we should enable it also for MariaDB. Pick-to: 6.10 Change-Id: Iaec42fa83bf6da42295d297455f07436afeae8d3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Build with QT_NO_URL_CAST_FROM_STRINGAhmad Samir2025-11-201-0/+1
| | | | | | | | | | | Can't mark the whole repo with that macro, because in corelib that would take out the QString conversion operator which is BiC. Add a hard build-time error if QT_NO_URL_CAST_FROM_STRING is defined in corelib, as requested in code review. Change-Id: Ia0e302a2f82b86800e84d15e86ab138f78d45e4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add security tags to the Qt Sql moduleVolker Hilsheimer2025-09-1736-0/+36
| | | | | | | | | | | | | | 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>
* Doc: Fix incorrect usage of \generatelistTopi Reinio2025-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | The \generatelist command takes an optional argument that affect how the members are listed, for example, `classesbymodule` which creates an annotated list of the classes in a named C++ module. `groupsbymodule` is not recognized or documented. QDoc falls back to generating a list of all members of a group in this case. While the end result is correct, this relies on an undocumented feature that is likely to change and break. Replace these instances with an explicit \annotatedlist command that produces the same output. Pick-to: 6.10 Task-number: QTBUG-138901 Change-Id: I5d83c0e54daa1888beebb77d8391ea607b8464ed Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make doc-snippets a "build part", ie -nomake/make doc-snippetsTor Arne Vestbø2025-07-301-1/+1
| | | | | | | | | For now the private feature 'doc_snippets' is left as is, and acts as the default for the build-part. Change-Id: I37476f5f7aabe741cc5eb87c801ec47578d6b488 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revert "QSqlQueryModel::setLastError should be const"Axel Spoerl2025-07-072-3/+3
| | | | | | | | | This reverts commit 6733f3893caa2e195613690fccc5ec86fd8a118c. Reason for revert: breaks BC Change-Id: Id210bd855159bad58e216a46c52d03599155e25b Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QSqlQueryModel::setLastError should be constDheerendra Purohit2025-07-042-3/+3
| | | | | | | | | | The setLastError() function only modifies the mutable member d->error, so it can safely be marked as const. This change allows setLastError() to be called from other const member functions. Fixes: QTBUG-136490 Change-Id: I62999a2696b1742208745890a76769f8977918cc Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Fix links to deprecated functionsDavid Boddie2025-06-162-2/+2
| | | | | Change-Id: I1a8ae38121b3a9880ac67f80133df3c15b9951c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/DB2: Add and document DB2_ROOTChristian Ehrlicher2025-06-131-2/+2
| | | | | | | | | | Sync the cmake arguments to search for DB2 with the rest of the qsql find modules and provide a DB2_ROOT env or cmake var. Also allow the old variables as a fallback. Pick-to: 6.10 Change-Id: I587e519b5cf3513e9580f64f0fb9b46bf789da5c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SQL/MySQL: add option MYSQL_OPT_SSL_VERIFY_SERVER_CERTChristian Ehrlicher2025-06-031-0/+7
| | | | | | | | | | | | | | Add option MYSQL_OPT_SSL_VERIFY_SERVER_CERT to disable ssl for MySQL 5.7.x and MariaDB. This is needed as MariaDB does not support the SSL_MODE options but defaults to ssl nowadays. Also enhance the documentation for MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE by providing the needed MySQL/MariaDB versions for those options. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-136550 Change-Id: If570cf8e92d0df7c9e2c4d0e009857eaf33f4f2d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Enable automatic linking to sources on code.qt.ioTopi Reinio2025-05-271-0/+3
| | | | | | | | | | | | Since 6.10, QDoc is capable of generating links to the declaration in the source code for each documented C++ API entity in their `Detailed description`. Add the required configuration to enable this feature in online documentation builds. Change-Id: Iaafabc5aea50a6cd72549bb1c04007bb4de498ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QSqlDatabase: make evident the name of the driver that failed to loadThiago Macieira2025-04-141-3/+3
| | | | | | | | | | | | | | 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 <ch.ehrlicher@gmx.de>
* Doc: Add Alt-text to the Qt SQL examplesSafiyyah Moosa2025-04-093-3/+3
| | | | | | | | | | | | | | QDoc generates warnings for images that do not have alt-text associated with them. Alt-text is used to add context to images for users who use screen-readers. This patch applies alt-text to images in the Qt SQL module that do not have any alt-text associated with them. Fixes: QTBUG-135114 Pick-to: 6.9 6.8 Change-Id: Iead375852d30219db7dfed12bb1f383eb55713e6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QSqlError: rename ctor parameter to 'nativeErrorCode'Christian Ehrlicher2025-03-312-6/+6
| | | | | | | | | 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 <thiago.macieira@intel.com>
* QSqlQueryModel: memoize roleNames()Marc Mutz2025-03-201-1/+2
| | | | | | | | | | | | | | | The return value of this function is constant and some users (QML?) may call this function often, so memoize the result of the function instead of re-creating the QHash on every call. Amends 40206a9f6d7635bb19305d1c8d74908808e3529e. Not picking to Qt 5, because I'm unsure about the state of magic statics there, and I don't want to take out the Q_GLOBAL_STATIC sledgehammer. Pick-to: 6.9 6.8 6.5 Change-Id: I8311e93ea16982c82e8312e1e104d95ed062fe6b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSqlQueryModel: restore RVO in data()Marc Mutz2025-03-171-4/+3
| | | | | | | | | | | | | | | | | The return of a default-constructed QVariant 'v' from three branches invites NRVO, but most compilers won't let it kick in, because there are two return statements that don't return 'v'. Return an rvalue from each branch, so RVO is guaranteed (since C++17) to kick in. Amends the start of the public history. Picking back all the way, since it's risk-free. Pick-to: 6.9 6.8 6.5 5.15 Change-Id: I495885bee3ebba63c9e52640903c792011c1dee2 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Doc: Clarify building a separate SQL driverJoerg Bornemann2025-03-071-0/+3
| | | | | | | | | Mention that one needs to build the SQL driver with Ninja after configuring it with qt-cmake. Fixes: QTBUG-105036 Change-Id: Ic51310e7a2ea3c71d9de1c2c4677fdc9cbb897e5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Short live QCoreApplication::instanceExists()Thiago Macieira2025-02-261-3/+3
| | | | | | | | | | | | | | | | | | 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 <marc.mutz@qt.io>
* QSqlDatabase: provide QString defaultConnectionName()Thiago Macieira2025-02-072-8/+13
| | | | | | | | 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 <ch.ehrlicher@gmx.de>
* QSqlDatabase: fix historical mistake of defaultConnection being non-constThiago Macieira2025-02-073-3/+21
| | | | | | | | | | | | | | | | | | | | | | 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 <marc.mutz@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QSqlQuery: complete the deprecation/removal of its copiesGiuseppe D'Angelo2025-02-034-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <marc.mutz@qt.io>
* QSqlQueryModel: add new function to refresh the model dataChristian Ehrlicher2024-12-202-20/+6
| | | | | | | | | | | | | | This function re-executes the query used by QSqlQueryModel and refreshes the data from the database. The query must not use bound values as these values are not preserved. [ChangeLog][QtSql][QSqlQueryModel] Added refresh() to refresh the model data from the database. Pick-to: 6.9 Task-number: QTBUG-123603 Change-Id: I3f1d779e07b88565abe825c31cfc4d7d1b2312c4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlDriver: return the connection name of the assoicated QSqlDatabaseChristian Ehrlicher2024-12-204-1/+23
| | | | | | | | | | | | | | | 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 <volker.hilsheimer@qt.io>
* QtSql: fix GCC -Wextra-semi warnings after member function definitionsAhmad Samir2024-12-122-2/+2
| | | | | | Pick-to: 6.9 6.8 Change-Id: I5b65f543d7a36386181e493d8b9ce0267132d686 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSqlTableModel: remove a call to `cache.empty()`Botond István Horváth2024-12-051-3/+0
| | | | | | | | | | | | | | | The call to the const `empty()` didn't do anything, because its results were unused. Since this code has not been touched for some ~13 years, just drop the call. (Probably clear() was intended, however doing that change makes the corresponding autotest fail.) Aggressively cherry-picking because I want to also cherry pick [[nodiscard]] on empty() (which would've found this bug N years ago.) Change-Id: I801d0c364a7122bb26d407c23ae99278939c50ff Pick-to: 6.8 6.5 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: David Faure <david.faure@kdab.com>
* QSqlQueryModel: New method to re-execute the current queryDheerendra Purohit2024-11-202-0/+31
| | | | | | | | | | | Add refreshQuery() and refreshQuery(const QSqlDatabase &db) to refresh the model data. [ChangeLog][QtSql][QSqlQueryModel] Added refreshQuery() and refreshQuery(const QSqlDatabase &db) to refresh the model data. Fixes: QTBUG-123603 Change-Id: I6738006dd8ca2fc82f3b4ad88b663c7b353a09f6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* CMake: Add doc_snippets featureKai Köhne2024-11-191-2/+1
| | | | | | | | | | | | | We'd like to compile-test doc_snippets on some configurations. So far, we enable this by checking the private_tests feature, that is in turn enabled by default by developer_build. Let's rather have a separate doc_snippets feature, as we might turn this on and off independently from private tests. In fact, private API shouldn't be used by any of the snippets. Change-Id: Icba8f6af610d7951e65783d8b1700be57584cc4d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SQL/Doc: add notes about QDateTime handlingChristian Ehrlicher2024-11-141-0/+43
| | | | | | | | | | Add a note on how timestamps are handled for the different database drivers. Pick-to: 6.8 Task-number: QTBUG-130118 Change-Id: I1bad480fa18b5b719870635db1444c8db8c7d966 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Create qdoc macros for C++ class docs 1.3: member-swap(), non-standard phrasingMarc Mutz2024-11-082-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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ö <topi.reinio@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Create qdoc macros for C++ class docs 1.2: member-swap(), simplified phrasingMarc Mutz2024-11-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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ö <topi.reinio@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Create qdoc macros for C++ class docs 1.1: member-swap(), traditional phrasingMarc Mutz2024-11-052-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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 <ivan.solovev@qt.io>
* QSqlRelationalTableModel: properly clear relational dictionaryChristian Ehrlicher2024-09-071-3/+18
| | | | | | | | | | When the relationModel is updated (e.g. a new row is added or removed), the internal relation cache needs a refresh to reflect those changes. Pick-to: 6.8 Fixes: QTBUG-128434 Change-Id: Ie388c01d545564ad7b1424d70267166ac1e4bfd6 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Allow resetting foreign key in QSqlRelationalTableModelTobias Koenig2024-09-041-3/+4
| | | | | | | | | Change the QSqlRelationalTableModel::setData() method to remove the associated foreign key, if called on a relational column. Task-number: QTBUG-47713 Change-Id: Ib3cf03f1da506d63f1a59349d64d5da45bde4137 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* SQL/Doc: improve documentation on building and debugging a sql driverChristian Ehrlicher2024-09-011-10/+28
| | | | | | | | | Add some notes on the prerequisites when building a sql driver from source and also add some more notes in the troubleshooting section. Pick-to: 6.8 6.7 6.5 Change-Id: I8ffbcf4182c2ad2c7b9f86209e0ce332fd27d73c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/Interbase: Add and document Interbase_ROOTChristian Ehrlicher2024-08-302-25/+6
| | | | | | | | | | | | Instead specifying Interbase_INCLUDE_DIR and Interbase_LIBRARY allow to use Interbase_ROOT instead. Use this new option in the sql driver documentation. Additionally add 'fbclient_ms' as possible library name so we don't need to distinguish between Interbase and Firebird anymore. Pick-to: 6.8 Change-Id: I472f95f82ebb93888002deccdf5028a1827a4745 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SQL/MySQL: use MySQL_ROOT in documentationChristian Ehrlicher2024-08-281-3/+3
| | | | | | | | | | Instead specifying CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH use MySQL_ROOT which is suits much better for the usecase. Pick-to: 6.8 Change-Id: Ieb75f80a6eb3a3e7913a7c04ca6511a014fa7e4e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SQL/Oracle: use Oracle_ROOT in documentationChristian Ehrlicher2024-08-281-2/+2
| | | | | | | | | | Instead specifying Oracle_INCLUDE_DIR/ORACLE_LIBRARY use Oracle_ROOT which is suits much better for the usecase. Pick-to: 6.8 Change-Id: I8a0858b3ae491212a79ad982eb8e067e6f1b750f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* SQL/PostgreSQL: use PostgreSQL_ROOT in documentationChristian Ehrlicher2024-08-282-3/+3
| | | | | | | | | | Instead specifying CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH use PostgreSQL_ROOT which is suits much better for the usecase. Pick-to: 6.8 Change-Id: Iac239d88d4c9c11d5482acacb2bbb1bb034c4365 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Remove usage of defunct QDoc commandPaul Wicking2024-08-282-4/+0
| | | | | | | | | | | | | | The QDoc command `\tableofcontents` was rendered useless by a change more than a decade ago. Remove the use of `\tableofcontents` as it serves no purpose, and ensure that the surrounding context still makes sense for the reader, by removing preceding text that refers to a non-existing table of contents, such as `Contents:`. Task-number: QTBUG-128173 Pick-to: 6.8 Change-Id: Ibb5a6af0e80f70fa487cdf6a7e38009a9ef60cbf Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* SQL/Doc: remove paragraph about CMAKE_INCLUDE/LIBRARY_PATHChristian Ehrlicher2024-08-252-26/+0
| | | | | | | | | | | | | Using CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH to find the correct database includes and libraries does work but is nothing which should be documented here - it's a common way to specify common paths for cmake. Documenting this here just confuses the user (which already has hard times to compile the plugins by itself). Pick-to: 6.8 Change-Id: I0cb051f06f3c71f005290700e3b6c32da9a0b2b5 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Docs: Organize topics in the qtbase repoAlexei Cazacov2024-08-132-1/+34
| | | | | | | | | | This commit organizes the articles, so they: - have a reasonable tree structure - can be navigated through the topic tree in the Qt Creator help viewer Task-number: QTBUG-127046 Change-Id: I66f2b131b8aacc887b35a770e51c1425431dffb5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* SQL/QSqlRelationTableModel: don't crash with more than one relationChristian Ehrlicher2024-07-221-30/+35
| | | | | | | | | | | | | When more than one relation is used, an internal container might be resized which can lead to a reallocation. Since the internal data structure holds a pointer to an element of this container, this pointer is invalidated after the reallocation. Therefore store a QSharedPointer instead. Pick-to: 6.8 6.7 6.5 Fixes: QTBUG-60674 Change-Id: I18c6157c7328be201f8b89a7ca12f423a86d9b71 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QSqlDriver/doc: Add a note about features depending on the db serverChristian Ehrlicher2024-07-221-1/+3
| | | | | | | | | | 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 <axel.spoerl@qt.io>
* SQL/QSqlField: move deprecated functions decls to correct placeChristian Ehrlicher2024-06-131-5/+7
| | | | | | | | Don't move them around during deprecation. Pick-to: 6.8 Change-Id: I647fec5a440ea063463dc285def5d793726a9e61 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* SQL: Code cleanup - move Q_PROPERTY to the correct placeChristian Ehrlicher2024-06-125-8/+8
| | | | | | | | ... which is directly after Q_OBJECT/Q_GADGET Pick-to: 6.8 Change-Id: I3fb2b2e810a68e0ae811e55b286bc5f40364295f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/Doc: add note about QAnyStringViewChristian Ehrlicher2024-06-122-0/+33
| | | | | | | | | 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 <volker.hilsheimer@qt.io>
* Remove GENERATE_CPP_EXPORTS argumentAlexey Edelev2024-06-121-1/+0
| | | | | | | | | The behavior that argument was enabling is the default one now. Pick-to: 6.8 Task-number: QTBUG-90492 Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Logging: Add a macro for static logging categoryUlf Hermann2024-06-052-2/+2
| | | | | | | | | | | | 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ø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSqlRecord/QSqlQuery: Use QAnyStringView instead QStringViewChristian Ehrlicher2024-06-045-113/+121
| | | | | | | | | | | | | | | | 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 <volker.hilsheimer@qt.io>