Should be no different from MetalSurface and OpenGLSurface.
Pick-to: 6.6 6.5
Change-Id: I529f2904a43e44376e9f2da2489fac57670d954d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This reverts commit f647375275. There are
no signed integer overflows in atomics.
For the non-atomic side, unlike the commit being reverted, we fix the
signed integer overflow by removing the "signed" part instead of the
"overflow" part, and use unsigned integer overflows instead.
Change-Id: I53335f845a1345299031fffd176f5ba479163e44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
After 449b45ff34 we emit aboutToQuit
before quitting the main event loop, matching the documentation and
semantics of "about to". Clarify this in the documentation, so that
client do not rely on a missing main event loop to trigger processing
of root level deleteLater() calls in a nested event loop.
Pick-to: 6.5 6.6
Change-Id: Ifd116394a1960814edf69f20c5aaff6a8e5cfc24
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QConfFileSettingsPrivate::initAccess is not async, as the commit
introducing compile guards around initAccess in ctor of
QConfFileSettingsPrivate suggests. Calling initAccess is necessary
to read stats from a conf file.
This makes 50 more tests in tst_qsettings pass.
Task-number: QTBUG-115509
Change-Id: I99e8970413a14d7b595be23d42bf46faa26b3dd7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
We can use plain data() for the recent and imminent that are further
from forLocalMSecs than its UTC equivalent can be: more than 99% of
the time these shall agree and we can save some fiddly details. We can
also use data(recent) as place-holder for the last transition's data,
saving a need to call previousTransition() - which may be expensive
(at least on Darwin). This avoids a quirk around minMSecs(), used by
the MS backend for a fake transition, so marginally simplifies some
initializations (and comments). It also gives us the information we
need for the fall-back (when transitions don't help or aren't known),
that uses the offsetFromUtc from recent and imminent, which the early
data() values supply.
Task-number: QTBUG-104012
Change-Id: I08403d129c0fec478b09de5b660f4a0a97b17148
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit adds some initial support for handling the 'L' suffix after
numbers. This one is especially important given that the __cplusplus
define is using it.
Other suffixes will be handled in some later commit, which should also
unify the already divergent parse behavior between DIGIT and PP_DIGIT
parsing (e.g. when it comes to byte prefixes).
Task-number: QTBUG-83160
Task-number: QTBUG-115558
Pick-to: 6.6 6.5 6.2
Change-Id: Ie61eae49c468abfaee80e7e4f7097917a254dc0e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
mouseMoveEvent overrides in QColorLuminancePicker and QColorPicker
have triggered value changes unconditionally. This happened under the
assumption that the widget attribute WA_Hover is not set (which is the
default behavior). In that case, mouseMoveEvents are only delivered if
a button is pressed.
If WA_Hover is set - e.g. by applying a style sheet - mouseMoveEvents
get delivered also when no button is pressed. This leads to faulty
behavior: The color and the luminance change, whenever the mouse is
moved into the respective widget. Color/luminance are changed to the
value representing the edge on which the mouse has left the area.
This patch changes both mouseMoveEvent overrides. They return early
to avoid hovering changing the colors of the luminance/color picker,
but ignore() the event in case anything behind the picker needs hover.
Since this is a purely graphical effect, an autotest was not added.
Fixes: QTBUG-115516
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I000d113a1c81c46799cbb5197bf9acb3849e7d3b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The PRELOAD variable in wasm_shell.html wouldn't get substituted with
preload list when using qmake. Do that as it is done in cmake.
Fixes: QTBUG-115507
Change-Id: I3c659626dc6fa6f4fdf9e31bd62b87fc6a7d8bbe
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Previously, a target name with a JS special character (like, -, for
example), would lead to an invalid export name being generated for
WASM modules. Sanitize these by replacing any non-alphanumeric
character with underscores, as is done for feature names.
This is a qmake version of 58a47edda1
Fixes: QTBUG-115506
Change-Id: I7c84076be54da91cf0f707c1613afc382acdcb83
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
We dropped support for macOS 10.3 in Qt 4.6, 14 years ago.
But the logic to only 'fake' the unloading on Q_OS_DARWIN
remains. Also, add a statement explaining the behavior
in more detail.
Pick-to: 6.5 6.6
Change-Id: I62ec7df7c4b807f84c96619f78b3cef704c51335
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There is no QT_CONFIG_thread.
Thanks to Alexey Edelev for spotting why I couldn't run the test.
Pick-to: 6.6 6.5
Change-Id: I11c99d9b1ff8fed67b118028b76fba8ee6db3c42
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Qt insight's TP is using plugin type "generic" so that insight plugins
can be deployed for every Qt application. As "generic" plugins are part
of QtGui windeployqt deploys these if a dependency to QtGui is found.
As defaulting to a deployment of insight plugins might cause confusion
among users, we make deployment of these plugins explicit if the module
is available.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I9d2a8595373d5a15b7afbeaf7174226563b1cb6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Those tests often fail on Android 13 on RHEL 8.6 and 8.8. This patch
skips them to unblock CI while the underlying reasons are investigated
and fixed.
Task-number: QTQAINFRA-5606
Change-Id: If088d69c2160470ef50b2e74cd9b9399451c526d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
A regression was introduced in
48841c34d2
when configuring qtshadertools with -prefix -debug and
no -developer-build.
qtbase would have been built as Debug, but qtshadertools as release.
This caused qsb.exe to link to a debug c++ runtime via QtCore, and a
release one via QtShaderTools libraries and thus cause heap corruption
crashes during runtime due to the mismatch.
This happened because the check in cmake/QtSetup.cmake thought Debug
was the default build type (nothing was specified on the command line)
without knowing it was explicitly set BuildInternals.
Set a variable when BuildInternals sets CMAKE_BUILD_TYPE and make
sure QtSetup does not override it then.
Augments 33af62db37
Amends 48841c34d2
Fixes: QTBUG-114958
Change-Id: I5e0a27b4d77512494c026dd911ec5757889a5a1a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
It's Darwin, no longer OS X.
Include a link to the URL of NSTimeZone's docs.
Use actuall Q_UNREACHABLE() rather than a comment.
Correct a TODO comment (there *is* API for it, but fiddly).
Make a lower bound constexpr rather than merely const.
Task-number: QTBUG-104012
Change-Id: I9bf2018fa27ac9f6aa38eaebbf6b0f90ff5f6188
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't need them any more, only the color is used for compositing.
In principle this enables a driver to not writeback their contents into
main memory.
Change-Id: Ibde17af6c14c98ebdca956aaf902dfd728f9219c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The docs were never added (unlike the docs for erase_if).
Change-Id: I7857c5eded68791ddfc4e6ce42a60d5736f5a438
Pick-to: 6.2 6.5 6.6
Fixes: QTBUG-115473
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Desktop GL does not have the GL_EXT_discard_framebuffer extension at
all. Instead, it may have GL_ARB_invalidate_subdata.
Furthermore, GLES >= 3.0 and GL >= 4.3 both support FBO invalidation
through glInvalidateFramebuffer.
Extend the semantics of OpenGLExtension::DiscardFramebuffer to mean that
*any* possibility above is supported, and wrap it in a helper function
that calls whatever support is present. (This is all private API
anyhow.) Technically speaking glInvalidateFramebuffer supports a
superset of what glDiscardFramebufferEXT supports, but we never use such
superset, and the two APIs are otherwise identical.
Then, make QOpenGLWidget call that wrapper.
Change-Id: I64e042daf51493d3834c3ba1b53ae6e224bbc4ed
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The android emulator launcher script is mainly used in CI and thus
makes sense to be moved there. This also makes it easier to make changes
without having to wait for submodule updates.
ANDROID_EMULATOR_RUNNER is defined in qt5's Android provisioning script.
Also, change the order of instructions execution to set COIN_CTEST_RESULTSDIR
env variable before running the emulator script. That var points to the path
to where the emulator logs are saved.
Task-number: QTQAINFRA-5596
Change-Id: If6ac285fecdc49611c398e8185e6e3e6b9c353fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We do not need the Q_CC_GNU check, as the __SIZEOF_INT128__ check is
enough.
Pick-to: 6.6
Change-Id: I12bdd02186c4f5dad0ab3f4596f4b37e5c3f7eee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rewritten to be a bit simpler, added a few more yield/YieldProcessor
alternatives, added RISC-V support.
[ChangeLog][QtCore] Added qYieldCpu() function.
Fixes: QTBUG-103014
Change-Id: I53335f845a1345299031fffd176f59032e7400f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Use QT_DEPRECATED_VERSION_X_6_6 and provide reasons for deprecation
for the enum value and for the QPropertyObserver constructor.
Pick-to: 6.6
Change-Id: I0f9b4c6dc8bb9fd5eac692a6953c90059f3c77ef
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Provide a centralized overview of Qt's comparison types, available
for three-way comparisons.
Fixes: QTBUG-114402
Change-Id: Ib7229e753ef750d00c208794d1feb3e6d42133ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
It tried to reference the QXmlStream equivalent example, putting its
title in {...}, but neglected the \l prefix to that.
Change-Id: Iedc556ecd65103057d0dea65debe628b50d1190e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
The description in terms of timeouts was confusing. Instead, say what
it actually does, in plain terms. Mention that you can do similar for
a duration.
Pick-to: 6.6
Task-number: QTBUG-115447
Change-Id: I4618d7fa290e7959ed3cb51e5c2576b041f77091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove stray comment at the end of tst_qexplicitlyshareddatapointer.cpp
Pick-to: 6.6
Change-Id: I31a6c38002e56e7c43e527864ba3d9324950079f
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Remove stray comment at the end of tst_qxmlstream.cpp
Pick-to: 6.6
Change-Id: I88550e2b75194e7895d8578ca0e8350af59d4dfe
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
This causes modern compilers (i.e., not MSVC) to emit a single
bit-test-and-set instruction instead of a cmpxchg. It's still an atomic
operation, so it's not that much faster (if at all), but it has simpler
encoding.
Previous:
000000000026bca0 <QEventDispatcherUNIX::wakeUp()>:
26bca0: mov 0x8(%rdi),%rdx
26bca4: xor %eax,%eax
26bca6: mov $0x1,%ecx
26bcab: lock cmpxchg %ecx,0x98(%rdx)
26bcb3: jne 26bcc5 <QEventDispatcherUNIX::wakeUp()+0x25>
26bcb5: mov 0x90(%rdx),%edi
26bcbb: mov $0x1,%esi
26bcc0: jmp c01d0 <eventfd_write@plt>
26bcc5: ret
Now:
26b3a0: mov 0x8(%rdi),%rax
26b3a4: lock btsl $0x0,0x98(%rax)
26b3ad: jae 26b3b0 <QEventDispatcherUNIX::wakeUp()+0x10>
26b3af: ret
26b3b0: mov 0x90(%rax),%edi
26b3b6: mov $0x1,%esi
26b3bb: jmp c11d0 <eventfd_write@plt>
Change-Id: I53335f845a1345299031fffd176fa8ac1de3ad13
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Linux has had it since 2.6.23, which is positively ancient from our
perspective. No one runs Qt on systems anywhere near that old (I'd be
amazed if anyone managed on CentOS / RHEL 7, which carries Linux 3.10).
And we don't deal with ENOSYS on FreeBSD either.
The removal is accomplished by dead code elimination: it's still
compiled on Linux and FreeBSD.
Drive-by
- use NSDMI in QThreadPipe
- remove EINTR_LOOP for eventfd_write(3): it can't be interrupted
Change-Id: I63b988479db546dabffcfffd1766e2c7acc6da46
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
And mark it private.
[ChangeLog][QtCore] Qt no longer sets the QT_NO_EVENTFD feature macro
on systems without eventfd.
Change-Id: I63b988479db546dabffcfffd1766e1df5255c930
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The install-time code path that's supposed to propagate and install the
metatypes files was never executed, because of a wrong
PARENT_SCOPE assignment and because the code was overriding the meta
type file name retrieved from a property with an empty non-existent
argument.
This caused build failures in qtdeclarative when qmlcachegen generated
invalid cpp code without having access to the qtbase foreign types.
This only happened in prefix builds.
Use the appropriate variable for the PARENT_SCOPE assignment and
remove the incorrect file name assignment.
Amends c45c32af32
Task-number: QTBUG-115152
Change-Id: I120d53d44382a1ac6f62792ec1620add3e7b136c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
The existing signal connection can cause a loop and undefined behavior
in the interaction between the line edit for a hex rgb color and the
individual rgb values.
=> Change connection to textEdited, to react only on manual editing.
Fixes: QTBUG-115189
Pick-to: 6.6 6.5
Change-Id: Ie3062c575652b905a8ab16edb2f5f77f8d150f36
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QObject::tr() should not be used.
Amends c4301be7d5.
Task-number: QTBUG-92113
Task-number: QTBUG-95188
Pick-to: 6.6 6.5
Change-Id: I09547c3d048d6b3726e33be74b06035f0eec4f31
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This is done in anticipation of another test for dragging
Change-Id: I56961eb1d16a4a6b6c58890c9c882dea813dfa08
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Use qwasmwindow_harness_entry instead of the old createQtAppInstance.
Change-Id: I381dd43d9144fe70f055c19db4cd95f90313883b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>