summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QWizard: rename BannerSizePolicy to BannerStretchPolicyHEADdevVolker Hilsheimer7 hours2-22/+22
| | | | | | | | | | | | That's a more accurate name, and is more consistent with the actual enum values. Amends a22cbf33a00250f6272bfabfddce993d101c6b90 to address header review comment. Pick-to: 6.11 Change-Id: Ief61c924056d79ebf2444c3d690ef66691f92fab Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QRegularExpression: add missing const to PcreJitStackFree::op()Marc Mutz7 hours1-1/+1
| | | | | | | | | | | | | | | | | | Function object's function-call operators ought to be marked as const, so do it. Found while working on reviewing the code with an eye to fix QTBUG-142551. Not picking all the way since this clearly doesn't fix a bug (the object is stowed away inside of a std::unique_ptr, which obviously doesn't care about the missing const, or this wouldn't have compiled before). Pick-to: 6.11 6.10 6.8 Change-Id: I62649504d73192519a08684701d08483dfc09f6c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Document TCP Keep Alive parameters in QNetworkAccessManagerMate Barany11 hours1-0/+13
| | | | | | | Pick-to: 6.11 Task-number: QTBUG-136625 Change-Id: Idd3a1bb24e6989d56ce5de7da8eb95f53858aefb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macdeployqt: Add source library resolved rpaths as rpath candidatesAlexandru Croitor16 hours1-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Qt against homebrew provided 3rd party libs, so qtbase/configure -pkg-config, QtNetwork ends up depending on libbrotlidec.dylib. Thus, we get the following dependency chain: (1) QtNetwork.framework -> (2) libbrotlidec.dylib -> (3) libbrotlicommon.1.dylib In this case when an app links to QtNetwork and is deployed with macdeployqt, it would get the libbrotlidec.dylib copied into the app bundle Frameworks dir, but not libbrotlicommon.1.dylib. That happens because macdeployqt only considers the Qt prefix and the app bundle paths as rpaths when resolving @rpath dependencies of copied libbrotlidec.dylib library, thus skipping the libbrotlicommon.1.dylib library. Fix this by adding the rpaths of the library, resolved relative to its original source location to the candidate rpaths. Make sure to add these rpaths only once to avoid unnecessary duplicates. Pick-to: 6.10 6.11 Fixes: QTBUG-100686 Change-Id: I0aea9e185db3475b3fd280d5103e9b169a9c1afa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Use SVGs instead of PNGs with support for basic SVG renderersDavid Boddie16 hours4-38/+83
| | | | | | | This should help SVG rendering in less capable browsers. Change-Id: I0760e6b87be03b16cb24369fbda99235b35081a6 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Doc: Update STL-style iterator diagram to use a styled SVG fileDavid Boddie16 hours2-1/+91
| | | | | Change-Id: If1231a74ce5c7ea9099d8a817024d7f0c49d23bf Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* QColor: rewrite toHsv() to avoid float comparisonsMarc Mutz17 hours1-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input data is integral. So keep using integral types for as long as possible and only convert to float when performing a calculation that requires fractional results. This avoids the need for qFuzzyCompare(), which has a pre-condition that neither of its argument must be zero, which an RGB value cannot guarantee. Here is why this works: The old code immediately scaled the r, g, b values from 0...USHRT_MAX to 0..1 float values. So, r, g, b, min, max, and delta variables were rescaled. The new code doesn't scale said variables. So fractions (like `delta / max` or `(g - b) / delta` remain mathematically the same (and numerically, too, if the division is done in FP), and so both `hue` as well as `saturation` don't change value. There's another copy of this code that needs the same treatment (for HSL), but they are sufficiently different from each other to take that in a follow-up patch. Also: - Move the assertion into the third leg of the if-else chain. Now that we use precise integer arithmetic, it cannot happen that none of r, g, b are equal to max({r,g,b}), so if it wasn't equal to r or g, it must be equal to b. This allows us to leave `hue` partially-formed, so the compiler can warn about it being used uninitialized. - clean up overparenthesization, whitespace and make the individual legs of the if-else chain look more similar by using an explicit 0 literal in the first Drive-by changes: - use std::minmax(initializer_list) instead of our own Q_MIN_3/Q_MAX_3 macros (the macros can't be removed, yet, as they're still used in toHsl()). - reduce the scope of `delta`, after replacing the check for 0 with an integral one As a consequence of using less FP arithmetic, tst_bench_qcolor's toHsv() runtime goes down from 230ms (best-of-10) to 160 (ditto), a whopping 40% reduction. Amends the start of the public history. Pick-to: 6.11 6.10 6.8 6.5 Task-number: QTBUG-142020 Change-Id: I370e8a214e48479b0c6fd0e48eb8f43c66920103 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Windows11Style: add standardIcon(SP_TabCloseButton)Christian Ehrlicher33 hours2-0/+10
| | | | | | | | Use the correct close icon for window11 style. Pick-to: 6.11 Change-Id: Id026589a9adfc84bcea0cce196d486df580ca21a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QTabWidget: remove unused private member 'paintWithOffsets'Christian Ehrlicher33 hours2-6/+5
| | | | | | | | The member 'paintWithOffsets' is not used at all so remove it. Pick-to: 6.11 6.10 6.8 Change-Id: Ideeae1ea0ce15a76112f6c061b3902a0f6d129a4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QTabWidget: properly clip scroll left/right button backgroundChristian Ehrlicher33 hours1-13/+45
| | | | | | | | The tabbar items were drawn also under the left/right scroll buttons. Pick-to: 6.11 Change-Id: I32008ea54b597c5a23d7f0fd218055fa2ac54ae7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* testlib: Guard against loggers being torn down when loggingTor Arne Vestbø36 hours1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During application shutdown our global static list of loggers may be torn down, and then some other part of Qt issues logging during its own destruction. For example, QThreadStorage will emit: QThreadStorage: entry 1 destroyed before end of thread 0x106432bd0 which would crash: frame #7: 0x000000010a8d97a8 QtCore`qt_assert_x(where="Type *QGlobalStatic<QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>>::operator->() [Holder = QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>]", what="The global static was used after being destroyed", file="/Users/torarne/dev/qt/qtbase/src/corelib/global/qglobalstatic.h", line=88) at qassert.cpp:126:14 frame #8: 0x0000000101016e5c QtTest`QGlobalStatic<QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>>::operator->(this=0x00000001010808c8) at qglobalstatic.h:87:9 frame #9: 0x0000000101018f78 QtTest`QTest::messageHandler(type=QtWarningMsg, context=0x000000016fdfb848, message=0x000000016fdfb790) at qtestlog.cpp:308:30 frame #10: 0x000000010a131018 QtCore`qt_message_print(msgType=QtWarningMsg, context=0x000000016fdfb848, message=0x000000016fdfb790) at qlogging.cpp:2133:9 frame #11: 0x000000010a12bc50 QtCore`qt_message(msgType=QtWarningMsg, context=0x000000016fdfb848, msg="QThreadStorage: entry %d destroyed before end of thread %p", ap="\U00000001") at qlogging.cpp:411:5 frame #12: 0x000000010a8d9904 QtCore`QMessageLogger::warning(this=0x000000016fdfba30, msg="QThreadStorage: entry %d destroyed before end of thread %p") const at qlogging.cpp:651:5 frame #13: 0x000000010a62b8b8 QtCore`QThreadStoragePrivate::finish(tls=0x00000008c6c102e8) at qthreadstorage.cpp:169:17 frame #14: 0x000000010a617aec QtCore`QThreadPrivate::finish()::$_0::operator()(this=0x000000016fdfbb20) const at qthread_unix.cpp:468:9 frame #15: 0x000000010a6159a4 QtCore`void (anonymous namespace)::terminate_on_exception<QThreadPrivate::finish()::$_0>(t=0x000000016fdfbb20) at qthread_unix.cpp:380:5 frame #16: 0x000000010a615960 QtCore`QThreadPrivate::finish(this=0x00000008c707c000) at qthread_unix.cpp:450:5 frame #17: 0x000000010a617190 QtCore`destroy_current_thread_data(data=0x00000008c6c10280) at qthread_unix.cpp:172:19 frame #18: 0x000000010a617330 QtCore`(anonymous namespace)::QThreadDataDestroyer::EarlyMainThread::~EarlyMainThread(this=0x000000010aa9e640) at qthread_unix.cpp:232:17 frame #19: 0x000000010a6172b4 QtCore`(anonymous namespace)::QThreadDataDestroyer::EarlyMainThread::~EarlyMainThread(this=0x000000010aa9e640) at qthread_unix.cpp:229:9 frame #20: 0x0000000181ac542c libsystem_c.dylib`__cxa_finalize_ranges + 480 frame #21: 0x0000000181ac51ec libsystem_c.dylib`exit + 44 Pick-to: 6.11 6.10 6.8 Change-Id: Ie85788e49a34aa75fe44b52fb488bd0e763b78f9 Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
* CMake: Un-TP QT_TARGETS_FOLDERJoerg Bornemann40 hours1-1/+0
| | | | | | | | [ChangeLog][CMake] QT_TARGETS_FOLDER has been taken out of technical preview. Change-Id: I48252087082213e582a3cefcde284e5e87e679ff Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Un-TP QT_RESOURCE_PREFIXJoerg Bornemann40 hours1-1/+0
| | | | | | | | [ChangeLog][CMake] QT_RESOURCE_PREFIX has been taken out of technical preview. Change-Id: I78333f81bb7030ba3dc280f0d65fb595e01c8dbe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Un-TP deployment variablesJoerg Bornemann40 hours1-2/+0
| | | | | | | | [ChangeLog][CMake] The variables QT_DEPLOY_SUPPORT and QT_ENABLE_VERBOSE_DEPLOYMENT have been taken out of technical preview. Change-Id: Ie05d671933271126205c1710d76217de5d2d4d97 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Un-TP qt_finalize_projectJoerg Bornemann40 hours1-1/+0
| | | | | | | | | | The command has matured enough by now. [ChangeLog][CMake] qt_finalize_project has been taken out of technical preview. Change-Id: If465cb229709b5e5efbaf71e41c655d2860bdc9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Un-TP qt_extract_metatypesJoerg Bornemann40 hours1-1/+0
| | | | | | | | | | The command was introduced in 6.0 and has matured enough. [ChangeLog][CMake] qt_extract_metatypes has been taken out of technical preview. Change-Id: Ic5825ade24e6e49b01d6d09a871968b7bf4bd0c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Un-TP qt_deploy_translationsJoerg Bornemann40 hours1-1/+0
| | | | | | | | | | The command was introduced in 6.5 and has matured enough. [ChangeLog][CMake] qt_deploy_translations has been taken out of technical preview. Change-Id: I3823753489b80508a8a805d2e34c3df2e923975c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMetaSequence: Delete documentation of deleted methodsUlf Hermann2 days2-40/+0
| | | | | | | | Amends commit 4f9246bbaba7d491a0cbbc678a010eac52b69fb2. Change-Id: If07e5ad121990e9b7b89cf02aa8e9d65f0194d49 Pick-to: 6.11 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Core: Delete QMetaSequence::Iterable::set()Ulf Hermann2 days3-33/+3
| | | | | | | | | | | It was introduced in 6.11 only as porting aid. We don't need to keep the implementation around. Amends commit 9adaf8505a9eb9d7acb7fee6aeac5341aa24a074. Pick-to: 6.11 Change-Id: I36e7ae5a92b534eb8961f18986c5e040444c7f60 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Core: Add replacement for QMetaSequence::Iterable::set()Ulf Hermann2 days3-3/+17
| | | | | | | | | | | | setAt() is a better name. Amends commit 9adaf8505a9eb9d7acb7fee6aeac5341aa24a074. This was found in API review. Pick-to: 6.11 Change-Id: I4560273961a39e8d60be3c7e7a51cf81e2a8c85e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update bundled libjpeg-turbo to version 3.1.3Eirik Aavitsland2 days5-12/+43
| | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.1.3 Pick-to: 6.11 6.10 6.8 6.5 5.15 Change-Id: Ic402772f54e34082694693e0fc6b61bd0c556825 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QNetworkAccessCache: delete unused signal and emission functionMårten Nordheim2 days2-16/+0
| | | | | | | | | | | I'm not sure when it was last used, or what the purpose was, but it's not in use today, so let's take the opportunity to delete it. Somewhat amends commit 587d64507a0e419c089a83d0cf30026bf3b6bd20. Pick-to: 6.11 6.10 Change-Id: I9facb8cc3250eeaf6d9196f9f5594e1554f5cfa6 Reviewed-by: Mate Barany <mate.barany@qt.io>
* QIORing/win: resolve functions at runtimeMårten Nordheim2 days3-22/+96
| | | | | | | | | | To allow binaries to be used on windows 10 even if compiled with support for QIORing. Task-number: QTBUG-136763 Pick-to: 6.11 Change-Id: I1cc15c794e90dd5e8fe82391075f7ee8c532c68a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QRandomAccessAsyncFile: fallback to threadpool on errorMårten Nordheim3 days8-164/+360
| | | | | | | | | | | | | | | | If the native backend (where one is supported) reports a failure in its init() function, fall back to create a backend of the threadpool variant. This required changing the hierarchy a bit so they can co-exist - without turning this into a fully plugin-ized class - as well as making the thread and future features mandatory for the async-io feature, so there is an actual fallback guaranteed to be available. Task-number: QTBUG-136763 Pick-to: 6.11 Change-Id: Ib87c42bb67eec446278be2e43ca76f594155ab84 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* MSVC: re-enable Q_CONSTINIT for msvc >= 1940Mårten Nordheim3 days1-1/+1
| | | | | | | | | | | According to the linked bug report it was fixed for VS 17.10 which lists 19.40 as the bumped version for its toolset. https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.10#17100--visual-studio-2022-version-17100 Pick-to: 6.11 Change-Id: I540b4a9b9a00ec573052f4cd90ac5be0a9549532 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Properly compute screen safe areas for non-primary screensTor Arne Vestbø3 days1-14/+11
| | | | | | | | | | | The logic assumed the relevant screen was the main/primary screen, which caused us to misreport the safe areas for full screen windows that covered the notch when that display wasn't the main screen. Fixes: QTBUG-142465 Pick-to: 6.11 6.10 6.8 Change-Id: I5c5f25b87ecd90858234e7ae6de7c4127c4a9551 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QEasingCurve: fix qFuzzyCompare use in TCBPoint's op==Marc Mutz3 days1-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | qFuzzyCompare() requires that neither argument is numerically zero. This cannot be guaranteed for the parameters of a "TCB" spline; indeed, Wikipedia says t = b = c = 0 is "the default": https://en.wikipedia.org/wiki/Kochanek%E2%80%93Bartels_spline#Parameters_and_Effects Fix by using the new QtPrivate::fuzzyCompare() function, which does things in the correct way. As a drive-by, put the operators at the beginning of continued lines, as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2, make the operator a hidden friend instead of a member function, and explicitly use qFuzzyCompare() instead of operator== for the QPointF member. The latter drive-by change will need to be dropped from the 6.5 pick-to, because the overload didn't exist in 6.5, yet (added by fa0d77e290f5ccb5afa7d02716f8726aa6b810e6 for 6.8). Amends b9f0bde16e85161666d5090952955bebacc40f89. Pick-to: 6.11 6.10 6.8 6.5 Task-number: QTBUG-142020 Change-Id: I76d1adefd39154d7a39454d676dbfd5dfcaf9c1d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QToolTip: use qobject_cast<>/metaObject instead string compareChristian Ehrlicher3 days3-9/+14
| | | | | | | | | | | Use qobject_cast<> or the comparision of the QTipLabel staticMetaObject pointer to determine if the object is a QTipLabel instead relying on a string compare. This will give us a compile time error when the name of this internal class changes or goes away. Pick-to: 6.11 6.10 6.8 Change-Id: Ie54342bd87fcb6688f082268464bfda5134de04c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTlsBackendOpenSSL: do not use broken symlinks as cert pathsErin of Yukis3 days1-2/+7
| | | | | | | | | | | | | | | | | | | | The QTls OpenSSL backend on Unix should ignore any broken symlinks encountered rather than attempting to add the empty certificate path generated after path canonicalization to the list of trusted system certificates. Current Qt code rejects such empty paths due to using `QSslCertificate::fromFile`, but Qt 6.9- instead used `QSslCertificate::fromPath` which (before Qt 6.9.2) used to interpret an empty path to mean “add everything below the current working directory as potential certificate”! On all newer versions this only avoids unnecessarily adding an empty path to the list of certificates. Change-Id: I94136b33670be2fa42531fc3c74db432bad67f4a Pick-to: 6.11 6.10 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Extend QT_ANDROID_DEPLOYMENT_TYPE documentationJoerg Bornemann5 days1-0/+4
| | | | | | | | Explain where to set the variable. Task-number: QTBUG-121706 Change-Id: Iebe2fe2f36b7ec3706549869c85f485a67d28156 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QWindows11Style: Use textOnAccentPrimary WinUI3 color for checked ButtonWladimir Leuschner5 days2-12/+8
| | | | | | | | | The text color for accent buttons is textOnAccentPrimary. Pick-to: 6.11 6.10 Change-Id: Id9088439374186d45a8f07e0db8ab688d7266602 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QHttp2Stream: add Configuration with downloadBuffer optionDennis Oberst6 days2-14/+79
| | | | | | | | | | | | | | | | | | | Especially useful for clients who don't use the PUSH_PROMISE functionality and don't require buffering the data. We add the QHttp2Stream::Configuration struct to allow customizing stream behavior. Every stream comes with a configuration and the default constructed objects represents that. The configuration is per-stream and does not change during the lifetime. Add a testcase with further extensibility in mind for further stream configurations. Task-number: QTBUG-142473 Pick-to: 6.11 6.10 Change-Id: I1e862f4996baa61f024f40516f74fc052a9b57c4 Reviewed-by: Alexey Edelev <semlanik@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHttp2Stream: append message data before dataReceived()Dennis Oberst6 days2-2/+10
| | | | | | | | | | | | | | | ... so that there is a way to access downloadBuffer() / takeDownloadBuffer() when the signal is emitting and not afterwards. Add the 'last()' functionality (c.f. QList::last) so that we can get a cheap reference to the just inserted buffer entry. Task-number: QTBUG-142473 Pick-to: 6.11 6.10 6.8 Change-Id: I263322ec8a83cd29294b60c139a1ec3dab698ecb Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Alexey Edelev <semlanik@gmail.com>
* Doc: Qt Core: Document QUntypedPropertyBindingTopi Reinio6 days1-6/+14
| | | | | | | | | | | | | | | | | QUntypedPropertyBinding is declared in a public header file and referred to in the documentation of QUntypedBindable. It has multiple documented members but the \class topic was missing. Fixes QDoc warnings such as (qdoc) warning: No output generated for function 'QUntypedPropertyBinding::QUntypedPropertyBinding()' because 'QUntypedPropertyBinding' is undocumented Pick-to: 6.11 Task-number: QTBUG-141665 Change-Id: Id419bc448d15fb66ac74d396ea81320aba12696b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Qt Core: Mark private APIs internalTopi Reinio6 days7-0/+16
| | | | | | | | | | Resolves multiple QDoc warnings of type "No output generated for X::Y because X is undocumented." Pick-to: 6.11 Task-number: QTBUG-141665 Change-Id: I9b2d7b1ecfb694316e32801839f89d543ea2f861 Reviewed-by: Topi Reinio <topi.reinio@qt.io>
* QFontEngine: Replace divisions by bitshiftsRobert Löhning6 days1-3/+3
| | | | | | | | | | | ...so static code checkers will not complain about ignoring remainders or fractional parts of the division anymore. Change-Id: If57e1d3a9229424ac382c5f1f6aee8ddba481714 Coverity-Id: 898602 Coverity-Id: 898603 Pick-to: 6.11 6.10 6.8 6.5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Qt Core: Fix documentation linking issuesTopi Reinio6 days4-8/+8
| | | | | | | | | | | | | | | | | | | | Fixes the following QDoc warnings: * (qdoc) warning: Can't link to 'qt_add_android_permission()' * (qdoc) warning: Can't link to 'raiseError(const QString &message)' -> raiseError() now takes QAnyStringView * (qdoc) warning: Can't link to 'I18N Example' * (qdoc) warning: Can't link to 'Hello tr() Example' -> Examples were removed, replace with 'Localized Clock' example * (qdoc) warning: Can't link to 'QCharConverter::FinalizeResult::Error::NoError' Pick-to: 6.11 Change-Id: I8e11a8896dd10652852e81c5d7ddf080f69aba37 Reviewed-by: Topi Reinio <topi.reinio@qt.io>
* Doc: Qt Gui: Mark private APIs \internalTopi Reinio6 days14-3/+42
| | | | | | | | | | Resolves multiple QDoc warnings of type "No output generated for X::Y because X is undocumented." Pick-to: 6.11 Task-number: QTBUG-141665 Change-Id: I6a597f6979151565fcee36964f892976964be75d Reviewed-by: Topi Reinio <topi.reinio@qt.io>
* Doc: Qt Gui: Add dependency to Qt Quick ControlsTopi Reinio6 days1-1/+2
| | | | | | | | | | Qt Gui documentation refers to a number of types/topics from the Qt Quick Controls module, add it as a documentation dependency to fix linking issues. Pick-to: 6.11 6.10 Change-Id: I541cc637c6de1daa822609ab596f82adfc0f9e45 Reviewed-by: Topi Reinio <topi.reinio@qt.io>
* Bump version to 6.12.0Jani Heikkinen6 days3-3/+5
| | | | | Change-Id: I788b0b0b10284703aaf4153e2b714444a3fbcf44 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* CMake: Enable the openssl-hash feature by defaultJoerg Bornemann6 days1-1/+0
| | | | | | | | | | | | ...if openssl-linked is enabled. [ChangeLog][QtCore] The openssl-hash feature is now enabled by default if openssl-linked is on. This enables a more robust implementation of QCryptographicHash. Fixes: QTBUG-132271 Change-Id: I1f39238fa316543e125e4535d7608c0e8e59278d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove unreferenced and broken \externalpage entryJerome Pasion6 days5-26/+1
| | | | | | | | | | | -Some URLs give 404 -Some bugreports were resolved in Qt 5.1x -Some URLs no longer referenced in Qt 6 Task-number: QTBUG-142088 Pick-to: 6.11 Change-Id: Ic4ae92b3f74ce6f62484453b8943d6b149269bc3 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QReadWriteLock: fix data race on weakly-ordered memory architecturesMiao Wang6 days1-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testcase: ./tst_qreadwritelock heavyLoadLocks When the test run under release mode on arm64, all the spawned threads may block without this fix. When the test run with optimization enabled and assertions enabled and the assertions for !mutex.try_lock() are removed from the entry of QReadWriteLockPrivate:: lockFor{Read,Write}, random assertion failures may happen without this fix. The reason for the race is because when a lock is uncontended locked and being converted into a contended lock, no synchronization happens between the initialization of new allocated QReadWriteLockPrivate object and the use of the existing QReadWriteLockPrivate object in lockFor{Read,Write}. QReadWriteLockPrivate objects are allocated from a statically allocated freelist and it is of high probability that the newly allocated object has just been released. The possible execution order that leads to a data race is described as follows: Suppose there are three threads T1, T2, and T3, and T1 holds the write lock initially. T1 first releases the lock, and then gains the read lock, while T2 tries to gain the write lock, and T3 tries to gain the read lock. The interleaved execution order is as follows, where <- means a normal memory write, <1> means a memory address of a QReadWriteLockPrivate object, : means a return value, #n means a synchronization point. For abberviation, wc denotes writerCount and rc denotes readerCount. The .h/.c and the number in the parentheses denotes the line number in qreadwritelock.h/.cpp. T2 T1 T3 unlock() lockForRead() d = d_ptr.loadRelaxed(): <1> (.h 52) d = d_ptr.loadRelaxed(): <1> (.h 52) <1>->mutex.lock() (.c 393) d = d_ptr.loadAcquire(): <1> (.c 229) <1> <-{wc = 0}(rc should be 0) (.c 397) <1>->mutex.lock() ... (.c 236) d_ptr.storeRelease(null) #1 (.c 409) <1>->release() (.c 410) <1>->mutex.unlock() #2 (.c 412) lockForRead() <1>->mutex.lock() returns #2 d = d_ptr.loadRelaxed(): null (.h 93) lockForWrite() d_ptr.testAndSetAcquire(1) #3 (.h 81) d = d_ptr.loadRelaxed(): 1 (.h 116) val = allocate -> <1> (.c 321) // ^ suppose <1> is reused here <1> <-{rc = 1}(wc should be 0) (.c 325) d_ptr.testAndSetOrdered(<1>) #5 (.c 326) d = d_ptr.loadAcquire(): <1> #6 (.c 335) d_ptr.loadRelaxed(): <1> (.c 237) <1>->mutex.lock() ... (.c 342) // Here T3 sees the d_ptr load result // as <1>, which is the same as // before, thinking it unchanged and // thus continues to execute // d->lockForRead(). // T3 here has no synchronization T2, // but had synchronization with T1 at // #2. So T3 may see the stale data // previous written by T1 to <1>, i.e. // wc = 0, rc = 0 <1> <-{rc = 1} (.c 432) <1>->mutex.unlock() #4 (.c 248) <1>->mutex.lock() returns #4 d_ptr.loadRelaxed(): <1> (.c 343) // The same happens to T2 here, it continues // to execute d->lockForWrite(). // T2 here is synchronized with T3 at #4, // so T2 must see the data written by T3 // to <1>, i.e. wc = 0, rc = 1 <1>->writerCond.wait() (.c 455) After the above interleaved execution, T2 is blocked while T3 and T1 are holding the read lock, but in the QReadWriteLockPrivate object, the readerCount is 1, which is incorrect. This might further lead to deadlock if readerCount becomes -1 after the two readers release the lock or letting a writer to proceed when only one of the readers releases the lock. The fix changes the relaxed load of d_ptr in lockFor{Read,Write} after the acquire of the mutex to an acquire load, to establish synchronization with the release store of d_ptr when converting from an uncontended lock to a contended lock. Fixes: QTBUG-142321 Change-Id: I5a570471b52359dd65f309e644d9aacfd58ce943 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QEasingCurve: fix TCBPoint default constructorMarc Mutz6 days1-3/+1
| | | | | | | | | | | | | | | | | | | | | | | As pointed out by ClangSA highlighing in QtCreator, but also by Coverity, the way the TCBPoint default constructor was written meant that _t, _c, and _b were left uninitialized even if the user value-initialized a TCBPoint object: TCBPoint p = {}; // ought to zero-initialize, but doesn't Fix by removing all the constructors. Being just a POD^Waggregate is more than sufficient for this type and aggregate initialization behaves predictably: TCBPoint p; // partially-formed (_t, _b, _c are uninitialized) TCBPoint p = {}; // well-formed, value-initialized: _t, _c, _b are 0.0 Amends b9f0bde16e85161666d5090952955bebacc40f89. Coverity-Id: 11609 Pick-to: 6.11 6.10 6.8 6.5 Change-Id: I301e5a7b68e86ddf967348b683f7a97fdc0b598d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QAccessibleColorWellItem: Fix translation contextFriedemann Kleint6 days1-1/+4
| | | | | | | | | | | QObject::tr() should be avoided. Amends eca2c9cfa7c7e22f0c5ebf036aad192f3c24d0e6. Task-number: QTBUG-141571 Pick-to: 6.11 Change-Id: If8ae1803ed6623e70622ccd34d65a12b957ed117 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QRMA: try to constrain the data source for insertColumn(s)Volker Hilsheimer6 days2-9/+15
| | | | | | | | | | | | | | | | | | | | | insertColumn can insert a data element, or a range of data elements, which then inserts one element from the source range for each row. insertColumns can insert a range of data elements (which is then the data inserted into each row), or a range of ranges of data elements (in which case we insert one range from the source for each row). Try to constrain this by inspecting the input data type, and allowing only compatible data elements, as well as ranges holding compatible data elements. Make the API test more specific - test with lists of integers, so that we can confirm that such input data wouldn't be allowed to add columns to a model holding pointers. Pick-to: 6.11 Change-Id: I1b67510b3f70f147530a3ae453b01328f2e639d2 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QRM: simplify detecting whether we can rotateVolker Hilsheimer6 days1-10/+8
| | | | | | | | | | Use std::is_swappable instead of rolling our own. Amends 2812579a667036eafcf238def42687ca2388e21f Pick-to: 6.11 6.10 Change-Id: I688b7b9eba702dd3e60a03d3df86392eaaec0d4f Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QRMA: return just auto in mutable at() overloadsVolker Hilsheimer6 days2-17/+7
| | | | | | | | | | | | | | | | | | | | | All mutable at() overloads return a reference wrapper object, so no need for decltype(auto) return types. All const at() overloads for rows return either a reference, or a view wrapper on the row, so we use decltype(auto) consistently for those, as we want to return a const ref (and not a value) if we get one from the range. The at() overloads for getting a value return either the const data type, or a DataReference wrapper, so we can either be explicit or use auto. Remove the qdoc-only type aliases for (const)row_reference, as they are no longer used in documentation. Pick-to: 6.11 Change-Id: I319be33a9db2ca61a95eebcde34d83b35b5013b9 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QRMA: add missing documentation for the const at(QSpan) overloadVolker Hilsheimer6 days1-0/+10
| | | | | | Pick-to: 6.11 Change-Id: If53710c462661f2123e99bbf7a91a67d8a967006 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QToolTip: misc cleanupChristian Ehrlicher6 days1-8/+2
| | | | | | | | | Remove some unneeded headers and avoid two useless conversions from/to QPoint(F). Pick-to: 6.11 6.10 6.8 Change-Id: Ieae6df74e4bd2bdba9498f86ec490520408e4c20 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>