The CLDR data from which they're obtained may contain a space-joined
sequence of timezone IDs, rather than a single ID. (This applies
principally to the mapping from MS-specific names to IANA IDs, but in
principle may also apply to the other data obtained from same-shaped
XML.) Note this on the methods of internal types and actually take it
into account when using this data to match IDs.
See CldrAccess.readWindowsTimeZones() in util/locale_database/cldr.py
for the form of the CLDR data from which these are extracted; the type
attributes of mapZone elements in the XML are the source of the
space-joined lists of IANA IDs.
Change-Id: I3f940e4c352d8312ff735f972c9f8f3961572884
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Port of the 5.15 change. It is not strictly required for Qt 6 since the
immediate problem of failing to compile some of the shaders with some
drivers will pop up much more rarely in practice, because neither
Multimedia nor the backing store compositor for
QOpenGLWidget/QQuickWidget use QOpenGLTextureBlitter in 6.4 and newer.
To maintain the internal behavior between 5 and 6, the patch is
nonetheless ported to Qt 6. It also has a performance benefit for
the users of the blitter, because now the special shader variants
(for rectangle or external textures) are only created when needed.
Task-number: QTBUG-101396
Change-Id: I1cf4bec0c74045f4b6f94765563254026bf0b7d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
While working on QTBUG-98434 some potential improvements were
found in the pre-existing code.
Some of the QLatin1String literals are used to initialize
QStrings or are converted to QStrings and so it makes sense to
replace them with QString literals.
As a related change, change the type of namespaceDelimitier from
QString to QL1SV, since it is used only for a function call and
that function has an overload to take QL1SV.
Task-number: QTBUG-103100
Change-Id: I56db6ddd84ad2a7133a765bb49ecd8f962ac5c13
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This will ensure that we get compiler warnings when a newly added value
is missing.
Change-Id: I6de78534cb330aa4968ac018354a1ab37c499228
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Otherwise, when platform integration is deleted, it triggers resolving
promises after the global instance of QGuiApplication is dead and
QPixmap in turn calls qFatal, crashing the exiting app.
Fixes: QTBUG-106472
Change-Id: Ie706d030214c33abdbc8fff86cc2eddd0c632f1b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Refactor QWinRegistryKey to make it more modern and more
usable from outside.
Adjust the test for QWinRegistryKey to test the new functions,
merged with the original test.
Will port raw registry accessing code in QtBase to use this
class in follow-up commits. This change is the first step.
The long term goal is to port QSettings registry code to
this class instead of using raw Win32 APIs, however, there's
much more registry code in QSettings and migrate them to this
class needs a large refactor, so jsut leave it for now. Will
fix it in some future commit.
Change-Id: Iada2adb41b4d58e1b658ff6870a4b31ace479d43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
[ChangeLog][macOS] QWindow::setKeyboardGrabEnabled() and
QWindow::setMouseGrabEnabled() now returns false, as the feature is
not implemented on macOS yet. If you were relying on these functions
to make the window key (activate it), please use
QWindow::requestActivate() instead.
Task-number: QTBUG-106597
Change-Id: I86d7d806080aae98c9aec5287adfcc8cb70d372a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
One or two of them is enough.
Task-number: QTBUG-85231
Change-Id: I8da2cd0b222eacd534255b6b5548fef9aad408d6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
For some reason when running this test on macOS 13 in the CI the window
is activated, as on other platforms, but this is not reproducible
locally, so we can't just remove the QEXPECT_FAIL.
Task-number: QTBUG-104210
Task-number: QTBUG-23699
Change-Id: Ib1cacb36d90d2be357756c82af2427f2b3ab9999
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
qopengltimerquery.h contains platform-specific guards inside the file
and can be processed for any platform. Fix the issue by adding it to a
commong source tree but not the header usage used since it's easier
and public header can be used by user-projects directly.
Task-number: QTBUG-103196
Task-number: QTBUG-87480
Change-Id: Ic01a7f2d0de56da946c2ed699a8b183f70d5f9d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The change b515fa56a3
introduced checking the emsdk version of a qt installation.
However, this checked for QT6_INSTALL_PREFIX where it may not be
defined. This fails when trying to build tests because
when configuring tests, it calls into add_target_helpers which
calls into this logic, and QT6_INSTALL_PREFIX is set after
this is called into, causing the qconfig.h lookup to fail.
To fix this so it works in all conditions,
we need to check if either install prefix or
build_dir is set and use whichever is set.
Pick-to: 6.4
Change-Id: I3cf7e20d3d830f04e5b632fc51d8bf3b2758a717
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This provides an easy way to test window modality using a ready
available test.
Change-Id: Ia23736c61fd56dda8f72ae19f5f102163951271b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Windows that are of popup type only should not be resizable. Those that
are dialogs as well, should, provided their minimum size does not match
their non-empty maximum size.
Fixes: QTBUG-106560
Pick-to: 6.4.0 6.4
Change-Id: I76851e19949110323f949a1d17260fbd4fc35159
Reviewed-by: David Skoland <david.skoland@qt.io>
For some reason it fails on Ubuntu 22.04, but it's anyway
not following the trend the rest of the file uses, so just
assume it's the code at fault and fix it.
Thanks to Liang Qi for debugging this!
Pick-to: 6.4
Fixes: QTBUG-106016
Change-Id: I9d0563a081827eaa037d61643f0ea46301e11493
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Expand a test to cover millsecond format variants more thoroughly,
including a test for the new usage of zz. This applies to parsing the
complement to commit 0a36a7c1db173089c25ea09029505a589a1c59e5's change
to serialization. Fixed minor glitch in the serialization's doc, too.
[ChangeLog][QtCore][QDateTime] When parsing a datetime, the 'zz'
format specifier is now equivalent to 'z', as for serialization.
Change-Id: I1c5700064738d9c92d5e8ce10bff8050131e190f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use the standard mechanism instead of a hand-rolled way of identifying
function/data-tag combinations. Adds missing data relevant to
identifying test cases, some of which previously had apparently the
same name, with no hint at why the test-case was seemingly run
repeatedly.
Change-Id: I6225c6d1990069c94a1f1c8dbb179993b96076e7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
All our other loggers use it and teamcity's use of QString implied
lots of conversions from UTF-8 and back, or in some cases to native
encoding, that ended up failing to correctly propagate Unicode tokens
that the other test loggers do deal with correctly. This does not
change the generated output on Linux.
Change-Id: I036d8043d7b3b19e7a0e1f296a23628f98223563
Reviewed-by: Jason McDonald <macadder1@gmail.com>
This overload was only needed to avoid breaking compilation of
qtdeclarative. After declarative had been migrated to the new API, it
can be safely removed.
Pick-to: 6.4 6.3 6.2
Change-Id: Ib540b924178b6a69e3bfd89b7c324fbba79c75ff
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
qt_internal_add_configure_time_executable compiles the executable
at configure time and exposes it to the CMake source tree. This is
useful when need to run a small C++ program at configure time.
Task-number: QTBUG-87480
Change-Id: I031efe797c8afa0721d75b46d4f36f67276bf46e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The new way is more readable as it uses an existing API
Change-Id: Id253c9e6405d11f16bdb5f55288dcfcf4b1641c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This makes the js batched test runner cooperate with emrun.
The runner sends back the output and exit messages to emrun to inform it
about the test execution state.
The code is based on emrun_postjs.js from the emsdk.
Change-Id: I758f2c185797f4000810eb4314423eebc1c5d457
Reviewed-by: David Skoland <david.skoland@qt.io>
While working on QTBUG-98434 some potential improvements were found
for pre-existing issues, for example some variables were wrongly
initialized. Fix the mismatches between QString/QLatin1StringView.
Task-number: QTBUG-103100
Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This can be helpful when you calculate multiple hashes, store them in a
vector and you want to know which result belongs to which algorithm.
[ChangeLog][QtCore][QCryptographicHash] Added getter algorithm().
Change-Id: Ifcf78536f215619a6e2e3035a95598327d0ed733
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This adds a move constructor, a move assignment operator and a swap
function to QCryptographicHash. This can (to name one example) be useful
when you want to store multiple hashes in a vector.
[ChangeLog][QtCore][QCryptographicHash] Added move constructor, move
assignment operator and swap() function.
Change-Id: Id54594fa69104ec25ad78581f962a021e85531c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
... and add an assertion. The assertion can only trigger if our
definition of MaxDecompressedSize is wrong.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: Ifa375f59fb6ff5e0324d2208f4c2882174f9a44d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The method should by contract return nullptr when the stack is empty,
but it crashes in this case.
Also, unit-test the case.
Pick-to: 6.4
Change-Id: If64b71e761efd9a5cd5af407cd68cba7f8dbc8e2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If we receive compressed data we will decompress it as it comes in,
in some cases the final byte we receive doesn't actually contribute
to the final output. If this byte is handled by itself then, when
combined with QNetworkReply's signal compression, we ended up not
emitting the readyRead signal for any of the data we received while
compressing the signals.
So, instead of relying on checking difference in bytes downloaded
for each batch of data received we keep track of how much data
we had received the last time we emitted readyRead.
Pick-to: 6.3 6.4 6.4.0
Fixes: QTBUG-106354
Change-Id: I4777be29b46bf0de968667e9de9d975c735ac6e6
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reflects what has been configured in the Coin. Allows removing
the rules from Coin and brings them visible.
Pick-to: 6.3 6.4
Change-Id: I8b3567bca3ac040725253764775249a0b0dee8eb
Reviewed-by: Simo Fält <simo.falt@qt.io>
In a subsequent commit we will add Linux support for
qt_deploy_runtime_dependencies based on file(GET_RUNTIME_DEPENDENCIES).
The file(GRD) command expects that we pass the not-yet-installed
executable to it, because the command reads the RUNPATH/RPATH from the
executable and resolves libraries against these paths. This resolution
is likely going to fail if file(GRD) is run on an installed executable,
because the RPATH was modified to be relocatable in the installation
phase.
This patch adds a recommendation to use the build directory's executable
for qt_deploy_runtime_dependencies on non-macOS platforms.
Also, the Windows code path of qt_deploy_runtime_dependencies is
adjusted to support both, the .exe in the build dir and the .exe in the
installation prefix.
For consistency, qt_generate_deploy_app_script calls
qt_deploy_runtime_dependencies with EXECUTABLE pointing to the build
directory's executable.
[ChangeLog][CMake] On non-macOS platforms,
qt_deploy_runtime_dependencies' EXECUTABLE argument now expects the
executable in the build directory instead of the installation directory.
Change-Id: Id76b52cc5a0f285586679d7ae600a8c7996429c1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Because it's convenient to have it build automatically.
Pick-to: 6.2 6.3 6.4
Change-Id: Iecd5bd1f9fe518f683b8ee9eb6529e48ce76fb33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We don't need the QBA later, so just pass it directly to
the QByteDataBuffer and avoid the ref-counter increase/decrease.
Change-Id: I253a29981bdfffb1a205baaaa0788d4283253e19
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Better explains what the code is doing, esp. now that qUncompress() is
using qFromBigEndian() for the inverse operation.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: Ic885fd31bd80dc3939c7e4ef0c0e53b9e6b185b3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Partially reverts 50661a9558.
On big-endian, when long is 32-bits, but size_t is 64-bits, the
reinterpret_cast<ulongf*>(&len) from a size_t len is addressing the
MSBs of len, which, by construction, are 0.
I'm not sure such platforms exist (Windows is LLP64, but always LE
these days, all Unixes are LP64), but the reinterpret_cast is a code
smell, so do the length calculations in uLongf, which is zlib's
interface type, and avoid the cast, so the compiler can complain if we
get the type wrong, which it promptly did:
The static_assert I added a few commits back now informed me that the
doubling of len started to overflow, so replace the unconditional len
*= 2 by saturation arithmetic: if doubling would overflow, use
MaxDecompressedSize instead; if we fail with Z_BUF_ERROR even with
that buffer size, we just can't decompress and need to give up.
As a drive-by, change a C-style cast to a reinterpret_cast.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I91c311b297ef410b4c001d3528f1e9fd469d5def
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some tests in corelib/kernel need threading support, but they are not
guarded against compilation if Qt is built without threading.
Such tests have been disabled in this case.
Change-Id: I2f5dc9582f2a59b6af2a9e56638b045dca06193d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
... which may be less than what QByteArray can handle, e.g. on Windows,
where long, used in the zlib API as the size type, is just 32-bit.
Re-define MaxDecompressedSize as the minimum of the maximum sizes
supported by each of QByteArray and zlib, so we respect each library's
individual limit.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: If1894ae7a1888f651a82b153d463658c272287e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Should the deployment script that qt_generate_deploy_app_script not be
sufficient, the new function qt_generate_deploy_script can be used to
generate a custom deployment script. Before, one had to add quite some
boilerplate code to generate a custom deployment script.
The qt_generate_deploy_app_script function now uses
qt_generate_deploy_script internally.
The TARGET option of qt_generate_deploy_script is currently only used
for controlling the base name of the generated deployment script. We
will do more with the target in a subsequent commit.
Fixes: QTBUG-105731
Change-Id: I85bfc50dac1f0b0b1aae0f657f803e9e30f53616
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The inner loop would go out of bounds whenever it tried to find the end
of a run of spaces in a fragment that contained only spaces.
Fixes: QTBUG-104999
Change-Id: I5dda03b31194fff12f6052c458a0eb85d0be5c2b
Pick-to: 6.2 6.3 6.4 6.4.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
According to xdg-desktop-portal documentation, current_file should be set
only when such a file already exists and xdg-desktop-portal-gnome enforces
this by being totally broken when current_file is set to a non-existent path
Pick-to: 6.4 6.3 6.2
Change-Id: Ie3c80a7c6fd0cf23eea88ddec2149f5904c63394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move the comment about setting the
ATSPI_STATE_MANAGES_DESCENDANTS state to the
place where the state is actually set.
Change-Id: Ia6956d36db86e935b4fab03b1892cf4e8a709c0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QWindowSystemInterface::handleScreenAdded() already calls the function
as part of adding a new screen, and it the right place for the logic
to exist in any case.
Change-Id: If7f9d62e2de9d4ddb9a985d642ea7a5bc7388db5
Reviewed-by: Liang Qi <liang.qi@qt.io>