summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qoperatingsystemversion_win: cache the retrieved versionYuhang Zhao2021-11-021-6/+8
| | | | | | | | | | Make it a static variable to avoid acquiring the system version multiple times. The system version won't change at runtime after all. Pick-to: 6.2 Change-Id: Ic381e5dd7b482fedc9c01242482559ffca9d3f2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Revert "Add support for EGL_EXT_platform_xcb"Paul Olav Tvete2021-11-022-10/+1
| | | | | | | | | | | This reverts commit 816c5de460439faac0745cb364c374162b7fc651. Reason for revert: Causes crash on Nvidia when Qt is configured with -opengl es2 Fixes: QTBUG-97738 Change-Id: I9fe43146b922fc770890a144fdb1bd1c564635bb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revert "Code style fix"Richard Moe Gustavsen2021-11-021-37/+45
| | | | | | | | | | | | | | This reverts commit e1d7df5ce9eb1d370e1b6dcd31ced4029082d63d. The offending patch removed handling of page-up and page-down shortcuts in QScrollView (including subclasses like QTextBrowser). Pick-to: 6.2 Fixes: QTBUG-97908 Fixes: QTBUG-90352 Change-Id: If760e983a082edb53e12e1311e2c7f2676d80bb2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove pre-Win10 code paths in QtBaseYuhang Zhao2021-11-029-201/+44
| | | | | | | | | | | | | | Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Add QMenu::menuInAction as a static helperVolker Hilsheimer2021-11-013-1/+13
| | | | | | | | | | | | | | QAction::menu is deprecated, as it makes QAction (a QtGui class) depend on QtWidgets. The template hack works, but shouldn't become a permanent solution and is already deprecated. To get the QMenu out of a QAction that contains it, add a static helper to QMenu instead. QAction continues to store the menu pointer so that we don't have to use a dynamic property or an associative container in QMenu. Change-Id: Ieb6a2b1900d2fc2f16dd5a4a8ab7da98604642d3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QCollator: add public, static functions to do comparisonsThiago Macieira2021-11-013-25/+55
| | | | | | | | | | | | | | | | | Collation with the default QCollator object (no numeric, punctuation or case sensitivity changes) is a common-place occurrence, so add two functions to do this work. It's also what QString::localeAwareCompare() calls. The test ends up testing that default, static collator updates after the default QLocale changes too. Task-number: QTBUG-95050 Change-Id: I7e0b82c2d2fe464082d8fffd1696ac77f32840b2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Correct qcollator_posix.cpp's check against system localeEdward Welbourne2021-11-011-3/+6
| | | | | | | | | | | | | | The check was made against the default locale but the code calls the system functions (wcscoll, wcsxfrm, wcscmp) for locale-specific collation, so should be comparing to the system locale's collation locale (i.e. LC_COLLATE). Also correct the Android-only check in tst_QCollator::compare() which duplicated the check but neglected the C locale, which is also supported (via QString::compare). Pick-to: 6.2 Change-Id: I48c3237dd6825e2070272ab88d95bdb8cbb9fc37 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 3rdparty: update TinyCBOR links to 0.6.0 final releaseThiago Macieira2021-11-011-2/+2
| | | | | | | | No code change. Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b28c74ee1c07eb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* configure: Remove declaration of the MYSQL_PATH variableJoerg Bornemann2021-11-011-1/+0
| | | | | | | | | This variable was used in Qt5 to specify the install location of the MySQL library. In Qt6, MYSQL_INCLUDE_DIRS and MySQL_LIBRARIES serve this purpose, and MYSQL_PATH is unused. Change-Id: I2df12b79777af50c719a5b6bc5feadc2c59c0c3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configure: Remove declaration of the OPENSSL_PATH variableJoerg Bornemann2021-11-012-4/+1
| | | | | | | | | This variable was used in Qt5 to specify the install location of the OpenSSL library. In Qt6, OPENSSL_ROOT_DIR serves this purpose, and OPENSSL_PATH is unused. Change-Id: I40cc412bb35666dac3dd134ca8bfb67f3d524f80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix show()/hide() for child windows on xcbLars Knoll2021-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change e946e6895a8517a887ac246905e0769edd766fcc implements proper support for ICCM 4.1.4 window state handling. One issue it addressed is that a show() after a hide() needs to be delayed until the window manager/X-server has processed the previous event. This was handled with a deferred task list to send the map/unmap events. According to ICCM, we should wait for the _NET_WM_STATE notification before processing the deferred events. But this is only true for top level windows, as child windows are not handled by the window manager and will never receive any _NET_WM_STATE notifications. For those, we should use the unmap notify event, which means that the X-server has processed the unmap and handle deferred events once that notification has been received. This fixes an issue in Qt Multimedia, where QVideoWidget would not show the video anymore after a minimize of the player or when making the QVideoWidget fullscreen. This is because QVideoWidget uses an embedded QWindow to render video using HW acceleration. Fixes: QTBUG-97257 Pick-to: 6.2 5.15 Change-Id: I5c47eba3276a1f243bdafd5346f353c7843403bb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qtbase: remove last piece of DwmIsCompositionEnabledYuhang Zhao2021-11-021-20/+2
| | | | | | | | | | | | | DWM composition is always enabled and can't be disabled since Windows 8 [1]. As a drive-by, remove an old workaround for MSVC 2012, which is not supported by Qt6. [1] https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmiscompositionenabled Change-Id: I2ec055d794c91d69c141dca7cec80beb9468628c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add const to read only local variablesOliver Eftevaag2021-11-012-3/+3
| | | | | | Pick-to: 6.2 Change-Id: Ideb34a5009277b919a8a3834e53af4ff550dfc6e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QAbstractProxyModel: Use QCompatProperty with custom getterIevgenii Meshcheriakov2021-11-012-68/+5
| | | | | | | | | Use new API for QCompatProperty with custom getter instead of ad-hoc solution. Task-number: QTBUG-89655 Change-Id: I06481ad4d360b178be001ceb9c6c8460b73391f6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add warning about QCoreApplication deferred deleteMichal Klocek2021-11-011-0/+4
| | | | | | | | | | | | | | | In some bug reports we got code which does deleteLater() on QCoreApplication, however this is not going to work as the user may expect. In cases where an application uses Qt WebEngine, this leads to weird looking crashes on exit as webenginecontext is not destroyed. Pick-to: 6.2 5.15 Change-Id: I4d284f30b0c7cad15ba6da3d65cdf813c36ee036 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Inline QPropertyBindingDataPointerAndrei Golubev2021-11-012-11/+12
| | | | | | | | | | | | The only non-inline function of that class was observerCount() which would use two of the inline functions defined in the header file, so we can safely inline observerCount() and make the whole class contain only inline methods Consequently, inline class doesn't have to be exported in Windows Change-Id: I41d144d9a50420bbc0091992b36cc36ac2567704 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Match documentation of shared pointers to new definitionsAllan Sandfeld Jensen2021-11-011-4/+8
| | | | | | | | We also have move semantics and noexcept. Pick-to: 6.2 Change-Id: Idcb1d39f79ff45738c641f8dd07fb71cf32d9aca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QTest:mouseMove widget overload to send eventVolker Hilsheimer2021-10-301-8/+15
| | | | | | | | | | | | | | | | | | | We cannot assume that calling QCursor::setCursor results in a mouse move event, and we can definitely not assume that the previously pressed button (via QTest::mousePress) will be included in such an event. Instead, follow the mechanism used in the QWindow-overload to keep track of the mouse buttons pressed, and make those the buttons pressed in the mouse move event we generate. [ChangeLog][QTestLib] QTest::mouseMove no longer moves the mouse cursor via QCursor::setPos, but instead generates a QEvent::MouseMove. Testing of code that relies on QCursor::pos needs to be done with explicit calls to QCursor::setPos. Change-Id: Ia643bcc999498a0dc93479b77e107b989dfe202d Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* qconfig.cpp: use qOffsetStringArrayThiago Macieira2021-10-293-19/+23
| | | | | | | | | | It's been there for ages, we may as well use it and remove unnecessary complexity from CMake. Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a9742567a7e4af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add --no-rcc-bundle-cleanup option to androiddeployqt toolAlexey Edelev2021-10-292-2/+19
| | | | | | | | | | | Add --no-rcc-bundle-cleanup option to androiddeployqt tool that helps to debug android build procedures and check the raw rcc bundle for missing items. Also add the QT_INTERNAL_NO_ANDROID_RCC_BUNDLE_CLEANUP CMake variable that adds the option when configuring projects for Android. Change-Id: I1f30ba979f9fb3274e44a53fdc5ebde4e65f0843 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Doc: Fix broken formattingIvan Tkachenko2021-10-291-1/+1
| | | | | | | | Amends f25bc30d8d9d13fffd34213dfbf5e7373a18222a Pick-to: 6.2 5.15 Change-Id: Ia42c7639e4919de3f995d771bfc7d8237a8773d8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNI: iOS: Fix copy-pasted warning messagesMårten Nordheim2021-10-291-2/+2
| | | | | | Change-Id: Id2b3ff8857a4f86ec88a0f4a8d08a227e145ae4d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QMetaType: Avoid superfluous template instantiationsFabian Kosmale2021-10-292-11/+8
| | | | | | | | | | | | Apparently msvc still parses the template and generates code for it when it encounters an extern template declaration. Thus, instead of speeding up compilation, it gets slowed down significantly as the instantiation would happen in every compilation unit that (transitively) included qmetatype.h. Task-number: QTBUG-97601 Change-Id: Id5e934afb14ad8973df1b9197aef336b22220111 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qglobal.h: Do not include <algorithm>Fabian Kosmale2021-10-291-2/+0
| | | | | | | | | | | | | | | | algorithm is a rather heavy header, so we do not want to include it everywhere. It most likely was put into qglobal, because before C++11, swap could be found there. However, since C++11 it is located in <utility>, which we already include. Thus drop the superfluous include. [ChangeLog][QtCore][Potential source breaking change] The <algorithm> header is no longer transitively included with qglobal.h. If you used functionality from that header and relied on the transitive include, you will now need to explicitly add the header. Change-Id: Idc1912956b483d313dafd61b8f6a49d60eed8d3c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: Add texture array supportLaszlo Agocs2021-10-2913-112/+367
| | | | | | | | | | | | | | Arrays of textures have always been supported, but we will encounter cases when we need to work with texture array objects as well. Note that currently it is not possible to expose only a slice of the array to the shader, because there is no dedicated API in the SRB, and thus the same SRV/UAV (or equivalent) is used always, capturing all elements in the array. Therefore in the shader the last component of P in texture() is in range 0..array_size-1. Change-Id: I5a032ed016aeefbbcd743d5bfb9fbc49ba00a1fa Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* windows qpa: re-apply 8d6e825dMorten Johan Sørvig2021-10-291-0/+2
| | | | | | | | | | | | “Handle invisible child windows gracefully on dpi changes” This fix was accidentally removed by commit cd96d870 “Move VM_DPICHANGE handling to QWindowsWindow”. Fixes: QTBUG-96466 Pick-to: 6.2 Change-Id: I3774f6305631ba47282d43e8480e2acaba517a96 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix performance regression when avoiding scrollbar flippingVolker Hilsheimer2021-10-291-4/+7
| | | | | | | | | | | | | | | | | | | | | | Amends 6c4dc722cb9bf765904feefff4fb00bdb0b3dc9f. Don't search for the optimal size of the scrollarea's widget if it can't be found anyway. Try the size with scrollbar first, which covers the vast majority of sizes. Optimizing the loop with e.g. a binary search adds no value, as the size is often just a pixel too small. Since we can't rely on the number of height-for-width calls, we can't meaningfully test this behavior. The number of calls is still very high during showing and resizing; optimizing this further is for a separate commit. Fixes: QTBUG-97811 Pick-to: 6.2 5.15 Change-Id: If145302e6414b32cf1ce7251ff33b0039f584867 Reviewed-by: Jonas Kvinge <jonas@jkvinge.net> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix target existence check in qt6_android_generate_deployment_settingsAlexey Edelev2021-10-291-6/+5
| | | | | | | | | Move the check to the beginning of the function. Pick-to: 6.2 Change-Id: Ia44bb2e56626b00e75efabf2ebdc8eb97eee0ff8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* Replace deleteRecursively function with QDir::removeRecursivelyAlexey Edelev2021-10-291-18/+1
| | | | | | | | | Use QDir::removeRecursively instead of deleteRecursively when cleaning up top-level build folders. Change-Id: Ifb406fc1965a0781eab4fd63a3764a84f4309d25 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QVarLengthArray: Add explicit assertions for implicit assumptionsRobert Löhning2021-10-291-0/+2
| | | | | | | Change-Id: I4dfbf6174483b4af91f31a05c18cfec2aaec6e1f Pick-to: 6.2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNI: transportMedium support for iOSMårten Nordheim2021-10-293-2/+95
| | | | | | | | | | | | | | It can only differentiate between cellular and not cellular and then we can determine if it's disconnected or (presumably) using wifi. It is also explicitly not supported on macOS, which adds to the confusion. Task-number: QTBUG-91023 Change-Id: I1d002ba06dd9acf1a0daabfb2a4193c07871e9b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Extend documentation for bindable propertiesIvan Solovev2021-10-292-4/+26
| | | | | | | | | | | | | Extend the general property system page with a section on how to use bindable properties. Add some cross-references to improve the user experience. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I2520cdc168e3a8a66ea387e4ab717f4e0f969424 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Android: Treat ACTION_CANCEL as TouchCancelEventMike Achtelik2021-10-292-8/+39
| | | | | | | | | | | | | | | | | | | | Change 64d62c53c1e92a1cc07449a0ea3c71501592c1e7 started treating an ACTION_CANCEL as a TouchPointReleased. This leads to unintentional presses, if e.g. an edge swipe for the android back gesture starts on a MouseArea. When Android takes possession of the motion, an ACTION_CANCEL is delivered, which needs to be handled as such. It should not be treated as a normal up event that triggers a press. Otherwise, we get the above-mentioned issue, where an unintentional action is performed. So let's use QWindowSystemInterface::handleTouchCancelEvent to treat it as a canceled touch in Qt. Task-number: QTBUG-72110 Pick-to: 6.2 5.15 Change-Id: I68650a180130501568e5a1e9a7f20ea469461e97 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* wasm: fix changing cursor shapeLorn Potter2021-10-292-9/+10
| | | | | | | | | | | | | The previous implementation would occasionally result in a crash when a window was closed. Apparently 'auto' cursor does not work so well, so we now use 'default' name. Fixes: QTBUG-96178 Pick-to: 6.2 5.15 Change-Id: I0179d20dbdc01f0e3021d746324e1e39c678a298 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Revert "wasm: Hide popups when a window is left-clicked"David Skoland2021-10-291-3/+0
| | | | | | | | | This reverts commit 0921caf9769c84192c539db22085d343f1a4b5b1. Reason for revert: This change breaks mouse press handling in popups themselves. I'll make another solution. Change-Id: Ib9fd41f3f078e6abf22e5b0f75724d4acc737ead Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix undefined reference to WinMain errors with MinGWJoerg Bornemann2021-10-282-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | When linking against Qt with MinGW, libmingw32.a must come before libQt6EntryPointImplementation.a on the linker command line. Otherwise the linker cannot find the WinMain symbol that's defined in the EntryPointImplementation library. Under certain circumstances, mingw32 was linked after EntryPointImplementation. To reliably ensure the order of said libraries, we introduce the imported library EntryPointMinGW32. This target represents libmingw32.a and links against EntryPointImplementation. The link dependencies look like this: EntryPointPrivate -> EntryPointMinGW32 -> EntryPointImplementation The imported library EntryPointMinGW32 is defined in a separate .cmake file which is included by both src/entrypoint/CMakeLists.txt and Qt6EntryPointConfig.cmake. This is needed, because the consumer outside of Qt must access this imported library, and we cannot export imported libraries. Pick-to: 6.2 Fixes: QTBUG-93671 Change-Id: Ib3c5e80cbcc9c793d000e5ad637325bcf735a1ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QLoggingRegistry: Disable internal tracking of source file namesThiago Macieira2021-10-271-3/+2
| | | | | | | | | | Commit d78fb442d750b33afe2e41f31588ec94cf4023ad (5.4) did this for all regular users of our macros, but obviously missed this manual override. So apply here too. Change-Id: I8c6a0ff3ec184205a544fffd16af7734fed2ebd1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLoggingRegistry: add the ability to have environment variable overridesThiago Macieira2021-10-272-1/+56
| | | | | | | | | | | Quite a lot of our code in Qt predating QLoggingCategory has manual environment variable controls. For compatibility with established documentation and tips-and-tricks out there, we should keep them working when switching to categorized logging. Change-Id: I3eb1bd30e0124f89a052fffd16a6c151d3e9d552 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fusion: Consistent width calculation and rendering of menu itemsVolker Hilsheimer2021-10-271-39/+45
| | | | | | | | | | | | | | | | | | The width calculation lacked the addition of the windowItemFrame constant, which was added in the rendering code. This resulted in ellision for long items. To make the code easier to follow, const'ify, rename, and reorder some local variables, and use constants from QFusionStylePrivate instead of (now obsolete and removed) constants copied from the Windows style. Break long lines as a drive-by. Fixes: QTBUG-94481 Pick-to: 6.2 Change-Id: I6d3e9d0feebee58fc70beaaf29236b8473242083 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add missing macOS header file that was indirectly included beforeØystein Heskestad2021-10-271-0/+1
| | | | | Change-Id: I4d4c7d4f957fc36dea5e06eb6d661aeecf6385f1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix QDebug operator<< for QMultiMap when Q_CLANG_QDOC is definedJoerg Bornemann2021-10-271-1/+1
| | | | | | | | This amends commit 8a8bf1b84e9a096993b892873eb62c735149f320. Pick-to: 6.2 Change-Id: If863d33d055e0a743606d11859b11c112de105f1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adjust behavior of windowIsPopupType and hasTitleBarDavid Skoland2021-10-272-9/+8
| | | | | | | | | | | The previous implementation did not check for the popup flag, so it was added, and the tool window exception was preserved. hasTitleBar was also changed so it checks for popups and not tooltips specifically (tooltips are always popups). Change-Id: I3e2ba3be56e992b30ca2a07375092073572e7fcb Pick-to: 6.2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Calculate effect bounds when drawing widget graphics effectAntti Määttä2021-10-271-4/+5
| | | | | | | | | | | | | Calculate effect bounds for the updated region when drawing the effect so that the whole affected area gets updated. The effect bounds have already been added to the region so it doesn't need to be handled in the drawing function. Pick-to: 6.2 5.15 Fixes: QTBUG-96240 Change-Id: I0c317311622e6299fb1a3015541408d1d83c93de Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update clipping area when antialiasing changesChen Bin2021-10-273-0/+41
| | | | | | | | | | | | | | | | | | | Antialiasing is disabled when the painter's antialiasing attribute is set behind the clipping function(example `setClipPath` or `setClipRegion`). The cause of this problem is that the antialiasing state of the clipping region is not updated after the antialiasing attribute is set. A variable is required to record the painter's transformation state set before the clipping function, because the transformation will be applied to the clipping region, resulting in the abnormal clipping region. The value of `s->matrix` is not accurate for the clipping fun- ction. Pick-to: 6.2 Fixes: QTBUG-97269 Change-Id: I409a9db32efc3b991ebb97ec9aed19bbddb273d8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* wasm: fix window activationLorn Potter2021-10-273-1/+9
| | | | | | | | | | | | | | This fixes window activation of dialogs and tooltips In the case of tooltips, We were activating the window being removed. In the case of dialogs, we need to raise the window before requesting the activation. Change-Id: Ie989e6d92afedf1895b5e188f0695f6254d70272 Fixes: QTBUG-94918 Pick-to: 5.15 6.2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Revert "Android: Place cursor correctly on screen when editing"Rami Potinkara2021-10-267-98/+17
| | | | | | | | | | | | | | | This reverts commit 5c6b10c3cee5737dbc041d0463220898c8120807. It caused a regression such that the main window no longer resized or panned when the VKB is shown, in spite of android:windowSoftInputMode being set. Pick-to: 6.2 5.15 Task-number: QTBUG-95300 Task-number: QTBUG-96117 Task-number: QTBUG-97503 Change-Id: If56e1113eea69a940f6760bdb2ad06a93a0759c1 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QHash: avoid crashing when reserving on a shared hashMårten Nordheim2021-10-261-1/+2
| | | | | | | | Pick-to: 6.2 Change-Id: I21ad13fa223bd5a2c61112e790965093a2750268 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash: use the shadow seedThiago Macieira2021-10-261-21/+20
| | | | | | | | | | | | | [ChangeLog][Important Behavior Changes] The qHash functions operating on string-like types and the qHashBits function will now mix in a shadow seed (not available in any API) if the provided main seed is not 0. This means the hashing value for any particular input has an almost zero chance of being equal in two different processes, even if processes of the same application. This unpredictability makes QHash more strongly resist denial-of-service attacks through degenerate hashing tables. Change-Id: Id2983978ad544ff79911fffd167240196f7cd5c8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHash: double the size of the stored seedThiago Macieira2021-10-261-66/+114
| | | | | | | | | | | | | | | | There's now another half of the seed which will be used by the hashers. This is not stored in QHash, so it is never changed for the lifetime of the application (not even when QHashSeed::setDeterministicGlobalSeed() is called). However, we will not use it when we're in deterministic mode. This commit uses the compiler thread-safe statics to implement the initialization of more than one atomic word, thus freeing us from having to have a reserved value. As a bonus, the QT_HASH_SEED warning will only be printed once. Change-Id: Id2983978ad544ff79911fffd16723f1673f9a5b4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add internal property to store Qt namespaceAlexey Edelev2021-10-261-0/+2
| | | | | | | | | | In some cases it might be useful to use the value of Qt namespace in CMake files. Currently the value is only stored inside Core target compile definitions. This adds the internal property _qt_namespace to the Core target and exports it. Change-Id: Ic0454f0ce6b8c65b5a186981463d3977169b022e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>