and instruct to use the ones from the Qt namespace instead.
Task-number: QTBUG-82532
Change-Id: I6a85f5096da8aec925a287beff136b77d113926e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
and mark QHash::[const_|key_]iterator operators correctly as deprecated.
Change-Id: I01da16254759b9bdb7920709de45a72933d6b5c8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
and tag it in the header file to ensure the documentation is matched.
Change-Id: Id1e7cd395ca0ec337845da9a207bfbf95db01064
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QDoc has trouble applying the \obsolete command for multiple
topic (\fn) commands in one go. Separate them out and expand
the reasoning for deprecation.
Mark the rest of the deprecated functions and typedefs related
to reverse iterators as \obsolete.
Change-Id: I09858efd7e1e5fc890d4f3f063f00c8812fc0b52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The margin is respected in the sizeHint, but not in the minimumSizeHint.
Since the latter should be the former for a single character (as per the
documentation promising enough space for one character), the margin
calculation needs to be identical.
Adjusting the documentation nevertheless, as there are characters that
won't fit either way. As reported, the permyriad character doesn't fit
even with this fix on macOS, as the core graphics API we are using
doesn't report a glyph-index for U+2031 (so our existing assumption
that 'W' is the widest character is still the best we can do).
Change-Id: I30573960c316cc7b8c9bbe3c3f4c6351792bed36
Fixes: QTBUG-82970
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The way this was done didn't really make sense. The change added
an overload with one additional argument. The deprecation warning
would have now forced everybody to explicitly specify all arguments
to avoid the warning.
Instead, keep both overloads in 5.15, but document them as one method.
Remove the old version in Qt6 and move the default arguments to the
new version.
Change-Id: I738d4d1b99cdf30db53acf14382a00cac74aa10a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This change allows the checked/unchecked state to be detected by screen
readers for all controls with a checkable state.
Task-number: QTBUG-81919
Change-Id: I604151397b4ae21297009c274ffe634723ebe783
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The information about whether a table/tree item may be checked is necessary
to allow the platform code (in particular, Windows UI Automation layer)
to make this information available to screen readers.
Task-number: QTBUG-81919
Change-Id: Id68eea4a004788751404d70567222a2c531578aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When cross-compiling with CMake, before this patch pkgconfig calls would
find libraries which are part of the host system and not the target
system.
The current approach used is based of the discussion present in
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4478, and should
be considered a temporary solution until the issue is properly addressed
in upstream CMake.
Change-Id: I535d4d48c2a5d34689082b80501b3b6ae30d7845
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
From clang warning:
qwasmcompositor.cpp:335:13: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
offset += (delta +delta);
Change-Id: Id372dfdd8fda1c705c61a24c26843dfb33fba40c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This header only covers a part of what qsimd_p.h does, namely
the compile time detection of simd extensions.
Change-Id: I05f1d987f194a5bec335f2405cc2846fbaa88b66
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's not used in tools at all and fits a lot better in global.
Also fix the qsimd_x86* files to have a proper copyright
header.
Change-Id: Id3d8e7cfcd7769a1ca9f3d8cf6d357a31a99ba40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Those methods don't modify the CBOR value, they should be const.
Change-Id: I213984ed82e43429413344999a22ad1c4c3beac8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Increasing the sample size of randomly generated test samples reduces
the probability of small deviations from the expected uniform
distribution.
On my machine with the new values the test fails approximately once per
3000 consecutive runs, instead of failing once per 300.
Change-Id: I4d1815504c353290a2fb350b3fd1cbb802f8d559
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the map or array is known to be empty, we don't need to allocate a
QCborContainerPrivate.
Change-Id: Ief61acdfbe4d4b5ba1f0fffd15fe212b6a6e77c3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
A simple 16k file can produce deep enough recursion in Qt to cause stack
overflow. So prevent that.
I tested 4096 recursions just fine on my Linux system (8 MB stack), but
decided 1024 was sufficient, as this code will also be run on embedded
systems that could have smaller stacks.
[ChangeLog][QtCore][QCborValue] fromCbor() now limits decoding to at
most 1024 nested maps, arrays, and tags to prevent stack overflows. This
should be sufficient for most uses of CBOR. An API to limit further or
to relax the limit will be provided in 5.15. Meanwhile, if decoding more
is required, QCborStreamReader can be used (note that each level of map
and array allocates memory).
Change-Id: Iaa63461109844e978376fffd15fa0fbefbf607a2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The next commit will need to do so from outside QCborContainerPrivate,
where QCborStreamReader::d can't be accessed (private).
Change-Id: Iaa63461109844e978376fffd15fa0f6f04081bf2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... when we are not using the FFD_USE_FORK flag. We use the FFD_USE_FORK
flag when we have user code to run in setupChildProcess(). This code is
enabled for all Unix, but forkfd() honors this flag only on Linux >=
5.4.
See the commit adding the flag for more information on what the flag
does and see the comment in this commit on why it's safe to use it.
Fixes: QTBUG-17331
Change-Id: I1bee3bc466a04f19bd6efffd15f448cb23ce1e91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This flag asks forkfd() to use vfork semantics wherever available. That
is, suspend the calling process execution until the child either does an
execve(2) or _exit(2). The advantage of that is that it puts lower
pressure on the OS VMM system, as the number of pages that need to be
copy-on-write duplicated is much smaller (still not zero, as at least
the stack in the child will be written to).
However, the only implementation that supports using this flag for now
is Linux's pidfd. It would be possible to add to FreeBSD, but pdfork(2)
does not have a flag for this behavior -- if it gets one, we can add
support for it later. Everywhere else, we need to force the child to not
exit until we store the child process's PID in the ProcessInfo structure
we allocated, which means the parent process must run before we even
return from forkfd().
Change-Id: I1bee3bc466a04f19bd6efffd15f447f28c201aa9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If we detected that the OS supports a version of system forkfd (Linux
pidfd, FreeBSD procdesc), the forkfd_wait() function was using only the
system waiting implementation, which of course can't work for file
descriptors created with FFD_USE_FORK. So just detect EBADF and attempt
again.
If the file descriptor is neither one of our pipes nor a system forkfd,
bad things will happen...
Fixes: QTBUG-82351
Change-Id: I4e559af2a9a1455ab770fffd15f59fb3160b22eb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
"wait4" because it looks like the wait4() BSD function, which has the
signature:
pid_t wait4(pid_t pid, int *wstatus, int options,
struct rusage *rusage);
And because ours also has 4 parameters.
Having options is important anyway. I might want to add some more later,
but we can't really support them with the fall back implementation (in
fact, we don't honor WNOHANG in the fall back implementation either).
Change-Id: I4e559af2a9a1455ab770fffd15f5858bb357e15b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This patch silences the exception about missing v1 api entry for the
qt_add_3rdparty_library() function.
Change-Id: I74a473ed1c063b13f0a9ca64dcb568b8f8b27235
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Oh, and re-remove the spdy protocol handler.
Change-Id: I9ca3517b14ac202eac19ae75d481cfd78d431abb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Currently depending if user uses QApplication
or QGuiApplication we end up in different behavior
when running post routines. For example QApplication
destructor calls post routines before stopping event dispatcher,
In case of QGuiApplication post routines are called
from QCoreApplication destructor, so no more event dispatcher.
This behavior is not consistent and creates troubles
when releasing resources of web engine.
Attached test will hang on windows with QGuiApplication,
however works fine with QApplication.
Task-number: QTBUG-79864
Change-Id: Ice05e66a467feaf3ad6addfbc14973649da8065e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
These functions and macros were never documented.
Let's warn about using them for now, with the option of
removing / renaming them in Qt 6.
Change-Id: Ia595aa35b73e54534e535d2946581651af8023f2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use range-based for and fix deprecation warnings.
Change-Id: I54152b2598e9e4a7a3cc9db9b7072bbabcef7fcf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Don't introduce another overload with two parameters. Users
want a simple signal to connect to, not another overload. Deprecate
the currentIndexChanged(QString) overload, usage of that can/should
get replaced by currentTextChanged().
This partially reverts commit 11dc7b35c8.
Change-Id: I5e7d16413f3d62b1a5a7a197f510af2c45cdfa55
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Flushing sublayers via QImage copies of the root IOSurface was causing
performance regressions due to the constant allocations of new images
each frame.
We now re-use the QCALayerBackingStore implementation for sublayers,
which gives a dynamic swap-chain.
We're still paying the CPU cost of the copy from the root backingstore
to the layered backingstores, as well as the memory cost, but at least
improves the situation.
We do not try to be smart and paint directly into the sublayers,
as that would leave the root backingstore stale, potentially causing
glitches when views are repositioned. Investigating this is left
for future work.
Fixes: QTBUG-82986
Change-Id: I758a3d8e1e40e2ed4fe6bc590a4a5a988d87a3a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ce2d68ebe1aefeae78ff2fd8ec5ff7e20790ef69)
With very complex regular expressions this makes a significant
difference in performance.
Change-Id: I5267bf71cae98dffb58ec7a1fc982dae639ff312
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
hash.erase(hash.constFind()) is bound to crash if the hash doesn't
contain the item we're looking for.
Change-Id: Icbefca87b0258970373ec55d5dc113e6ab39c5f0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
For INSTALL_*DIR variables that have the the same value as
CMAKE_INSTALL_PREFIX, a second cmake run cleared the value. This is
because file(RELATIVE_PATH) returns the empty string if we pass the same
absolute paths.
Fix this by checking the return value of file(RELATIVE_PATH) for the
empty string and setting it to ".".
It's a limitation of qmake that empty strings are not handled as ".".
Change-Id: I8fc4d1eabcc9d5634be2f3741b0002a347dd17e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Without this patch JPEG support is always disabled, even though we can
build it from 3rdparty sources.
Change-Id: I9e619f0ca8ec3ca3e7c58981bb6af9b33426a029
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
PCH files were only used while building qtbase. Make sure the value
is exported to the BuildInternalsConfig file, so the value is re-used
when building other repositories.
Also disable PCH when building simulator_and_device iOS builds, because
CMake doesn't currently generate separate PCH files per architecture.
Change-Id: I79955ebc557b800bc3c704deac519fe80012c229
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
mappedObject() can do exactly the same thing, there's no need for a
mappedWidget() signal as well
This removes a reverse dependency between Qt Widgets and Qt Core where
QWidget pointers are being used inside Qt Core.
[ChangeLog][QtCore] Removed QSignalMapper::mappedWidget. Connect to
mappedObject instead, and use qobject_cast<QWidget *> to handle Widgets.
Change-Id: I60618a34dd94575e993bd6d8a2cead95cfd71d55
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As a drive-by, enable testing of rcc in the cmake build.
Change-Id: I4150ff3ffe7404bab0cbc72f80b23b47a60cf33d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>