summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
Commit message (Collapse)AuthorAgeFilesLines
* SQLite: Handle tables and fields with a dot in the name correctlyAndy Shaw2021-05-021-9/+24
| | | | | | | | Fixes: QTBUG-91885 Change-Id: Iba76bb50266dd4fb5f50e4ea1549d1d2bb6e3431 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 66acee69a1563488e5950645c171d6be73dd5f70) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip adding externally added plugins to the plugin meta-setsAlexey Edelev2021-04-261-3/+0
| | | | | | | | | Plugin meta-sets are not visible outside of the module build tree, so there is no point in adding dependencies for externally added plugins. Change-Id: Ica5b29b57c032f4fc9b128172aaa806392e9e581 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit bbe26a766748c00da5e2241a9c7ec5e714dd76ad)
* QODBC: Preserve the whole value when using HighPrecisionAndy Shaw2021-04-191-1/+2
| | | | | | | | | | | | | Some ODBC drivers do not properly handle SQL_NO_DATA and therefore decimal values returned with HighPrecision are cut off because the decimal point is not taken into account. Fixes: QTBUG-73286 Change-Id: I905c947b4d0266a3245d5735300300ca00f77480 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit c2657f9762e01abd65ac991ba31e3ca085d9540c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation of the QPSQLDriverPlugin plugin with enabled PCHAlexey Edelev2021-02-101-0/+11
| | | | | | | | | | | | | | | | PostgreSQL package delivers several header files such as pthread, zlib, zconf, uuid, etc. within Windows installation package. The headers are exposed to the compiler by PostgreSQL include paths and have different versions. When compiling PCH of the QPSQLDriverPlugin plugin, MinGW uses the pthread.h header from the PostgreSQL include paths, that cause an error related to pthread implementation mismatch. Disable PCH for the QPSQLDriverPlugin plugin, when using MinGW. Fixes: QTBUG-90850 Change-Id: I0be91bbefe37731acb2658d679b5b644ef552b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 43cb801ccb10e2d9efd230803822761b794fd4fb)
* QSql/PostgreSQL: allow blobs with more than 2^30 bytesChristian Ehrlicher2021-02-031-2/+2
| | | | | | | | | | | | | Due to limitations of QByteArray it was not possible to store more than 2^31 bytes. This was fixed in Qt6 so throw away the casts to int in the postgres plugin Fixes: QTBUG-79059 Change-Id: I8ae7276a04d4936bcf5ba6c413e3412f6c342ff5 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 4e2a94236998cd05753167953d9167793baf9942) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add upstream version of FindPostgreSQL.cmakeAlexey Edelev2021-02-011-3/+0
| | | | | | | | | | | | | | Add CMake upstream(3.20.0) version of FindPostgreSQL.cmake, to avoid server-related headers lookup. Avoid using the Qt version of the PostgreSQL module, if it's older than the CMake's one. Fixes: QTBUG-89639 Change-Id: I71a0c3508000901969933aea8a08d1ad431db711 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit e3e1fc482053587811f39dcc9d1be231df00f660) Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Fix compilation of ibase sqldriver plugin, added overrideAndreas Buhr2021-02-011-1/+1
| | | | | | | | | With gcc 10.2, I cannot compile qtbase without this patch. Change-Id: I5be48947e2301d5befeec397291c0da597f7eb63 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit f1cebefd01e8162846e072daa69e48bebd6bbeec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix separately building SQL plugins with CMake 3.16Joerg Bornemann2021-01-211-1/+3
| | | | | | | | | | | | | | Also move the cmake_minimum_required call to the top of the file, because the line before already requires some policy settings, which is what cmake_minimum_required() is establishing. For the standard Qt build, we make sure to get appropriate policy settings by calling qt_internal_upgrade_cmake_policies(). Change-Id: If97556a9dd00646e83957959d0f9f16916625160 Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit d95a1a8bd4734df3c2b6b55e5eb7a86108b682d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Interbase: Don't error out if closing an already closed cursorAndy Shaw2021-01-141-1/+7
| | | | | | | Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 4d3d981144d810fbf1fe263741d36b07a9227621) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bump versionPaul Wicking2021-01-051-1/+1
| | | | | | | | CMake edition. Task-number: QTBUG-89789 Change-Id: I418aa610926bbd7f5ddf1d4db45a4a27c8168598 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Fix error and print summary for standalone building sqldriversLi Xinwei2021-01-041-0/+7
| | | | | | | | | | | | qt_plugins target is needed by qt_internal_add_plugin function, but when standalone building sqldrivers, this target does not exist, which causes configure error. So we need to add this target manually. Fixes: QTBUG-89714 Change-Id: Ia7d613faabb82399c2f3e5771aab24302b3c8f56 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 173f163ad21835c9cf514f601b72034777ff1b19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* fix potential mem leak on connection lostMatthias Möller2020-12-301-15/+12
| | | | | | | | | | | | | | | | The PostgreSQL driver can change it's connection status after the first established connection. In this case, the function "isOpen()" returns false and the "close()" function would not free all resources. With this fix, the "close()" function always frees any allocated resource independent of the connection status. Fixes: QTBUG-88984 Change-Id: I7c9add6a183bf46a8573952ab39f8cb1f728c00c Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 6e9125608f2c07c6c5f41a7a42ea097d1333e1e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* OCI: Fix the compilation of the pluginAndy Shaw2020-12-131-5/+6
| | | | | | | Change-Id: I9637bab6cc217d4fd9692f6745b4f14db6ffb259 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 7b391c0d2c03d8d25449eca3868cd010d75ff81e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-166-28/+28
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-235-325/+322
| | | | | | | | | 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-23/+23
| | | | | Change-Id: Ibcaa678cd9f9c957392a75b477fa6821f9a69127 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-077-17/+17
| | | | | | | | | 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>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-236-22/+22
| | | | | | | | | | | 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>
* Interbase: Add support for the boolean typeAndy Shaw2020-09-111-1/+22
| | | | | | | | | | | | | 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>
* Interbase: Correctly read/write arrays to the databaseAndy Shaw2020-09-081-17/+3
| | | | | | | | | | | 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>
* PostgreSQL: Attempt to subscribe even if it is already addedAndy Shaw2020-09-071-9/+8
| | | | | | | | | | | | As the connection could be lost and then reconnected for the same driver instance then it should just do the LISTEN query as it will not do anything if it is already subscribed. Fixes: QTBUG-84356 Change-Id: I6179bca3991c3828ccee066fd96a6e5003c522be Pick-to: 5.15 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QSqlite: Don't crash after binding too many placeholdersMarcel Krems2020-08-241-1/+6
| | | | | | | | | | | | | | When you bind more values than the query has placeholders, indexes will be empty which causes an out-of-bounds access in indexes.first. We can't check the parameter count because of multiple placeholders with the same name, so we check if the name is null. Tested with SQLite and PostgreSQL Pick-to: 5.15 Change-Id: Id5d4bd15d7ed16603f47b87d6e0bf811a20157d8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Interbase: Close the cursor before reopening it later onAndy Shaw2020-08-231-3/+3
| | | | | Change-Id: If21d33262b8ca53c17a7d236baaa828907116cab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 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-155-56/+56
| | | | | | | | 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-155-10/+9
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-1/+1
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Introduce maximumIdentifierLength to return database limits for namesAndy Shaw2020-08-112-1/+7
| | | | | | | | | 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: Don't call toUpper() on the names as they are escapedAndy Shaw2020-08-101-2/+2
| | | | | | | | | | 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>
* CMake: Properly handle CONFIG += thread aka Threads::ThreadsAlexandru Croitor2020-08-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mkspecs/features/qt.prf adds a dependency on the system threading library if the Qt Core thread feature is enabled. Because qt.prf is loaded by any public or internal Qt project, it's essentially a public dependency for any Qt consumer. To mimic that in CMake, we check if the thread feature is enabled, and and set the Threads::Threads library as a dependency of Qt6::Platform, which is a public target used by all Qt modules and plugins and Qt consumers. We also need to create a Qt6Dependencies.cmake file so we find_package(Threads) every time find_package(Qt6) is called. For the .prl files to be usable, we have to filter out some CMake implementation specific directory separator tokens 'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call target_link_libraries() with a target created in a different scope (I think). As a result of this change, we shouldn't have to hardcode Threads::Threads in other projects, because it's now a global public dependency. Task-number: QTBUG-85801 Task-number: QTBUG-85877 Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MySQL: Remove anything that refers to lower than MySQL 5.6Andy Shaw2020-07-081-33/+1
| | | | | | | | | | Since MySQL 5.6 is currently the lowest version still supported on any platform then we can safely assume this to be the lowest version that we support now. Fixes: QTBUG-683 Change-Id: I177bd87053e9aa6c302164ccb3a4aee444aa3701 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-067-60/+59
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port QtSql from QStringRef to QStringViewLars Knoll2020-06-111-1/+1
| | | | | | Task-number: QTBUG-84319 Change-Id: Icc9b955dae1aa13b16c01e26192cb82f828903b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove winrtOliver Wolff2020-06-062-20/+4
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port QRegularExpression to QStringView, drop QStringRefGiuseppe D'Angelo2020-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | The idea is pretty simple -- add QRegularExpression matching over QStringView. When matching over a QString, keep the string alive (by taking a copy), and set the view onto that string. Otherwise, just use the view provided by the user (who is then responsible for ensuring the data stays valid while matching). Do just minor refactorings to support this use case in a cleaner fashion. In QRegularExpressionMatch drop the QStringRef-returning methods, as they cannot work any more -- in the general case there won't be a QString to build a QStringRef from. [ChangeLog][QtCore][QRegularExpression] All the APIs dealing with QStringRef have been ported to QStringView, following QStringRef deprecation in Qt 6.0. Change-Id: Ic367991d9583cc108c045e4387c9b7288c8f1ffd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate src/pluginsAlexandru Croitor2020-05-293-2/+5
| | | | | Change-Id: Icceceeb42023e7fa5edf320bb21f03d11bd357b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add missing overrideAlexander Volkov2020-05-211-1/+1
| | | | | | Change-Id: I88000e82ecbdc55e621dc8e22aff5e8f55cf9d0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-191-6/+9
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of some QTextCodec leftoversLars Knoll2020-05-141-3/+0
| | | | | | | There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Sweep of int-ish → char-ish types near calls to QString::fromU*()Marc Mutz2020-05-121-2/+2
| | | | | | | | | | | | The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going to be deprecated. Use the newer fromUtf16(char16_t*) and fromUcs4(char32_t*) overloads. As a drive-by, use std::end()/std::size() where applicable. Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Force the ibase plugin to use utf8Lars Knoll2020-05-012-91/+25
| | | | | | | | | | | | | Firebird supports utf8 properly since version 2.0 (released some time before 2012), so force the client encoding to it, and remove the QTextCodec related code. Remove pre Firebird 2.0 code paths at the same time and add an assertion to test that we have recent enough client APIs. Change-Id: I4c23e23f2fb1b4f550eaca63c47587fe9aaf3a6d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Always assume utf8 for the client connection with the mysql serverLars Knoll2020-05-011-74/+22
| | | | | | | | | | The code was already trying to set the client charset to utf8. Enforce this further and issue a warning if it fails. Remove the text codec dependencies and directly use to/fromUtf8(). Change-Id: Ib75e46aaf0d1a274f6832b19eb38623a5cae5eb3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-279-9/+10
| | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix compilation of thee OCI driverLars Knoll2020-04-241-1/+1
| | | | | | | Amends change befd198c15b7a2b95f539372d2557063b6b397a6 Change-Id: I11cc116d31fa1f71acd9579e60a6b265811def1e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* CMake: Allow sqldriver plugins to be built as standaloneLeander Beernaert2020-04-241-0/+16
| | | | | | | | | | | | | This patch allows all the sqldrivers to be built as a standalone project. It is not possible to build each plugin separately due to the configuration features definition being located in the sqldriver's folder CMakeLists.txt. In other words, the project needs to be generated from the src/plugins/sqldrivers/CMakeLists.txt file. Fixes: QTBUG-82962 Change-Id: If41c7e3827589391830a894a9c998d2e56239562 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-222-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| * Introduce QSocketNotifier::activate(QSocketDescriptor, QSN::Type)Mårten Nordheim2020-04-162-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pre-existing overload passes an int, but this can mean the descriptor gets truncated in compilations where the descriptor is 64-bit. The old overload with int is visible when querying the metaobject system so string-based connects still work as before, and connecting to it will produce a deprecation warning in the output. At the same time the PMF-based connect will, on recompile, pick the QSocketDescriptor overload. As an added improvement it also comes with the notification type, removing the need for separate slots where the code would be mostly shared anyway. The QSocketDescriptor type can be implicitly converted to and from qintptr to ensure existing code still compiles. It can also be constructed from Qt::HANDLE on Windows. In this same patch I also update the existing string-based connects in this module, which then includes updating the parameters for some slots as well. [ChangeLog][QtCore][QSocketNotifier] Added QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type). This replaces the activated(int) signal which in 64-bit environments could truncate the socket descriptor. If you use "activated" with the string-based connect() then you need to update the parameter type of the signal and slot if it had one. If you use it with the pointer to member function based connect() then all you need to do is update your slot's parameter type if it has one. If you need to compile your source code with multiple versions of Qt then connect() to this function using pointer to member function and update the slot's parameter type if needed. Task-number: QTBUG-70441 Change-Id: Ic43d6bc4c5bcb4040867b2ffad8d36fb01eed8af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | CMake: Add support for bundled SQLite libraryLeander Beernaert2020-03-253-7/+85
| | | | | | | | | | Change-Id: I4d3f6e3bf04eb2fcf337e2c5dbc04b6e6f8ebe0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix warning in qsql_odbc.cpp when building with MSVC2017Mitch Curtis2020-03-201-1/+1
| | | | | | | | | | | | | | | | qsql_odbc.cpp(1589): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Change-Id: Ib36fda3e3b21bdbc8b343ae5136542dfcf3c1065 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>