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>
The implementation of QOffscreenScreen::virtualSiblings() uses the list
of screens maintained in QOffscreenIntegration as input, so we need to
remove screens from this list as we remove them, to avoid treating
removed screens as siblings of still remaining screens.
While we're at it, remove the screens in reverse order, so that the
primary screen is the one removed last. This avoids having to update
the primary screen and move windows for each screen removed during
shutdown.
Change-Id: I9ab09dd75dbe20f63b9154533613bc59da531fd1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qt_standard_project_setup() is not in technical preview anymore.
Move this variable out of TP as well.
This commit amends 85970834b5.
Task-number: QTBUG-100793
Change-Id: I46f57972b385ac033e106bd8cbdc1efe7c9777af
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The JUnit format is easier to feed to tools that don't support
the native Qt Test XML format.
Change-Id: Ie9803cc0fb0577b3b7258b05faa78d8fb1aad1d1
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
The event should be propagated when the native clipboard is available.
A recent regression caused it to be suppressed, which resulted in lack
of copy/paste capabilities.
Pick-to: 6.4 6.4.0
Change-Id: I030a31aa0951c3813ce1d38da9a6526010b3bfc8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Take QT_HOST_PATH out of technical preview. It has proven worthy of
being documented as proper CMake variable.
Fixes: QTBUG-106463
Pick-to: 6.2 6.3 6.4
Change-Id: Ie1dd83eff526d5b803ea275dd3c6ecc3a7aa0e17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
qsimd_x86_p.h is not synced and installed as part of macOS multi-arch
builds, because of TEST_architecture_arch. With new approach when we
supposed to deploy only header files that belong to a platform in Qt
builds and installation, this file is missing. Considering
CMAKE_OSX_ARCHITECTURES in qt_internal_extend_target CONDITION fixes
this behavior and the file is added to CMake source tree.
Include qsimd_x86_p.h using private module include path, but not by
the relative path. This helps to detect the issue if file doesn't
exists in build or install directory when building qtbase, but
not other repositories.
The current architecture_arch test returns the very first
architecture that pass the check. Since arm64 is located in very
beginning it's returned first and other architectures that might be
used for multi-arch builds are not taken into account by conditions
that checks architecture_arch test results.
Fixes: QTBUG-106462
Task-number: QTBUG-103196
Change-Id: I6a9f110007d7069222c7d63bcd3ea586efab3aae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
<module>-config[-p].h files need to be added to the CMake source tree
Amends 8539e641f6
Task-number: QTBUG-103196
Change-Id: I8baaa672ad869da8a030d890da8bdea5bd8c7794
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The QT_NO_PACKAGE_VERSION_CHECK flag should be considered by multi-ABI
external projects when it's set in the main project.
Pick-to: 6.3 6.4
Fixes: QTBUG-106394
Change-Id: Ief4ca1272f08f074d6c93d923efabdc13acd3add
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Instead, unconditionally attempt to query for the required permissions
and catch the exception if those are missing.
Also, removed some unused variables taking part in the browser-sniff
calculation.
Fixes: QTBUG-105129
Change-Id: I7b96d0ba78109ad59dffb23ec9e618836bf826fc
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
match does not work, as cmake uses a string for NOTFOUND
Change-Id: I160a1f7ed69592b85fcbf0d8b5773713121ee9a4
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
... instead of rolling your own.
Since MaxByteArraySize already adjusts for the trailing NUL byte in
QByteArray, the odd 'len >= max' now become a more natural 'len >
max'.
Rename the limit variable to MaxDecompressedSize, which is more
specific, and remove comments that now look out of place.
As a drive-by, re-arrange an else branch that, had it stayed, would
have required an adjusted if branch to require braces around a
single-line statement.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I6805dab8391b7e51db30d99b1b8968434062d12d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Overlooked in the review where this changed, this value was already in
seconds and needs to be converted to millis before converting back.
Now printing output such as:
<testcase name="initTestCase" classname="tst_QHash" time="0.001"/>
Amends bb74e72aa9
Pick-to: 6.2 6.3 6.4 6.4.0
Fixes: QTBUG-106222
Change-Id: I1f8b774eea3dcbe2b4e822e2b0b2efb1ccc01abb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The current code that locks the window does not take into account
screens that don't start at non-zero y coordinate, nor does it cap the
bottom of the window.
Task-number: QTBUG-106031
Pick-to: 6.4
Change-Id: Ic22c016d32dca9d288a2a56c51ccde78144b436e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Therefore, no translation to screen coords is needed.
Task-number: QTBUG-106031
Pick-to: 6.4
Change-Id: I0dbbc5e4df79d85f9c6ef47f09ea54f19b67d2d7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The window may be in a temporary state where the window()->handle() is
not yet set up. This makes an expose event with isExposed == false being
issued, which makes the window not refresh, especially when a async expose
request follows shortly after.
invalidate() handles this case itself as it issues a request to the
compositor which exposes the window at the right moment.
Fixes: QTBUG-106159
Change-Id: Ibc84490c379774120ab65978472e35be25240164
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Test was not really good to start with - it was assuming the presence of
particular ciphersuites. Furthermore, it was ignoring the fact that
TLS 1.2 and TLS 1.3 set ciphersuites differently in OpenSSL.
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I6c8ba20154cdeb9275878462ab945729d6c82ecc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The QFontMetrics documentation has been wrongly stating that the
the horizontalAdvance() gives the width of a string, dating back
to when the function was misnamed as width(). This can cause issues
e.g. when using the value as input to eliding or clipping, since the
advance may be smaller than what is actually drawn.
This tries to clarify the term a bit.
Task-number: QTBUG-90036
Change-Id: I8ed82fa14fe26c2a20cdbee9f2097a0aa4cc3925
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
This spams the console with "writeStackCookie"/"checkStackCookie"
messages, which makes finding relevant debug output harder.
Pick-to: 6.4
Change-Id: I352b633f02f9ecc1333d1d91f5ffc21a4a937e53
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
The screen geometry can not affect the logical DPI of the screen,
Change-Id: Id71b72ed2f26d0371ea7c2d2951426d2616dafd1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The function updates the cached QScreen geometry; rename
it to updateGeometry().
Change-Id: I56077807baa6c515769017dbb842eed10b1d1357
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Having the logic in QPlatformScreen was inconsistent with how the
high-DPI scaling logic sits on top of the platform layer, and also
made the implementation of QScreenPrivate::updateHighDpi() a bit
inconsistent in how the geometry vs available geometry was resolved.
Change-Id: I683ab34dfc8579e2c887cb8fe3059c9c9fdb71a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
... and in turn remove the manual Q_UNLIKELY() leading to its callers.
Paths to Q_DECL_COLD_FUNCTIONs are implicitly [[unlikely]].
This is in preparation of changes where the extra Q_UNLIKELY markup
gets in the way.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I2cba5103854bf356ed841e1957a5ef143f8d3823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make it easier to reason about the flow of high-DPI scaling when the
implementation is not "hidden" away in a private header.
Change-Id: I6350798c43ead213323f8e01d9761f2d185c6b00
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Using [NSAutoreleasePool showPools] to debug auto release pools
should now show the call site that allocated QMacAutoReleasePool,
instead of the QMacAutoReleasePool constructor, i.e.:
################ POOL 0x7f844c80c050
0x600003644190 ^-- allocated in function: QCoreApplicationPrivate::init()
0x600003a41080 __NSArrayM
0x60000345cca0 __NSCFString
0x600003a410e0 NSPathStore2
0x600002141680 NSPathStore2
0x6000036441b0 __NSSingleObjectArrayI
Change-Id: I52d22503c1d3de5a9dbae9939569d0836cc1a840
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
popup() is generally better but it has a certain advantage that it does
not require a run loop to work, therefore platforms (like WASM) can use
it without resorting to extra measures (like asyncify).
Task-id: QTBUG-106389
Backport-to: 6.4 6.4.0
Change-Id: I87bde677f84048af82cc9aadd982284bdba41e69
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The context menu event created in QWidgetWindow::handleMouseEvent
does not forward its acceptance flag on which a client may rely.
Task-number: QTBUG-106389
Backport-to: 6.4 6.4.0
Change-Id: I17a53ebd23b4ae0a2721c629f3ecc7aeec56233d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Avoid adding module header files to a PUBLIC/PRIVATE_HEADER for the
modules. All header files are installed using install(FILES call, but
not as a part of install(TARGET
Amends 8539e641f6
Task-number: QTBUG-103196
Change-Id: Ib95295112c74f74f237e3738d2532f9049d26ce6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If Qt itself is built without the deprecated APIs, so should be the
tools and apps.
This patch makes sure that the specified QT_DISABLE_DEPRECATED_UP_TO
and QT_WARN_DEPRECATED_UP_TO values are correctly used in the internal
tools and apps.
Fixes: QTBUG-105102
Change-Id: I7a51bddbd839c7b71efa0bff8ec959df64c53b82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The indentation is only required for C++.
Pick-to: 6.4 6.3 6.2
Change-Id: Ie861b12ba262fd56995c11d883129bafd11eface
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>