summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/oci
Commit message (Collapse)AuthorAgeFilesLines
* Add security tags to the Qt Sql moduleVolker Hilsheimer2025-09-173-0/+3
| | | | | | | | | | | | | | 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>
* SQL/OCI: do not shadow QSqlCachedResultPrivate::sqlChristian Ehrlicher2025-04-232-56/+54
| | | | | | | | | | | Rename QOCIResultPrivate::sql to QOCIResultPrivate::stmtp to avoid shadowing of the sql member from base class. Remove some useless casts as a drive-by. Pick-to: 6.9 Task-number: QTBUG-136024 Change-Id: I2a5951991039c4de7aecc29f9161dede7b4f3473 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: Fix usage of QOCIResult::d_ptrChristian Ehrlicher2025-04-232-2/+2
| | | | | | | | | | | | | The refactoring in 82681fd8a2af1113da5bd13875ba71c1efd45afb added a d_ptr of type QOCIResultPrivate. This shadowed the d_ptr from QSqlCachedResult and an unitialized QOCIResult::d_ptr variable which in the end made the whole plugin unusable. Fix it by removing the unneeded d_ptr member. Pick-to: 6.9 Fixes: QTBUG-136024 Change-Id: I5ecacba8079eadbfae25a32720b43b4465c096d8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: misc cleanupChristian Ehrlicher2024-08-251-46/+34
| | | | | | | | | | | | | | Do some cleanup: - use qsizetype instead int - use default member init instead in ctor - remove unneeded functions - make a getter const This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208- Pick-to: 6.8 Change-Id: Ibb02bd93a130c5d60bf431608666a5ad1fe71ead Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: use OCIBindByPos2 instead OCIBindByPosChristian Ehrlicher2024-08-251-61/+61
| | | | | | | | | | | Use OCIBindByPos2 instead OCIBindByPos where it was not yet changed to allow lengths > 2^31 (and avoid unneeded casts). This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208. Pick-to: 6.8 Change-Id: I8b6efdfdb0fb349043e9c84ceba17e008882f584 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: Compile with MSVC/64bitChristian Ehrlicher2024-08-221-21/+21
| | | | | | | | | Make the oci driver compilable with MSVC 2022 / 64bit. One more reason to get those drivers checked within the CI. Pick-to: 6.8 6.7 6.5 Change-Id: Iec07adcd4cafde5e028ea306fb88e635a22e2234 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix build of oci plugin on arm macOS with the classic linkerAlexandru Croitor2024-08-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using Xcode 14, or 15 but with the classic linker on arm macOS, the linking of the oci plugin fails with: ld: file not found: @rpath/libnnz.dylib for architecture arm64 Even though the file is present in the expected location. This seems to be related to the use of the -flat_namespace flag, which was originally added in 2003 for Qt 3.1, to avoid an issue with the linker not finding the environ symbol. These flags doesn't seem to be necessary anymore to successfully link the plugin. Remove both the -flat_namespace and -U,_environ flags when building the plugin. Amends 3ada49976a06ae251911fd8cd734f697fe4ddab4 in the historical qt repo, which is not available publicly. Pick-to: 6.5 6.7 6.8 Fixes: QTBUG-127342 Change-Id: If522cacb92aceff35d36d3bcfd3c1f838c134ada Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* OCI: misc code tidies and fixesDennis Oberst2024-06-282-19/+23
| | | | | | | | | | | | | | | | | | | | | | In it's current state the plugin is not buildable. This patch tries to address that by fixing those issues. They include: - Drag QOCIResultPrivate into the namespace and forward declare as class. It is defined as class and this should stay in sync. - Mark the overwritten members with 'override'. - add missing declaration for 'fetchNext' - Make the pimpl a proper Qt-dPtr by using Q_DECLARE_PRIVATE and rename it into 'd_ptr' so that we can use the 'Q_D' macro. - Remove the function call to 'isCursor'. This bool is member variable of the class. - Remove a '+' in front of 'internal_prepare' definition. - Remove the 'QOCIDriverPrivate' argument to the ctor. The initial one didn't had it and no other definition was provided. Amends: 82681fd8a2af1113da5bd13875ba71c1efd45afb Change-Id: I5b5042730b0decb440795bbb627c2cacc098594e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* OCI: allow accessing results of PL/SQL procedure calls returning a REF CURSORVolker Hilsheimer2024-06-192-48/+83
| | | | | | | | | | | | Move the QOCIResult implementation of QSqlCachedResult into the private qsql_oci_p.h header, and register it as a meta type that we can pass through QVariant. Add a field that indicates whether that results represents a cursor variable, and bind it to the statement handle if so. Fixes: QTBUG-166 Fixes: QTBUG-44643 Change-Id: Iafbf5474ad7efc6d24eb52a5c5a1b3d2b6842387 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Straighten out various logging categoriesUlf Hermann2024-06-191-1/+1
| | | | | | | | | | | | Either make them static or declare them in a header. We want them to be static wherever possible, in order to reduce the number of visible symbols. If they can't be static, however, they should at least be declared in only one place. Task-number: QTBUG-67692 Change-Id: I6f3b596ed4f0adc9873dd0a5f54f055a991a6207 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: use categorized loggerChristian Ehrlicher2024-04-121-40/+38
| | | | | | | Use the categorized logger qt.sql.oci Change-Id: Ib143cfa3136a7382adbabfe4bc421b94e2a25bda Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QOCICols: fix warning for -Wdangling-referenceDennis Oberst2024-04-111-1/+1
| | | | | | | | .. by playing it safe and taking the QVariant by copy Pick-to: 6.7 6.5 Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/QSqlField: deprecate internal functions setSqlType()/typeID()Christian Ehrlicher2024-03-101-1/+0
| | | | | | | | | These functions set/get the db-specific internal sql type but it's not used in any of the sql plugins since ages. Any external plugin using this for some reason must be ported away until Qt7. Change-Id: Ifb33e9d3be0b80fb4d0979d31436e89ea6a8208b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* SQL/OCI: fix QOCIDriver::formatValue()Christian Ehrlicher2024-02-091-1/+1
| | | | | | | | | | | The switch needs to be on QSqlField::metaType() instead the internal QSqlField::typeID() which holds the db-specific type of this field. This amends 7b391c0d2c03d8d25449eca3868cd010d75ff81e. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL plugins: add moc includesChristian Ehrlicher2023-07-191-0/+2
| | | | | Change-Id: I9ed4b63fd02b4a6fc5f4b614466590cd099609e2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove the manual undef of the min/max macros, or def NOMINMAXAmir Masoud Abdol2023-06-081-7/+0
| | | | | | | | | | We now add NOMINMAX to PlatformCommonInternal target which will be linked to everything else, so min/max will not be defined upon the inclusion of `windows.h`, or other headers. Pick-to: 6.5 6.6 Change-Id: I10016720dac7ce015e929885b7368ee86d8b6918 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* SQL/OCI: add maximumIdentifierLength()Christian Ehrlicher2023-03-172-0/+8
| | | | | | | | A table name or identifier must not be longer than 30 (< Oracle 12.2) or 128 bytes (sadly not characters). Change-Id: I49192afaf908e12f5cfd20c754640b6117b03a71 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: Compile with QT_NO_CAST_FROM_ASCIIChristian Ehrlicher2023-03-121-1/+1
| | | | | | | | Don't know why this even went through the ci. Pick-to: 6.5 Change-Id: I9f0d1cee0c600c98f5b71bdd10f8f0260e43afcf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL: small optimization for SQLDriver::escapeIdentifier()Christian Ehrlicher2023-02-281-1/+1
| | | | | | | | Avoid a memmove (and replace it with a memcpy) by not using QString::prepend() but create a completely new string object instead. Change-Id: Ibdb4a9c6b15b96f1743d47e158ff0fb9b2048221 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/OCI: use QDateTime::toString("ttt")Christian Ehrlicher2023-02-281-10/+1
| | | | | | | | | | | Use QDateTime::toString("ttt") which is available since Qt6.5 instead own implementation Pick-to: 6.5 Fixes: QTBUG-111275 Change-Id: I41676d3a327c5aaabdeb4f54b9d169e228c482e1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/OCI: Correctly calculate utc offset string when icu is not availableChristian Ehrlicher2023-02-271-2/+11
| | | | | | | | | | | | | When ICU is not available, QTimeZone::displayName() does not return a valid timezone offset string so the OCI driver will get a wrong utc offset string and inserting a QDateTime will go wrong. Fix it by creating the utc offset string by ourself (toOffsetString() inside qdatetime.cpp is static and therefore not accessible for us). Pick-to: 6.5 6.4 6.2 5.15 Fixes: QTBUG-111275 Change-Id: Ib724d760688614e162246e1e028ee5e004cc9477 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* SQL/OCI: Fix QSQLDriver::record() when tablename is a synonymChristian Ehrlicher2023-02-221-3/+2
| | | | | | | | | | | Fix the statement when the tablename is a synonym by not appending the where clause for the table name to the initial statement used for tables and synonyms later on. Pick-to: 6.5 6.4 6.2 5.15 Fixes: QTBUG-111339 Change-Id: Ie18a858427d124e80462048b1a9c5e2afa327546 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* 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>
* Support connecting Oracle DB as system userJohannes Oikarinen2022-12-221-9/+18
| | | | | | | | 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/OCI: replace deprecated QDateTime() ctorChristian Ehrlicher2022-12-191-1/+1
| | | | | Change-Id: I0d36f036a9814e85f4606644e0fd8801e76ffccf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQL/OCI: fix compilationChristian Ehrlicher2022-10-142-2/+3
| | | | | | | | | | | Fix compilation error introduced with 917b4d3802f3c2102021610cbf977403a3d4c21a and add a missing override Pick-to: 6.4 Fixes: QTBUG-107544 Change-Id: I53571a0a113dc0f1e65f8773e66c02c1764739ee Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* SQL/OCI: add missing overide()Christian Ehrlicher2022-10-141-1/+1
| | | | | | | | | QOCIDriver::hasFeature() missed a 'override' which prevents compiling it with '-Werror' Pick-to: 6.2 6.4 Change-Id: I73a30134415947475e8f378fdb51bdd3f7fdd989 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Put code related to timezone functionality under QT_CONFIG(timezone)Tatiana Borisova2022-08-181-0/+2
| | | | | | Pick-to: 6.4 6.3 Change-Id: I0d1573dbb4ae4f9740fc19546950ae4316aa4c0c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-151-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-163-114/+6
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Sql: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-191-2/+2
| | | | | | Task-number: QTBUG-98434 Change-Id: Ia621f9d937649dda41a7b0d13a61e6f1397f6dde Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Sql: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-192-58/+59
| | | | | | Task-number: QTBUG-98434 Change-Id: Ie12ca82fd912617eabe4f602c08914f12878cb32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Sql: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-191-30/+29
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I03477e645a94948cac3e3e2abca52aa4e3e2efff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Adapt SQL drivers to Qt 6 change of QVariant::isNullVolker Hilsheimer2022-01-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, QVariant::isNull returned true if either the variant didn't contain a value, or if the value was of a nullable type where the type's isNull member function returned true. In Qt 6, QVariant::isNull only returns true for variants that don't contain a value; if the value contained is e.g. a null-QString or QDateTime, then QVariant::isNull returns false. This change requires a follow up in the SQL drivers, which must still treat null-values the same as null-variants, lest they write data into the data base. Add a static helper to QSqlResultPrivate that implements isNull-checking of variants that contain a nullable type relevant for Sql, and add a test case to the QSqlQuery test that exercises that code. Pick-to: 6.2 6.3 Fixes: QTBUG-99408 Fixes: QTBUG-98471 Change-Id: I08b74a33aa3235c37d974f182da1f2bdcfd8217e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Revert "Don't allocate an OCIDateTime object unless we're going to use it"Edward Welbourne2021-12-061-22/+7
| | | | | | | | | This reverts commit 064c3d35e6809672323e8d912e9140ddd0ad48cd. Reason for revert: Causes crashes on querying. Better to endure the non-NULL representations of null QDateTime values. Change-Id: I33dd3b95ab35d8e3accb864aec13d21764b1270d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Close leak of QOCIDateTime objectEdward Welbourne2021-12-021-0/+1
| | | | | | | | | | | Noticed while reviewing usage of this type. The code has a whole TempStorage class to take care of keeping allocated memory live until we're done with it, explicitly including date-time objects as a special case, but neglected to use it in one place. Pick-to: 6.2 5.15 Change-Id: Ic94c56d67dda6dc3ee36a025a2e0149f6b2a1837 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Don't allocate an OCIDateTime object unless we're going to use itEdward Welbourne2021-11-301-7/+22
| | | | | | | | | | | | | | | | | | | The QOCIDateTime destructor carefully checks that dateTime is non-null before tidying it away, but the constructor allocated it independently of whether it was used, leaving it in a still-not-constructed state if the date-time it was to represent was invalid. Only allocate if the date-time is valid; and check against null when an OCIDateTime is being converted back to QDateTime. Add warnings if either allocation or construction fails. Incidentally use static_cast<> instead of C-casting (and split a long line) in the other place that allocates an OCIDateTime descriptor. Pick-to: 6.2 5.15 Task-number: QTBUG-98471 Change-Id: Idd5531d9f7101878802cb9a3a016d3fd80903543 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-061-1/+1
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Tidy up in OCI driver codeEdward Welbourne2021-06-221-36/+42
| | | | | | | | | | | | | Use nullptr instead of 0 for null pointers. Compare OCIHandleAlloc() return values to OCI_SUCCESS rather than 0. Initialize instance variables in the class where possible, rather than in the constructor. Conform to coding style o long lines and braces. Assert pointers are null before allocating and overwriting them, so we might have a chance of catching leaks. Change-Id: Ia885ec18f46de5219a51fb6f9f23f474b3046585 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Move tidy-up of private to its own destructorEdward Welbourne2021-06-221-8/+4
| | | | | | | | | | | QOCIResult::~QOCIResult() was doing part of the tidy-up for QOCIResultPrivate, whose own destructor took care of the rest. So move that part to the private, where it makes more sense. Also correct an error message in part of the private's existing tidy-up and eliminate a needless local variable. Change-Id: I09a51c72afd7a30bcee7f6127c59d703650f1c41 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix potential double-free in QSqlCachedResult::cleanup()Edward Welbourne2021-06-221-1/+3
| | | | | | | | | | | If d->sql is non-null, it gets freed; later in the same function, it gets reallocated, unless the query is empty, in which case the now-freed value was still recorded, so that later clean-up might find it and mistakenly think it needs to be freed again. Clear when freeing. Pick-to: 6.2 6.1 Change-Id: I8d37d2ba1fcaa320916eaf30dceaa720bbf62f38 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix leak of transaction context handle in QSql's OCI driverEdward Welbourne2021-06-221-11/+21
| | | | | | | | | | | | | | Transaction handles were allocated but nowhere freed. Thanks to Stefan Latsch for pointing this out and suggesting the fix. Make the handle yet another member of QOCIDriverPrivate so that close() can free it. At the same time, also free the service context handle d->svc when failing do open(); and shuffle the order of frees to be the reverse of the order of allocations. Fixes: QTBUG-94246 Pick-to: 6.2 6.1 5.15 Change-Id: I45818ada6d884b06028056d28635390a300e2def Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CMake: Fix building multi-arch universal macOS QtAlexandru Croitor2021-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same approach we use for iOS, which is to set multiple CMAKE_OSX_ARCHITECTURES values and let the clang front end deal with lipo-ing the final libraries. For now, Qt can be configured to build universal macOS libraries by passing 2 architectures to CMake, either via: -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" or -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" Currently we recommend specifying the intel x86_64 arch as the first one, to get an intel slice configuration that is comparable to a non-universal intel build. Specifying the arm64 slice first could pessimize optimizations and reduce the feature set for the intel slice due to the limitation that we run configure tests only once. The first specified architecture is the one used to do all the configure tests. It 'mostly' defines the common feature set of both architecture slices, with the excepion of some special handling for sse2 and neon instructions. In the future we might want to run at least the Qt architecture config test for all specified architectures, so that we can extract all the supported sub-arches and instruction sets in a reliable way. For now, we use the same sse2 hack as for iOS simulator_and_device builds, otherwise QtGui fails to link due to missing qt_memfill32_sse2 and other symbols. The hack is somewhat augmented to ensure that reconfiguration still succeeds (same issue happened with iOS). Previously the sse2 feature condition was broken due to force setting the feature to be ON. Now the condition also checks for a special QT_FORCE_FEATURE_sse2 variable which we set internally. Note that we shouldn't build for arm64e, because the binaries get killed when running on AS with the following message: kernel: exec_mach_imgact: not running binary built against preview arm64e ABI. Aslo, by default, we disable the arm64 slice for qt sql plugins, mostly because the CI provisioned sql libraries that we depend on only contain x86_64 slices, and trying to build the sql plugins for both slices will fail with linker errors. This behavior can be disabled for all targets marked by qt_internal_force_macos_intel_arch, by setting the QT_FORCE_MACOS_ALL_ARCHES CMake option to ON. To disble it per-target one can set QT_FORCE_MACOS_ALL_ARCHES_${target} to ON. Task-number: QTBUG-85447 Change-Id: Iccb5dfcc1a21a8a8292bd3817df0ea46c3445f75 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-13/+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>
* OCI: Fix the compilation of the pluginAndy Shaw2020-12-131-5/+6
| | | | | | Pick-to: 6.0 Change-Id: I9637bab6cc217d4fd9692f6745b4f14db6ffb259 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-3/+3
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-231-173/+171
| | | | | | | | | 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>