summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix warnings about wrong snippet path or missing .pro fileNico Vertriest2021-02-191-0/+3
| | | | | | Task-number: QTBUG-91147 Change-Id: I6a55b2b713dd70cf1cbb0b93a8d4152e175e2c4d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix misguided conditional, simplify codeEdward Welbourne2021-02-181-6/+2
| | | | | | | | | Prompted by a PVS-studio article. The count <= 0 check made a later !count check redundant. Change-Id: I6c00ad6137b14db13c9c31c61833b4546f663072 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation warnings qtbaseNico Vertriest2021-02-181-7/+8
| | | | | | Task-number: QTBUG-90662 Change-Id: If31847f8f2b8b57a8a8624d0406a030b5752f1c8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CMake: Port the snippet project setup to CMakeVenugopal Shivashankar2021-02-103-0/+26
| | | | | | | | Change-Id: I411e58e94752f3b2d0a3e8aac0ab7c4c2272db89 Fixes: QTBUG-89826 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Adjust sql drivers documentation to cmakeAlexey Edelev2021-01-192-163/+195
| | | | | | | | Update sql drivers build procedure description. Fixes: QTBUG-89782 Change-Id: I152fad108e24d394c8d21adf95ce6dbd6e7d80bc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QSql/QSqlite: return extended error codes by defaultChristian Ehrlicher2021-01-111-0/+1
| | | | | | | | | | | | | SQlite allows to return fine-granulated error codes but this behavior is not enabled by default (due to backwards compatibility concerns). Enable them for the SQLite driver by default but provide an option to disable them when needed. [ChangeLog][QtSql][QSQLITE] The plugin now returns the extended error codes by default. Change-Id: I59cec9aea46eb03f1e7ca02903d769c003a1ae30 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-076-88/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-11-301-1/+1
| | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update landing pages and module pages in qtbaseJerome Pasion2020-11-171-4/+3
| | | | | | | | | | -Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets, Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core -language edits for consistency, add links Task-number: QTBUG-87155 Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-162-3/+3
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Doc: Update the SQL types documentation with regards to the double typesAndy Shaw2020-11-121-18/+18
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-88198 Change-Id: I61b276ad5f2209a874c6b8bcf04ccffd23e3125d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix Qt SQL terminologyJerome Pasion2020-11-121-2/+2
| | | | | | | | -"SQL" all uppercase Task-number: QTBUG-88010 Change-Id: I3e2e45b4d9564982baee6993e939fcc7fa126f56 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-3/+3
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib59de7976fae19e7b39962e80161df6628e4070b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Prefer versioned CMake library targetsv6.0.0-beta3Kai Koehne2020-11-011-1/+1
| | | | | | | | The non-versioned one's do miss some properties. It's therefore best to not advocate using them. Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Fix documentation warnings for Qt SQLTopi Reinio2020-10-302-2/+6
| | | | | | Task-number: QTBUG-86295 Change-Id: Ia8c0daabcf79e56d51de801cb2be1b83bf03276b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix links to the CMake manualTopi Reinio2020-10-301-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I7b2208284d65ec9182352490bd4c92458c5e5e37 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-234-12/+12
| | | | | | | | | 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>
* Cleanup remaining QVariant::Type uses in Qt SqlLars Knoll2020-10-171-2/+4
| | | | | Change-Id: Ibcaa678cd9f9c957392a75b477fa6821f9a69127 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-4/+4
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: Fix QSqlField documentation for deprecated constructorVolker Hilsheimer2020-09-222-31/+4
| | | | | | | | Also, merge constructor overloads, and remove superfluous explicit from a non-converting constructor. Change-Id: I60d0e646d1aaeb8ea66b7598076c3e3ba356c12e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add links to Qt 6 changes files from module indexPaul Wicking2020-09-181-0/+4
| | | | | | Task-number: QTBUG-84051 Change-Id: Iac25df135c9d73a990b41243e08cd38ea78296a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Add porting guide documentsPaul Wicking2020-09-161-0/+2
| | | | | | | | Also add existing such docs to the new document group Task-number: QTBUG-84051 Change-Id: I76f033f0846e09943f249d2beeb1606869eef382 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Interbase: Handle EXECUTE BLOCK statements correctlyAndy Shaw2020-09-131-0/+7
| | | | | | | | | | | | Since an EXECUTE BLOCK statement can have a mix of ? and :var syntax then a special case for this needs to be added so that it does not try to convert the :var parts into positional placeholders as they need to kept as-is when preparing such a statement. Pick-to: 5.15 Fixes: QTBUG-83152 Change-Id: Iff891207ad6dea1681a1b3a335acbbbb668b465d Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-121-1/+0
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtSql: enhance documentationChristian Ehrlicher2020-09-121-0/+8
| | | | | | | | | Be a little bit more specific what needs to be done when compiling the sql driver without compiling the whole Qt Change-Id: I3e8010d4cc84a83108340e525e620abf6b6e89c1 Pick-to: 5.15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Interbase: Add support for the boolean typeAndy Shaw2020-09-111-1/+1
| | | | | | | | | | | | | 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>
* Doc: Compile snippets only when running testsPaul Wicking2020-09-103-15/+25
| | | | | | | | | | Turn snippets projects into subdirs with libraries to avoid messy dependencies. Fixes: QTBUG-86497 Pick-to: 5.15 Change-Id: Idb2c43f97d56c9b8d9992617ef716bde40fff5b7 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Derive some item delegates from QStyledItemDelegateLars Knoll2020-09-101-28/+27
| | | | | | | | | | | Address a ### Qt6 comment from change 283008e123e5eacb83869682528b2024186634f8, and start using QStyledItemDelegate in more places, so those get proper look and feel. Change-Id: I39767ba99b7942faada1fba0ac241deb35563b63 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QSqlError: Remove unused members, kept for binary compatibilityMarcel Krems2020-08-302-16/+3
| | | | | | | Also optimize the construction of QSqlErrorPrivate. Change-Id: I791ebe0b66fab43e74093186a798ef9656f97dbd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a number of qdoc warningsFriedemann Kleint2020-08-201-9/+0
| | | | | | | | | | | - Remove obsolete functions and enumeration values - Remove QObject * parameter from QMetaProperty accessors - Fix renamed enumerations in QSsl - Fix list items to be \li - Fix function signatures and variable names Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix deprecation warnings in QtSql code snippetsFriedemann Kleint2020-08-201-2/+2
| | | | | | | | Use QMetaType for constructing a QSqlField, fixing: ccode/sqldatabase/sqldatabase.cpp:91:41: warning: ‘QSqlField::QSqlField(const QString&, QVariant::Type)’ is deprecated: Use the constructor using a QMetaType instead [-Wdeprecated-declarations] Change-Id: If420ad3d7f5d9dce05ad892cddf84a1b77a45b3f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's config.input.xxx variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/configure-cmake-mapping.md are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Deprecate QVariant::Type uses in QSqlFieldLars Knoll2020-08-154-26/+86
| | | | | | | | 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-1/+1
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce maximumIdentifierLength to return database limits for namesAndy Shaw2020-08-113-2/+18
| | | | | | | | | 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>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Update sql-driver to reflect current minimum versions neededAndy Shaw2020-07-202-24/+13
| | | | | | Fixes: QTBUG-85172 Change-Id: I82a8e008deec29dd217097b8427cb84b80c3a1c9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: make cleanup on error more prominant in SQL driver instructionsSamuel Gaist2020-07-131-1/+1
| | | | | | | | | | | | | The concerned paragraph is one that is very important as there are a lot of people building the MySQL and PostgreSQL plugins that are not successful on the first try. However, this text not being emphazized, many if not all miss the fact that just re-running qmake will give them the same result if the cleanup is not applied. This patch makes this point more visible. Pick-to: 5.15 Change-Id: Ib2b97e128a5dab3dc6d771b16b5315e4ad95a9b7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-076-14/+12
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-301-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in sqlJarek Kobus2020-06-2510-16/+16
| | | | | | Task-number: QTBUG-84469 Change-Id: I942aec7d949331a52d7f12fa2725d8d9707f605f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify QSqlResultPrivate::fieldSerial()Andy Shaw2020-06-231-15/+1
| | | | | | | | | | Now that the bound values are kept in placeholder order we can depend on that and not have to ensure that fieldSerial() would give us something that is in alphabetical order should it end up being sorted. Change-Id: I3a3e443bef150a06f455e18e3502235b1ae4d242 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change boundValues() to return a QVariantListAndy Shaw2020-06-224-32/+83
| | | | | | | | | | | | | This enables the order of boundValues to be consistent as with a QMap it could have been reordered which can be a problem for positional bindings. [ChangeLog][QtSQL] Changed signature of QSqlQuery::boundValues() to return a QVariantList Fixes: QTBUG-51609 Change-Id: I1c80fa8522fa7352723420b6fc9ec466406315fb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move implementation of QVector/List back to qlist.hLars Knoll2020-06-202-2/+3
| | | | | | | | | | | | | And name the main class QList. That's also the one we document. This gives less porting pain for our users, and a lot less churn in our API, as we use QList in Qt 5 in 95% of our API. In addition, it gives more consistent naming with QStringList and QByteArrayList and disambiguates QList vs QVector(2|3|4)D. Fixes: QTBUG-84468 Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtSql: remove unused includesChristian Ehrlicher2020-06-202-5/+0
| | | | | Change-Id: I6d47daa8fe17bf4be3b100f1a04d63dee4851daa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port QtSql from QStringRef to QStringViewLars Knoll2020-06-111-4/+4
| | | | | | Task-number: QTBUG-84319 Change-Id: Icc9b955dae1aa13b16c01e26192cb82f828903b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document how to use CMake for Qt SQLKai Koehne2020-05-266-83/+21
| | | | | | | Task-number: QTBUG-73058 Change-Id: I07fa128853531ec09852647436d9302abac1c12c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Models: remove version check for clearItemData()Christian Ehrlicher2020-05-232-4/+0
| | | | | | | The version checks for clearItemData() are no longer needed now. Change-Id: I5052188fb96cf637128662f3442d339820f0f41d Reviewed-by: David Faure <david.faure@kdab.com>