summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Introduce QGlyphRun::stringIndexes()Eskil Abrahamsen Blomfeldt2022-09-295-15/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a way to trace each entry in the glyph index array to a specific index in the original text passed to QTextLayout, as well as a convenience function to access the original string from the QGlyphRun. The index information is stored in the logClusters array internally in Qt, but it contains the inverse information: For each character in the output string, it contains an index into the glyph array. In order to get the string indexes for each glyph, which makes a lot more sense in the context of the QGlyphRun API, we need to do a little search to construct the data. To avoid adding unnecessary allocations, we make the new APIs opt-in. If you do not specify anything, you will only get the glyph indexes and glyph positions as before. However, you can now specify exactly which parts of the layout to extract using an optional flags parameter. This also adds a manual test which can be very handy to visualize QTextLayouts and how they are split into QGlyphRuns. Fixes: QTBUG-103932 Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Add QStyleHints::keyboardAutoRepeatRateF()Tor Arne Vestbø2022-09-294-2/+20
| | | | | | | | | | The keyboardAutoRepeatRate() function returning an int assumes the rate can not be lower than one event per second, but this is not always the case, e.g. on macOS where the slowest setting for key repeat results in a two second delay between events. Change-Id: I806fb57883ce0085c835fb0a43d6b86bd6da375a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Reflect platform settings for double click and key repeat intervalsTor Arne Vestbø2022-09-291-0/+6
| | | | | | | | | | The KeyboardAutoRepeatRate is unfortunately exposed in QStyleHints as an int, so any rate below 1 event per second will not be reflected accurately. Pick-to: 6.2 6.4 Change-Id: I506762545a1838cf007320e73827def006f5f0c2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QIOSTheme: Get the appearance mode from the UIWindow's traitCollectionDoris Verria2022-09-291-1/+1
| | | | | | | | | | | | | | We were getting the appearance (light/dark) through the traitCollection of the UIWindow's rootViewController. It looks like this does not report the correct value when the appearance changes through System Settings. If we get it directly from the UIWindow's traitCollection property, it works as it should. Also, in traitCollectionDidChange: we are checking for changes in the traitCollection of the UIWindow's, not of the viewController's. Change-Id: I437e6922b268fd0069d80557a1034391ed52644b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix building with disabled OpenGL after switching to the syncqt toolMartin Storsjö2022-09-292-0/+3
| | | | | | | | | | | | | | | After switching qtbase to use the syncqt tool (in b89d63515bb352cecfd87e709320a2db5b6a1906), these OpenGL specific headers aren't available at all, when the build is configured to not use OpenGL. In one case, add a missing check for QT_NO_OPENGL, and in another case, include the necessary <QtGui/qtgui-config.h> header to make the potential QT_NO_OPENGL define available, to make a preexisting ifdef actually do what it was meant to do. Change-Id: Ie12deff2eee8e3b59193175551fbb28b7480f1f8 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QTaggedPointer: disable operator= with an empty initializer listGiuseppe D'Angelo2022-09-291-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a QTaggedPointer, users may write taggedPtr = {}; to mean "reset it". This is error-prone: due to overload resolution, this actually ends up calling QTaggedPointer<T>::operator=(T *), which changes the pointer but *not* the tag, and not the implicitly declared QTaggedPointer<T>:operator=(const QTaggedPointer<T> &) which would reset both pointer and tag. Given the idiomatic usage of {} is indeed to perform a full reset (cf. std::exchange(obj, {}), std::take, etc.), work around this by disabling the operator= overload for pointers in case an initializer list is passed. In other words, make `={}` fall back to the implicitly declared overload. Note, this breaks some usages, such as taggedPtr = {rawPtr}; but at least we get a compile error for these, and they don't look common at all. [ChangeLog][QtCore][QTaggedPointer] The operator assignment taking a raw pointer has been reimplemented in order to avoid subtle issues when assigning `{}` to a QTaggedPointer. This will cause code that assigns a braced-init-list to a QTaggedPointer object to stop compiling (for instance, `tagPtr = {ptr}` is now ill-formed). Change-Id: I5e572a9b0f119ddb2df17f1797934933dff2ba7b Task-number: QTBUG-106070 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build with disabled accessibilityAlexey Edelev2022-09-292-3/+5
| | | | | | | | Amends 8539e641f6f48a605547f66c47266d19e537f74e Task-number: QTBUG-106941 Change-Id: Ieffe1ac0050c9f1377e4260376acb2f8cdc0f985 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Support serializing time-zone fields in date-times more flexiblyEdward Welbourne2022-09-292-6/+49
| | | | | | | | | | | | | [ChangeLog][QtCore][QDateTime] The 't' format character in a toString() template can now be repeated to get alternatives to the (unparseable) zone abbreviation. Thus 'tt' now gets the zone offset without colon, [+-]hhmm; 'ttt' gets the same with colon, [+-]hh:mm, and 'tttt' gets the zone name. Previously, each 't' was replaced by another copy of the abbreviation. Task-number: QTBUG-95966 Change-Id: Iccccd11f06fa732ed27c0e5d4e40a3d4b5f79f8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support parsing time-zone specifiers more selectivelyEdward Welbourne2022-09-293-20/+47
| | | | | | | | | | | | | | | | [ChangeLog][QtCore][QDateTime] The 't' format used in fromString() can now be repeated to restrict parsing to particular forms. Thus 'tt' now matches the [+-]hhmm offset format (no colon), 'ttt' the [+-]hh:mm offset format (with colon), and 'tttt' matches an actual zone name. When used singly, 't' still matches anything the parser knows how to interpret as a zone specifier. [ChangeLog][QtCore][QLocale] The 't' format in toDateTime() now has repeated forms, as for QDateTime::fromString(). Task-number: QTBUG-95966 Change-Id: I73753145cb66a56bc25a5c2dd5cb051ba982fa2c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Style sheets: add placeholder text color property for edit widgetsEirik Aavitsland2022-09-295-8/+41
| | | | | | | | | The placeholder text was given its own QPalette color role in Qt 5.12, but there has been no way to specify it from a Qt style sheet. Fixes: QTBUG-93009 Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Qstring: replace index-based loops with range-for / STL algorithmsAhmad Samir2022-09-291-60/+39
| | | | | Change-Id: I1082a8245d219697676c59e77ce9939641e73451 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: specify a class template argumentGiuseppe D'Angelo2022-09-291-1/+1
| | | | | | | | | | | Although the code is legal in C++20 (due to the new CTAD rules for alias templates), clang-cl errors out on it. Just specify the template parameter, which we know anyways. Change-Id: Ifdea31853d4281601cf40ed8adeb14e493a5ce04 Pick-to: 6.4 Fixes: QTBUG-107043 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add missing include to syncqt/main.cppEdward Welbourne2022-09-281-0/+1
| | | | | | | | | I got build-time errors for memcpy() not being declared, that helpfully told me to #include <cstring> to get it. Change-Id: I6ae9e881e5accf496e9c3694ca43701972d64722 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QODBC: correctly fill cache when index() is calledChristian Ehrlicher2022-09-281-1/+1
| | | | | | | | | | QODBCResult::isNull() incorrectly checked for the validity of the internal row cache which lead to wrong results when the requested column was not yet cached. Pick-to: 6.4 6.2 5.15 Change-Id: Ic7dcc2117e6f05b63c83f21c6a84ba7e0bda2b2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace qExchange calls with std::exchangeFabian Kosmale2022-09-2825-36/+36
| | | | | | | | | | | | | | | | | | | | | qExchange is one of the few remaining functionalities that have not been moved out of qglobal. Given that std::exchange exists in the standard, we can simply move to it everywhere... ...if it weren't for the fact that std::exchange is only constexpr in C++20, and only has its noexceptness specified in (most likely) C++23. Still, we want to move to the existing std functionality where possible, to allow the removal of qglobal includes in lieu of something more fine-grained in the future. So leave any constexpr calls[1] alone for now (and observe that none of our current usages cares about the conditional noexceptness), but replace everything else. [1] QScopedValueRollback' ctor and QExplicitlySharedDataPointerV2::take Task-number: QTBUG-99313 Change-Id: I599cb9846cf319c7ffd3457130938347a75aad25 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove outdated configure note about setting OpenSSL library namesJoerg Bornemann2022-09-281-7/+0
| | | | | | | | | | | | | The mentioned variable in the configure note is qmake only and not used anymore. Also, it seems pointless to show such a note on successful configuration. FindOpenSSL.cmake of CMake already takes care of library names of different OpenSSL installations. Task-number: QTBUG-93948 Change-Id: I5994df231ed4fd664f6ab17b983e88c744feb21a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid detaching in QBasicTimerhjk2022-09-281-1/+1
| | | | | | | | Amends da12a40b8b2c2d212412a9db6d7971dc43bce6e6 Change-Id: I2a9e46844a88f7ee239c7306abca3d2c8f7b53d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* qHash: Add seed argument for classes inheriting QStringMårten Nordheim2022-09-282-2/+8
| | | | | | | | | | | Pre-requisite for a fix for qHash. The classes inherits from QString and after the upcoming fix their single-arg qHash overload is no longer preferred since we want to use a seed. This has been the case since Qt 5. Pick-to: 6.2 6.4 Change-Id: I6e8601ab8d591742e2399d10521dec8cfa46f71a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rcc: Drop extra QString()Mate Barany2022-09-281-1/+1
| | | | | | | | | Addressing a comment from the review of QTBUG-98434. Drop the exta QString() call, it is unnecessary. Task-number: QTBUG-103100 Change-Id: I5a13deb5d3c52166919302bc4bb45bd0b6b5c770 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* windeployqt: Use default constructor of QString and then appendMate Barany2022-09-281-1/+2
| | | | | | | | | | | Addressing a comment from the review of QTBUG-98434. Instead of assigning an initial value to the QString, create an empty QString first and then append to the QString. Task-number: QTBUG-103100 Change-Id: I8f2569ac2a2203e6459bbc7df789c9ef34f598d0 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* windeployqt: Fix mismatches between string types and literalsMate Barany2022-09-281-11/+11
| | | | | | | | | | Addressing some comments from the review of QTBUG-98434. Fix the mismatches between string types and string literals. Task-number: QTBUG-103100 Change-Id: Id619d7b99b9133c983f31ec5a5c2d9cc9d927416 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Revert "Keep original text for text/plain mime data"Kai Koehne2022-09-281-1/+1
| | | | | | | | | | | | | | | | This also affects things like line breaks, effectively preventing the paste of copied text to non-Qt applications. This reverts commit 17eb0f2d8a84eb54e6e4fbfa981ca3bae8c7e919. [ChangeLog][QtGui][Drag&Drop] The fix to preserve special characters like &nbsp; the text/plain part of the clipboard when copied from a QTextEdit or QLineEdit had to be reverted (QTBUG-107004). Pick-to: 6.4 Fixes: QTBUG-107004 Change-Id: Ia226f38f31a368c381910e1d43b6422395a5744f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Tidy up day-of-week checks in QDateTimeParserEdward Welbourne2022-09-281-6/+2
| | | | | | | | | Simplified a return. Corrected a comment. Change-Id: I6b7f99b741ac5c1c8ddfad608843db3e89c20346 Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move kernel/qwineventnotifier.h to a common header listAlexey Edelev2022-09-281-1/+2
| | | | | | | | | | | Consider the original behavior. Ammends b89d63515bb352cecfd87e709320a2db5b6a1906 Task-number: QTBUG-103196 Change-Id: Ib3ad4bb040ece6680fd659c36418855fe823ea18 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* windeployqt: Prepend Qt's bin dir to PATH instead of appendingJoerg Bornemann2022-09-281-2/+2
| | | | | | | | | The fix for QTBUG-39177 was to append Qt's bin dir to PATH. But if we have a Qt bin dir in PATH that is different from the one windeployqt belongs to, then we end up calling qtpaths from the former Qt. Change-Id: I373a3270d1ec950479049b4cdaf0ff13dd8813c7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* windeployqt: Fix PATH manipulation code for non-Windows platformsJoerg Bornemann2022-09-281-1/+1
| | | | | | | | | Use QDir::listSeparator() for additional entries in PATH instead of the hard-coded semicolon. This is a preparation for running windeployqt on non-Windows platforms. Change-Id: I84f1da130508da7a0f3190d811acf35477564bf7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* wasm: allow useCredentials access control to be setLorn Potter2022-09-283-0/+11
| | | | | | | | | | Introduce UseCredentialsAttribute that indicates whether the underlying fetch/XMLHttpRequest should use credentials https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials Fixes: QTBUG-90893 Change-Id: I2c43e286db52df387c0a22737d027b9a2a8dd2d3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Q(Basic)Atomic: remove QT_BASIC_ATOMIC_HAS_CONSTRUCTORSFabian Kosmale2022-09-282-36/+2
| | | | | | | | | The define has always been set, so we can simplify all the code that checked for it. Change-Id: I9133ba95dbd6e1da465ade1d1306310bd3fb9a45 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Get rid of bootstrapped atomicsFabian Kosmale2022-09-284-84/+2
| | | | | | | | | C++11 atomics should be available everywhere, even it bootstrapped builds. This will allow further simplificattions. Task-number: QTBUG-103847 Change-Id: Ic8aaec5667ef7616a6aa1f0dfc2f64d327308501 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Logging: remove const from the lambda calling dladdrThiago Macieira2022-09-271-1/+1
| | | | | | | | | In some OSes, the function takes a plain void*. Pick-to: 6.4 Fixes: QTBUG-106980 Change-Id: I810d70e579eb4e2c8e45fffd1718bdaf94d8ac0e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add missing GL includes in WASM compositorMikolaj Boc2022-09-271-0/+3
| | | | | | | IDEs (vscode) have problems with missing includes. Change-Id: I2618aaaf79c81a2c3566682e13caf31133ece631 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QPluginLoader: Fix the expected machine word for Windows on ARMMartin Storsjö2022-09-271-1/+1
| | | | | | | | | | | | This fixes loading plugins on Windows on ARM since 892d5607d0b1c9e010ea10a1123e68741c46c21e. IMAGE_FILE_MACHINE_ARM was used for older Windows targets on ARM, in particular Windows CE. Pick-to: 6.4 6.3 Change-Id: I61ef7a6b5920af9192c55209f2641a6c469ad1d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QMetaType: Support custom unary converters with optional<To> return typeArno Rehn2022-09-273-2/+21
| | | | | | | | | | | | | | | To indicate success of a conversion, the public API has previously only supported registering member functions of the form To (From::*)(bool *). When adding custom converters for types that cannot be modified, this is usually not a possibility. As an alternative, this patch adds support for std::optional in the UnaryFunction overload of QMetaType::registerConverter. If the returned optional has no value, the conversion is considered failed. Task-number: QTBUG-92902 Change-Id: Ibac52d2cb9b5a2457081b4bebb0def1f03e3c55d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Apply fixes for SPDX compliance and easier parsingLucie Gérard2022-09-275-1/+5
| | | | | | Task-number: QTBUG-106233 Change-Id: Ic636bcfc7d5efcf23c67482beebe2fff1f184073 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWidgets: Use the default constructor of QString and appendMate Barany2022-09-271-1/+3
| | | | | | | | | | | | | Addressing a comment from the review of QTBUG-98434: instead of the QL1S constructor use the default constructor and append "Path: "_L1. With the QL1S constructor capacity == size == rhs.capacity and the very next append is guaranteed to reallocate. In the other case the capacity will grow according to the growth strategy. Task-number: QTBUG-103100 Change-Id: Ifcc1c22a59739c6384b363471dbb27d6a978e306 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* StyleSheetStyle: Fix color of placeholder texts in text editsEirik Aavitsland2022-09-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Prior to 5.12, the placeholder text color was hardcoded to be the same as the text color, but with an alpha of 128, i.e. semi-transparent. In 5.12, it instead got its own ColorRole in QPalette. So behavior changed (In some cases in 5.12 and later, consistently from Qt 6): placeholder texts no longer got a "light" (semi-transparent) version of the css-styled color, but just the default gray/semi-transparent black. That problem was reported as QTBUG-89815. However, the fix for that bug did not apply the semi-transparency, but only used the same color as the text. That caused a confusing visual expression, as actual and placeholder text would look the same. This commit fixes that. The problem was made worse since there is no way to specify the placeholder text color from css, i.e. to style it independently. A follow up commit will aim to add that. Fixes: QTBUG-92199 Task-number: QTBUG-93009 Pick-to: 6.4 6.2 5.15 Change-Id: I9e6698d34eba91cbf65c4da07aa5ac6d9f96a9ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCryptographicHash: only use OpenSSL 3.0 when OpenSSL will be linkedJan Grulich2022-09-272-9/+2
| | | | | | | | | OpenSSL by default doesn't provide static libraries and we would fail to build it in such case. Fixes: QTBUG-106978 Change-Id: I456fe9bec2bbef5003de8f6cb7d9d8bb226821f9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: add Window.localStorage settings backendMorten Sørvig2022-09-273-71/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Window.localStorage provides a synchronous API for storing saving data across browsing sessions, and is a good match for QSettings. Storage is limited to 5MB per origin, which should be sufficient for typical application settings. Window.localStorage is shared by all pages/apps on the origin (e.g. "https://qt.io" is one origin), which makes key collisions possible. To avoid this the key structure is "qt-v0-org-app-userkey", where both the organization and application name is used to differentiate between keys, and "v0" is a version tag to allow changing the key structure in the future. We reserve the "qt" prefix for keys written by QSettings. Add the new implementation as QWasmLocalStorageSettingsPrivate, rename the existing settings backend to QWasmIDBSettingsPrivate. Make QSettingsPrivate::create() support backend selection using the QSettings::Format enum. It now also supports selecting the Ini backend, which can be used to store larger amounts of settings, for example to a file on IDBFS. (alternatively IDBSettings + asyncify could also be used for this case) Change-Id: If70aa488635018218bc2a19803c4a719732c0004 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace the syncqt.pl script with syncqt toolAlexey Edelev2022-09-2712-7/+1628
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syncqt.pl adds an extra dependency on perl when building Qt. Modern C++ provides the convenient cross-platform way to access a filesystem and to use regular expressions, so we may replace the perl script with C++ application. The syncqt executable is built at configure time and installed as QtCore tool. It's running at configure time to deliver the required header files for IDE to build a consistent code model and at the build time to keep tracking changes in header files and generate the missing aliases without reconfiguring. 'syncqt' only parses header files from a CMake build tree, so the resulting Qt installation only contains interfacing headers that belong to the platform that Qt is built for. 'sync.profile' files are not used as the 'source of truth' for sync qt procedure anymore, all the necessary information is taken from either CMake files at configure time or from the module header files while parsing them. syncqt.pl is still in place since it's required as fallback solution for a smooth transition to the new syncqt implementation for all qt repositories. This patchset only enables the C++ based syncqt for 'qtbase' repository. From the performance perspective C++ version works faster then perl script, also the configure time is reduced significally on subsequent reconfigurations - up x2 times faster when re-configuring repository, but it also takes time to compile the tool itself the first time. Numbers for qtbase: syncqt.pl syncqt.cpp initial: 0m16,035s 0m20,413s reconfig: 0m6,819s 0m3,725s The syncing procedure can be run separately for each module using <ModuleName>_sync_headers targets. The 'sync_headers' target can be used to sync all the modules at once. Task-number: QTBUG-87480 Task-number: QTBUG-103196 Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Fix Display.getRealMetrics deprecationSamuel Mira2022-09-273-36/+102
| | | | | | | | | | | | In latest Android versions some functions related with Display metrics were deprecated. This patch changes some instances of that code to use the Resources.getDisplayMetrics or WindowManager.getMaximumWindowMetrics depending on the situation. Fixes: QTBUG-99543 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Id9846efa877f704ef7f58c1b0820ad1527b53f09 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* qassert.h: Include qtcoreexports.hFabian Kosmale2022-09-271-0/+1
| | | | | | | Else we cannot use Q_CORE_EXPORT Change-Id: I2ccb6a6a9abeaad1de8d541224e055f524d6d07b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtdeprecationmarkers.h: include qcompilerdetection.hFabian Kosmale2022-09-271-0/+1
| | | | | | | Without it, we do not have Q_DECL_DEPRECATED Change-Id: I6b16176446027e0f7da923f16971e903aacc80d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: Support standard strings and string views directlyVille Voutilainen2022-09-272-1/+100
| | | | | | | | | | [ChangeLog][QtCore][QDebug] QDebug now supports printing std::strings and std::string_views (and their wide, u16, and u32 variants) directly. Task-number: QTBUG-96878 Change-Id: I7baf4fe688bfff50580b1cee9417af13949374cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets: Use remove instead of replaceMate Barany2022-09-271-1/+1
| | | | | | | | | | This commit addresses on of the comments from the review of QTBUG-98434. Use remove instead of replace to delete from the string. Task-number: QTBUG-103100 Change-Id: Ifa00a9bae24767eb42d6fa5da0ffdbaa230d5d96 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix condition that runs the scanning of the Qml importsAlexey Edelev2022-09-271-1/+1
| | | | | | | | | | | Scanning of the Qml imports should be run if either Qml root paths or .qrc files are specified for androiddeployqt. Task-number: QTBUG-106939 Pick-to: 6.2 6.4 Change-Id: I3229ec6d3f2ac17ef751b4a6ed74e8e98db7465e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* moc: Add basic support for nested inline namespacesFabian Kosmale2022-09-261-0/+6
| | | | | | | | | | | | | | | This improves moc's support for nested inline namespaces, so that code containing them will not break compilation. For simplicity, we allow nested inline namespaces even in C++17 mode (the actual C++ compiler will reject the code anyway, and probably with a better error message than moc could output). moc still has no real awareness how inline namespaces work, but that is a preexisting issue. Pick-to: 6.4 6.2 Fixes: QTBUG-106920 Change-Id: I7b415a99133575f101bc81d01d4670a5f752917f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Include QVariantPair in documentation of QMetaType::TypeEdward Welbourne2022-09-262-1/+2
| | | | | | | | | | | | | | | When it was added, along with the type it describes, it wasn't added to the QDoc-only fake version of Type's declaration, or to the \enum's list of \value entries. There being no clear reason for those omissions, I'm presuming to guess they were just an oversight. This amends commit c7ce1bc05c1ec2f63dd2531f23a3e9f6fe866556 which was included in Qt 6.0.0. Pick-to: 6.2 6.4 Change-Id: I1bf9fe0f0a31219a888666550a197e479d8eadc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clear two pointless entries from the QDoc-only QMetaType::TypeEdward Welbourne2022-09-262-4/+2
| | | | | | | | | | | The real Type has several "administrative" members beside LastCoreType and LastGuiType, but only these two appear in the qdoc-only fake version of Type, only to be \omitvalue'd out in the docs. Save the perpetual "need" to keep updating them with each new addition (they weren't even in sync with the real versions anyway) by removing them. Change-Id: If7c5da87655a2da5c7f29f394c9dd9921ff0c1a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCryptographicHash: implement OpenSSL 3.0 supportJan Grulich2022-09-264-77/+174
| | | | | | | | | | | | | | | Use OpenSSL 3.0 as a provider of all hashing algorithms, except the BLAKE2b and BLAKE2s. BLAKE2b and BLAKE2s algorithms support a variable length digest, but OpenSSL's implementation outputs only a digest of a fixed length (the maximum length supported). This is 512-bits for the BLAKE2b and 256-bits for the BLAKE2s and for that reason we still use the original implementation. [ChangeLog][QtCore][QCryptographicHash] Uses the OpenSSL 3.0 implementation now, where available. Change-Id: Ia4e4139b92ea9b40a18aa480aa5c06562178f916 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark QTimeZone's copy-constructor noexceptEdward Welbourne2022-09-262-2/+2
| | | | | | | | | This appears to have been overlooked. It's just the copy-construction of a QSharedDataPointer, which is declared noexcept, so transparently safe. Change-Id: I85e1f750be26dfa94d52dfc0b14efe9c1857d645 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>