summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Android: set all QScreen's geometry-related parameters togetherIvan Solovev2022-03-045-11/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Screen has 3 parameters: - physical size - screen size (or screen geometry) - available geometry Before this patch, they were reported in 3 different methods. Screen size update and available geometry update both were generating the "screen geometry changed" event, that updated the user-visible parameters. As a result, at some point we could end up in an intermediate state, when screen size was already updated, but available geometry was not yet updated. This was specially visible while changing the screen orientation: at some point screen geometry could be reported for the new orientation, while the available geometry - still for old orientation. This patch introduces a new method to set all geometry-related parameters together and generate only one "screen geometry changed" event. This allows to maintain consistency between 'geometry' and 'availableGeometry' properties of QScreen. Task-number: QTBUG-94459 Change-Id: I844f6d0db87df8d5e6e9bcce5d27126384a5a0de Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 285ea132861f8b8d1b5d1ea0f966c141da985953) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: make sure that orientationChange is reported after resizeIvan Solovev2022-03-045-7/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android orientation changes are reported from the DisplayListener.onDisplayChanged() method, while the screen size changes are reported from QtLayout.onSizeChanged(). In practice these callbacks come in random order, so rotating the screen multiple times might result in inconsistent order of signals and events. This patch makes sure that size change events always happen before orientation changes. This is done by caching the new orientation values and reporting them only when needed. At this point we also need to use QMetaObject::invokeMethod() for orientation change, like it is done for geometry change. Otherwise the orientation update can still be processed earlier than the geometry change. Also note that at some point we might get an orientation change without a size change (for example Qt::LandscapeOrientation -> Qt::InvertedLandscapeOrientation). That is the reason for isSimilarRotation() helper function. As a drive-by: ignore size changes with inconsistent values when window size is reported to have old orientation, while the screen has already been rotated. In such cases a new size change will be triggered shortly with normal value. Task-number: QTBUG-94459 Change-Id: I5c98e526d0370d380344b2297169d5e0c0ee8ea7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 79fb80152ff29a30faa3f0cce79a602e36cadbeb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: unblacklist tst_toolsupport::offsetsIvan Solovev2022-03-041-3/+0
| | | | | | | | | | | | | The test is no longer failing on Android in dev and 6.3, but still failing in 6.2. I think it's fixed by 63a35898f4990963fe91acd565df49111a281fa4 which is integrated into dev and 6.3 Task-number: QTBUG-87396 Change-Id: I82e0aac1547f8e43353f0948cd3f91b4b8f9720e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d589f3eefef2be1797ffcc5ee785beeffae0a247) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* coin: Ensure we configure repos with CMake verbosity set to STATUSAlexandru Croitor2022-03-041-6/+6
| | | | | | | | | | | | We set the default verbosity of configure output to NOTICE in regular Qt builds. To preserve the STATUS verbosity in CI runs, we now pass it explicitly when configuring all repos / tests. Change-Id: Ib63739c05855cfd5951d38ce3f8a7fc8d1218cd3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 7b94f87689161b6473b5aaec58f65ac797646303) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Make configure less verbose by defaultAlexandru Croitor2022-03-042-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Only show the more verbose configure output when configuring with -developer-build (which matches --log-level=STATUS) Otherwise in a non-developer build, restrict the output to NOTICE+ message (includes WARNINGs and ERRORs). Developers can still pass a custom log level when configuring. For example -DCMAKE_MESSAGE_LOG_LEVEL=STATUS or --log-level=STATUS. The former method will be cached, while the latter is only applied to the current configure invocation. Also show the build instructions hint message only when configuring for the first time. [ChangeLog][CMake][configure] The configure output verbosity of non developer-builds of Qt is now reduced by default. Pass "-- --log-level=STATUS" to configure to make it verbose again. Change-Id: I7583a9c92142e0b1d7c5411b06403f40d8ebaf20 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit e2a0ddbb69640c94b4ee107260a088d5c1c7e273) Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Generate wrapper shell scripts for all hosts when requestedAlexandru Croitor2022-03-042-27/+70
| | | | | | | | | | | | | | | | | | | | | | | | | This is useful for Qt for Android builds, where we want to build Qt on a single host, but make the Qt installation usable on any host (Windows, Linux, macOS). There are only two flavors of shell scripts, unix ones that use sh and Windows batch files. If Qt is configured with -DQT_GENERATE_WRAPPER_SCRIPTS_FOR_ALL_HOSTS=ON then we generate both of them regardless of the current host platform. Note that the target_qt.conf file still needs to be patched to specify a correct HostSpec value so that qmake operates correctly. Other target_qt.conf values might also need path adjustments depending on use case (like HostPrefix and HostData). Task-number: QTBUG-101357 Change-Id: Ic86caaa8b318467528cc82dc7fbfecde998cdb71 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit eec317a138dd69449cf9add63751d799b461c1b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* xdgdesktopportal theme: Implement appearance()Magnus Groß2022-03-042-0/+55
| | | | | | | | | | | | | | | | | | | We can use the new org.freedesktop.appearance color-scheme setting in the XDG Desktop Portal Settings to implement this in a DE-independent way. In the future we can also use the related "SettingChanged" signal in the Desktop portal to support changing the theme during runtime. Useful links: Spec: https://github.com/flatpak/xdg-desktop-portal/blob/d7a304a00697d7d608821253cd013f3b97ac0fb6/data/org.freedesktop.impl.portal.Settings.xml#L33-L45 Blog post: https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Task-number: QTBUG-93955 Change-Id: Ia5df22fb215ee94d68d2787da97a1c9f8f2c6b0c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3c6b61a6e14962969e7e9dc5909cd746e38f8de7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix an error in tst_QStringApiSymmetry::count_impl()Sona Kurazyan2022-03-041-1/+1
| | | | | | | | | | | | | Don't use the haystack as needle when testing count() for QLatin1String. This wasn't caught earlier, since QLatin1String has no count() yet, and the codepath was never tested. Change-Id: I2764070894ddce047eceaea52456e5a521252dab Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit b8755e2a4d70a5ff30d0fc52ba30475f65b51cbb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Conan: Include Android specific option values in 'package_id'Iikka Eklund2022-03-041-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Android specific option values need to be included in the 'package_id' to avoid mixing Android binaries built with different Android sdk, ndk, abis etc. The 'android_ndk' path can not be used as the option value as such because this is a local file system path that may be different on each system. This would make the pre-built binaries unusable as the value is part of the 'package_id' checksum. Instead, parse the 'Pkg.Revision' from the 'source.properties' file pointed by the original 'android_ndk' option value and use this as the 'android_ndk' option value for the 'package_id'. The 'QT_ANDROID_API_VERSION' can be used for 'android_sdk' value for package_id if passed as cmake argument. If not then currently we need to remove the 'android_sdk' from package_id calculation as we don't have clear means to query that from the build system. This should hopefully be fixed in future releases. Task-number: QTQAINFRA-4646 Change-Id: I679fbdcf92a1d93e00685215bb011948f1aba71f Reviewed-by: Toni Saario <toni.saario@qt.io> (cherry picked from commit bec3c2a33576bb57306cfeef0343b436cb50bd2c)
* QNX: Fix QLockFile supportPasi Petäjäjärvi2022-03-041-1/+21
| | | | | | | | Implement getting pid by process name and enable using flock(). Change-Id: I500e645b451baddea788d834374a7ae29a4d223f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 64cff16e0da3ae9928910a716d9e520ef1070a7b)
* QStringConverter: make name matching locale-independentMarc Mutz2022-03-041-1/+2
| | | | | | | | | | | | | | | | | | | The existing name lookup code used C's toupper() function for case-insensitive comparison. However, that function's result depends on the current locale. Since the matcher is supposed to match the likes of "iso-8859-1" and "latin-1", matching may fail in locales, such as Turkish, where toupper(i) is İ (or i, if the former isn't representable in the current charset), but toupper(I) remains I, causing a False Negative. To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function, which has the added advantage that it's inline. Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 955106c4fbc3769c646beb99ed91dadff14ec2d2) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Backport QtMiscUtils::toAsciiLower() from devMarc Mutz2022-03-041-0/+5
| | | | | | | | | | | A partial cherry-pick of 5f338040f4ecbf6404ea5610ec19adfd9ca71c35, it contains only the new helper function, making it available for cherry-picking 955106c4fbc3769c646beb99ed91dadff14ec2d2. Pick-to: 6.2 Change-Id: Iea89ac12cf2f0fcf94efba69ba94f92f4e3e0fed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QTest::toString() over QT_TYPESAFE_FLAGS QFlagsMarc Mutz2022-03-041-2/+2
| | | | | | | | | | | | | | | QT_TYPESAFE_FLAGS allows explicit casts only to QFlags<T>::Int, which is either int or unsigned int. The cast to the resp. other type fails. To fix, first convert to QFlags<T>::Int with toInt(), and only then cast to int or unsigned int. Fixes: QTBUG-101399 Change-Id: Ie74d53adc601cdf19708265b040092780676058f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit e93bf391fa3df4498da0f3526f4c89dd35637103) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix off-by-one for "typically" lowest value INT_MINClemens Werther2022-03-031-2/+2
| | | | | | | Change-Id: I0e1115dc21e700dc79fb54be953573c75b41e70f Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 5495eb9ec25f086ec24cee2e062f9b1c16fe52e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix painting clipping glitches with fractional scalingEirik Aavitsland2022-03-037-19/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QPainter, clipping can only be done on whole pixels. The various ways of specifying a clipping rectangle to the QPainter API have been inconsistent in how fractional rectangles (either specified directly, or as a result of fractional scaling) are mapped (rounded) to integer coordinates. Also, the mappings have not made sure to keep the edge-to-edge property of clip rects under scaling. This is particularly important when scaling QRegions with multiple rects, as QRegion is designed on the assumption that an area can be described as a set of edge-to-edge rects. The fix rounds a clip rect identically with a fill rect. (Indeed, a followup plan would be to merge QRasterPaintEngine's toNormalizedFillRect() with the rectangle rounding function in this commit). Notably, a QRectF clip is now interpreted the same as a QPainterPath clip describing the same area. This modifies d9cc1499954829faf9486fb72056e29f1bad58e3 Task-number: QTBUG-100329 Fixes: QTBUG-95957 Task-number: QTBUG-100343 Change-Id: Iaae6464b9b17f8bf3adc69007f6ef8d623bf2c80 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 423b6509382c3bcc36eca78ced0254bfb463d017) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update bundled libjpeg-turbo to version 2.1.3Eirik Aavitsland2022-03-0333-222/+279
| | | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.3 Change-Id: I69ebd10641b07af324f6ae056cddb65cc0b5ce82 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 03b930470365bd32f93d761bc823d456e8de6853) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: fix window style correction for context help buttonYuhang Zhao2022-03-031-3/+8
| | | | | | | | | | | | | | | According to Microsoft Docs [1][2], WS_MINIMIZEBOX and WS_MAXIMIZEBOX must be accompanied by the WS_SYSMENU style, and the WS_EX_CONTEXTHELP style is not compatible with WS_MINIMIZEBOX and WS_MAXIMIZEBOX. This patch adds additional checks for these situations. [1] https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles [2] https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles Change-Id: If32f8b42e25cfc67ffd1e84cc4b061f21a01042a Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 7261c811528c4c05e3abbf4e30e8f0ad668921bb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Add some offset to the system menu when appropriateYuhang Zhao2022-03-031-1/+23
| | | | | | | | | | | | | | | | | Before this patch, the system menu will always appear on the top-left corner of the window if the window doesn't have the standard window frame. However, this doesn't look very good on most situations, especially when the window has a homemade title bar. This patch adds an extra check for this kind of situations. This patch will automatically apply an appropriate offset for the system menu if the user is trying to use a self-made title bar for their frameless or customized windows. Change-Id: I55e1c4ac26a4051ca48928d4a2ac3456dce117d1 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 77d0ad6657997b24e760f9a510676c08fc952eca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Add convenient overload to query window frameYuhang Zhao2022-03-032-0/+11
| | | | | | | | | | | | | To be used in a later commit. As a drive-by, return early in the frameOnPrimaryScreen overload to avoid calling GetWindowLong in cases we don't need them. Change-Id: Ia69f4acbbf3e044073f818f357e614d4c6680d21 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 540745e599517a8c821d0bde2246a3407b95a4ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qflags: compile with QT_TYPESAFE_FLAGSMarc Mutz2022-03-031-3/+10
| | | | | | | | | | | | | | In constExpr(), where code incorrectly assumed conversions to int or uint were implicit, make them explicit. In classEnum(), don't test bitwise operators between QFlags and int/uint when QT_TYPESAFE_FLAGS is in effect. Fixes: QTBUG-101294 Change-Id: If119bf56dd12778f7231a9e76293c76e75354809 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit e1b8257deeff67025d75b4b3c27b571b418eefee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFlags: fix missing bitwise xor operators in QT_TYPESAFE_FLAGS buildsMarc Mutz2022-03-032-0/+27
| | | | | | | | | | Add tests that cover them. Fixes: QTBUG-101300 Change-Id: I5a8af4a91d796cc4d287b813bd5cc13da3d7e766 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6f50e54138f9a2aa9ab6d84add449f197d545de3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qflags: don't suppress deprecation warningsMarc Mutz2022-03-031-1/+0
| | | | | | | | | | | ... if there aren't any. Change-Id: I8531e0c1c3ca41d1b1a9d55c9d11782bd63b6f76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b2c7f17b940fb7735ff88d9af6e03729a2fdcdd0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTest: fix QCOMPARE with QT_TYPESAFE_FLAGSMarc Mutz2022-03-031-2/+4
| | | | | | | | | | | Amends 631a0cc45cbe70940746cd944d325d7d3bab8c15. Fixes: QTBUG-101299 Change-Id: Ib17e405de4db9fb592aba4ea842d3768a95cad74 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit ea3a7aaf2bf0e0e067423a7e19c457a4f26516cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Close WASM popups on non-accepted clicksDavid Skoland2022-03-021-1/+5
| | | | | | | | | | | Generally, all clicks that weren't in a window or weren't handled should trigger a closing of all popups. Fixes: QTBUG-90990 Change-Id: I40e6351b265e95e0570e7c5d42f3d5b222538453 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 0e64165c2e7b14502a578f3508e5544b035e404e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Q_FLAG declaration over enumerationsGiuseppe D'Angelo2022-03-025-5/+5
| | | | | | | | | | | One should use Q_ENUM, not Q_FLAG, to mark an enumeration. Q_FLAG should go on the respective flag type. Change-Id: I16cd5c0d405c3db1951569b72805fdae18898c45 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 44eff8f39f56cfe25dbd5a8b9d289b42137d06e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt namespace: fix Q_FLAG_NS declaration for Qt::MouseEventFlagsGiuseppe D'Angelo2022-03-021-1/+1
| | | | | | | | | | The declaration was accidentally declaring the enumeration as a flag type, not the actual flag type. Change-Id: I515478b1628a6d72626da6d7e0061f1ea3d10c89 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 52e523c33f44d4a17653b5f5b134b9615bd07346) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't allocate in qt_asciiToDouble()Marc Mutz2022-03-021-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sscanf implementation ensured NUL-termination of the input data, by copying it, and appending NUL. Since this function is ignoring trailing garbage and reports the progress back, we could be parsing the first double in a multi-MiB buffer. And we'd been copying and copying the buffer for every double scanned. This is clearly not acceptable. An alternative is to use the max-field-width feature of scanf. By giving the size of the input data as the maximum field width in the format string, we stop sscanf from reading more than the available data. This code should let everyone's alarm bells go off: a format string constructed at run-time is really the last thing one should consider, but I haven't found a way to pass the field width as an argument, so bite the bullet and go through with it. Copying potentially MiBs of data is the worse of the two evils. Fixes: QTBUG-101178 Change-Id: Ibaf8142f6b3dab4d5e3631c3cc8cc6699bceb320 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 5a39173c34be6fb033b8988408d0d98546db9f13) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Tidy up QTest::FatalSignalHandlerSamuel Mira2022-03-021-12/+12
| | | | | | | | | | Rename some variables: avoid abbreviated names. (Don't bother with renaming variables an imminent commit removes, though.) Change-Id: I3bd11f37ca687047555d43dff83c3c2f935135d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 38a86afcc4e7ad64278a954cbd97edc92b38c06a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Remove code for handling logical DPI changesTor Arne Vestbø2022-03-022-8/+1
| | | | | | | | | | | The logical (base) DPI is always 72 on macOS. Change-Id: Ibf9894fdc78d2af2d9949b29dd19ae9e8f2201c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 745893997a4311d45309f0db8eb50de86539bd66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* png/ico decoder: Don't try reading beyond the fileRobert Löhning2022-03-021-2/+4
| | | | | | | | | | This fixes oss-fuzz issue 44955. Change-Id: Ie74ae037630f83e64fd0678ff2eac579f35d02b8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 27fae7207fabc5bd5e34beab0cfeedfc8b8ede78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adapt QTest::FatalSignalHandler() to support sa_sigaction when availableEdward Welbourne2022-03-021-6/+23
| | | | | | | | | | | | | | | | | We don't currently have a use for the extra parameters, but Samuel Mira's fix to ensure we don't miss fatal signals on Android needs to be able to call the prior handler, which may need these parameters. In the process, check returns from sigaction() and use its nullptr semantics to query first when detecting whether to restore the default when done, rather than setting and then restoring if it turns out we've been replaced in the meantime. Task-number: QTBUG-97652 Change-Id: If30a0db35946c3dceb409ae3f41aa437149472e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit fcecaf53f51d4da708a7ef5d05f56f7286d2139c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Gradle: Update to 7.4Mårten Nordheim2022-03-023-3/+3
| | | | | | | | | | Fixes: QTBUG-100989 Change-Id: I7978afc18a51b58ea95e4fb94328c4f98bb12486 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 6782a37bb5fdb8e6f1acc0471eb1cf0d7dea4afa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qxmlstream for AndroidAndreas Buhr2022-03-023-11/+42
| | | | | | | | | | | | | | | | | | tst_qxmlstream was disabled because it crashed. It does not any more. But it extracted an input zip archive in-place, which is not possible on Android. To resolve this, input files are copied to a temporary directory first. Also, input directories were given to rcc. rcc has a problem with recursive directories. To circumvent this, the file list is created in CMake and then given to rcc. Task-number: QTBUG-87671 Change-Id: I88bb823b9e5c085404e263d4a648d65c9cd6024c Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 5a8052f9c1d8525b62248d7fcc2b292b2bac24f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CI: Blacklist systemFixedFont for QNXPasi Petäjäjärvi2022-03-021-1/+3
| | | | | | | | | | | QNX tests are run under QEMU so have the same problem as b2qt Task-number: QTBUG-100948 Change-Id: I2abc8a4bca9e8ba414197721301d493296e7ce0b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit f8f8c38ec7290045f930f54a5c96f79a7201c333) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: temporary skip tst_QDialog::dialogInGraphicsViewIvan Solovev2022-03-021-0/+4
| | | | | | | | | | | | This test crashed and prevents other testcases from execution. The test requires a proper fix, but that's not trivial, so skipping to enable more tests in the CI for now. Task-number: QTBUG-101321 Change-Id: I1bd4b1182cc868a36391a718457eae647675fc17 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit e5c23db60c385d1a154a8dc58e98260d8e7d3a67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: skip tst_QDialog::snapToDefaultButtonIvan Solovev2022-03-022-3/+3
| | | | | | | | | | | | This test uses the cursor. However we have no cursor support on Android. Skip the test instead of blacklisting it, because that is the correct behavior. Fixes: QTBUG-87389 Change-Id: I1a2d2dd406b3d7da1bc70b51c2072a83d9a29ca5 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit ef22545184c173ae5b815c63f56e78af5290a3d7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix tst_QFrame::testPaintingIvan Solovev2022-03-022-4/+10
| | | | | | | | | | | | | | | | | | When we create a QPixmap using QWidget::grab(), a default system image format is used for that. On Android this format is ARGB32_Premultiplied, while on the desktop systems it is RGB32. The images that are saved in the resources and used as references, also have the RGB32 format. As a result, on Android we need to convert the pixmap to a proper format before comparing it to the reference. Fixes: QTBUG-69064 Change-Id: I2d881e508d34e0b1a2a1a7bffcbc71ae2907d31d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> (cherry picked from commit e37919b758799e71a8481ae9edf690bc7b01c70a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Conan: Fix is_used_value inputToni Saario2022-03-021-1/+1
| | | | | | | | | The option name should be passed instead of it's value. Change-Id: I74529c36c438f5d40ecd4dcf689b3ea2a100e5fb Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> (cherry picked from commit 65358114dbefba39824e99b946dbdcf6f84b662e) Reviewed-by: Simo Fält <simo.falt@qt.io>
* xcb: fix a typo for WindowTypesLiang Qi2022-03-021-1/+1
| | | | | | | | Fixes: QTBUG-101306 Change-Id: If02fe4997d27b952886ce664133d1aafc2b41669 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit cfc2e267a4ed8cc724577d1b96f0d12bb45bfbfa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Bootstrap: Make compiler warnings fatalKai Köhne2022-03-022-5/+9
| | | | | | | | | | Prevent compiler warnings from creeping into the bootstrap library. Change-Id: I8054416564c91fee256cad616911dd4ad231d0df Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit dfe66019748920f5af0e143b18304a64b6f8ee6c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Activate tst_qmenu for AndroidAndreas Buhr2022-03-023-3/+12
| | | | | | | | | | | | tst_qmenu was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-87424 Change-Id: I1a3a1d2861b5a8f20d83fd8ba38fdcb3c88faee9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 324887779d272364a1dfa32bb0a2a46a71a839e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Clean up docs of deployment variables for 6.3Alexandru Croitor2022-03-025-15/+96
| | | | | | | | | | | | | | Clarified the docs that using the deployment variables is for avoiding hard-coding of specific paths. Added docs on how to customize the variable defaults Added example doc snippet demonstrating how to modify the values. Added upstream doc links where relevant. Fixes: QTBUG-100924 Change-Id: I938dcadd776c8b7019da4709dfced166454a6c92 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 8b5648743efa84ed49bcec0c11d30efa8b15718c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Rename FindZSTD to FindWrapZSTDAlexandru Croitor2022-03-026-22/+24
| | | | | | | | | | | | | And the target ZSTD::ZSTD to WrapZSTD::WrapZSTD. This should allow building Qt with the -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON set. Fixes: QTBUG-100537 Change-Id: I748601e4ad6f518323bf1034d6fc1de582c815e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 34a4fe01663c3d8b193e42c6609e75c431f8a897) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Clean up qt_deploy_runtime_dependencies for 6.3Alexandru Croitor2022-03-024-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure both versioned and versionless functions are available. Use the versioned function in the implementation of qt6_generate_deploy_app_script. Move the low-level warning to the top of the documentation page, after the TP message. Clarify documentation of the EXECUTABLE and ADDITIONAL_ options, that they take relative paths and can use generator expressions, but can't reference raw target names. Adjust documentation snippet to cover mac / windows cases. This mostly coincides with the internal implementation of qt_generate_deploy_app_script. Also adjust it to show case more options, like installation of a helper app and its dependencies. Output the working directory when executing the deploy tool. Remove the MACOS_BUNDLE option, it serves no good purpose at the moment, we already detect bundles by checking if the dir name has an '.app' suffix. Fixes: QTBUG-100923 Change-Id: If7e5d65ce920eb69fd45f004aa4c5bad800c7ba9 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 0ada264dda533cd3be2699330a5c1e2dd27a0e6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMetaObjectBuilder: Always set Data::metatypesFabian Kosmale2022-03-022-27/+37
| | | | | | | | | | | | The array of metatypes should always contain at least one entry (for the metatype of the current metaobject itself). This prevents crashes in the case of a metaobject without meta-methods and properties (as observed in Qt for Python). Change-Id: I7a6fb316eea48c4852b6f1c26e0a930aeba4c799 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit ef0e13257ddd57c967000213e3c9812b3c08da91) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix issue in loading multimedia Android pluginSamuel Mira2022-03-024-49/+69
| | | | | | | | | | | | | | | Qt projects on Android were failing to correctly load the plugin lib. The main reason is missing environment variables when the media integration starts. To make sure that the variables are loaded, I have change the setenv to be done in the java side instead of c++ side. Fixes: QTBUG-100299 Change-Id: Iba0b6af40574be2d88824ebdcfb1626335cecf09 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit fef455999aa2930289137115ab446761cd4b40db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add the _qt_internal_android_executable_finalizer wrapper functionAlexey Edelev2022-03-024-12/+28
| | | | | | | | | | | | | _qt_internal_android_executable_finalizer wraps Android-related function that are needed to created an Android package. The function is added to the INTERFACE_QT_EXECUTABLE_FINALIZERS property in Qt Core so it's called implicitly for user projects. Change-Id: I140f53341691dcfdc6ae2ddea520818cf2834eb6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e7586119e1ba48844a9353e5b9cb6f0f26292764) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use common install functionalityToni Saario2022-03-021-2/+1
| | | | | | | | | | | Common module uses the qt-cmake-private-install to install. This ensures all configurations are installed. Change-Id: I4be97685c25392838dbc7ab7c3526f55987c08e6 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> (cherry picked from commit 872bf376a72b99970b373cb969a98bab14927329) Reviewed-by: Toni Saario <toni.saario@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* xcb: free a randr monitors pointer after usageLiang Qi2022-03-011-0/+1
| | | | | | | | | | This amends 9a4c98e55659b32db984612e6247ac193812a502. Fixes: QTBUG-101302 Change-Id: Ia7a2f82550843a90a5e101788e3835bf3332f697 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 404c5dc49fca9fdded44df6e7810d3ac8cdd970e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Use less magic numberYuhang Zhao2022-03-011-19/+21
| | | | | | | | | | | | | | | | | | | | The correct calculation of the invisible frame margin and the window border width (they are the same thing actually) is the thickness of the size frame plus the thickness of the padded border. When DPI is 96, both of them is 4px and thus the invisible frame margin and window border width is 8px. So previously the empirical magic number can work normally is because the error is very small. It's not a big thing because even on a high DPI screen the error is still very small. For example, on my 4K monitor with 200% scaling, the error is only 2px, human eyes almost can't find the visual difference. But since we now know how to calculate these values correctly, let's use the correct calculation instead. The magic numbers and empirical expressions just make people confused. Change-Id: Ieda4796231935f2ad1b6f28e4aa4af5b5bce2256 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 770ea68588f954b8465276908bdfeeb6bcf550e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>