QDate was changed to consistently use the C local in
serialization and parsing in git commit
5ba66c5622.
This commit reflects this change in the unit tests.
Task-number: QTBUG-80441
Change-Id: Ib21a215ef0e36c9eaa2c161b92c6877a50ae6f06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
qt_record_extra_package_dependency is called by qtwayland to register a
dependency between the qtwaylandscanner tool and the waylandscanner
tool.
When cross-compiling the tools in a Yocto environment, the adjusted
target name was not taken into account.
Task-number: QTBUG-83968
Change-Id: Ibf7b94876bf29827cf0d9c9bb471f359ef6ff15f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This works around linking issues when doing yocto non-prefix Qt
builds, because CMake does not add -rpath-link flags even though it
probably should.
Task-number: QTBUG-86533
Change-Id: Iaaf246ac71ca05d9369ceb6eb9c4a1e206c42839
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The Android build for x86_64 fails with CMake. It should also fail with
qmake builds but the current multi-ABI build is testing the feature for
arm64-v8a only.
In [1], it's stated that AVX and AVX2 are not supported on x86_64 ABI.
[1] https://developer.android.com/ndk/guides/abis#86-64
Task-number: QTBUG-85982
Change-Id: I20c9366bdee2a13ca554ec67f5d0c041bd068b91
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Returning physical DPI from logicalDpi() is problematic,
as explained in commit 77e04acb.
The most predictable implementation is to never return
physical DPI from QPlaformScreen::logicalDpi(). Other
platform plugins already does this, and this change
brings xcb in line with the rest of Qt.
We have the QPlatformScreen::physicalSize() API which
covers returning physical DPI (indirectly); Options
for selecting which one to use can be implemented on
top of these (see QT_USE_PHYSICAL_DPI).
Change-Id: Ifc41229fa63734a2eb06b3acefd97b2ed3e57c2d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Document the new base classes QPointerEvent and QSinglePointEvent,
and move relevant documentation to be located under them.
* Replace linking to deprecated functions with their new counterparts.
* Remove non-existent function and parameter documentation.
* Document QEventPoint::State enum.
* Prefer \obsolete over \deprecated and fix the usage.
* Document the Capabilities enum in the correct location and
add docs for the missing enum values.
Change-Id: Ic8f2732f2e90ecbf522cd744c601cedcc574825c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Updated moveNonPod function to behave correctly under
exceptions being thrown. This is the version that was implemented
at some point but then got changed prior to merge. Added tests for
moveInGrowthDirection (which uses moveNonPod in general case) to
verify that range movements are correctly done
Updated QCommonArrayOps access modifier from private to protected
to allow testing of internal stuff by subclassing
Task-number: QTBUG-84320
Change-Id: Idb994a72ee601762e32248670cdc7819aaca0088
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We plan to move storage of the grabbers into QPointingDevice so that
QEventPoint will store only data that does not need to persist between
deliveries of individual events. These API changes prepare for that.
addPassiveGrabber/removePassiveGrabber is a better API than
setPassiveGrabbers(), because it will never require constructing a
temporary QList just to call the function. Eventually we need to emit
signals to notify about grab changes, so it's better to have incremental
changes to the list rather than needing to iterate and find differences.
Fix up the docs.
QEventPoint IDs are no longer written in hex in debug output.
That was done in Qt 5 because an ID was a composite of device ID
with the OS-provided touchpoint ID; but since the QPointingDevice
is always available, it's more readable if the IDs are in decimal.
Change-Id: I86b9016d9b28c331ca05c7c108d9788de93fb642
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reorder, and remove ### Qt 6 comment
It would be nice to have a way to statically assert that the order
of StandardPageSizes (and their id) matches the order of the enum,
but it's not possible (or at least very cumbersome) to do so.
Change-Id: Id0d0a58958f1e17151725cbe8f8068db64f84939
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The inLoop boolean is unused, so remove it. At the same time, there is
another boolean that might just as well become a bitflag, so that we
can add more members in the future, should the need arise after all.
Since we then need to explicitly initialize the member, add a standard
QObject constructor.
Change-Id: I51245829c1b1192fde62592fb972da6ea2a88e11
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- Use nullptr instead of 0
- Pass directory to chroot that is not in /etc
- Set umask to a sensible value (0 is insecure)
Change-Id: I1dba29bc0f454df09ca1fffd161801257f9ccb3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If we require complete types when generating the list of metatypes, then
we also need to require them when generating each entry, and vice versa.
Change-Id: I68394f8628bb6cd89f77bb829b1d4b5ab35071a0
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
As directed by ### Qt 6 comment.
Task-number: QTBUG-85700
Change-Id: Iae4179b017840efe4902de2b1529cf7ec0606865
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Scoped GrowsBackwards-optimized erase to only be applied
when erase starts at the beginning of the element range.
In other cases, old "left-shifting" erase is used to align
with std::vector::erase invalidation policy
Task-number: QTBUG-84320
Change-Id: I2e7f3b96b056bc371119eb2d36cc7c74af52c394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Gives it its own changed signal, and simplifies setting from group,
while fixing an inconsistency in propagation.
Change-Id: I22b243210260a8878144fa4b60204df46f847f37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The qdoc-file that contains the example documentation was
left behind when the OpenGL code moved from QtGui
to QtOpenGL. This causes all the snippet commands to fail.
Task-number: QTBUG-74409
Change-Id: I86a753d4fc832965e76a085062882e6c720becd2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This reverts commit c7ec07d401.
Reason for revert: This causes a memory leak on program termination.
The initial commit was an attempt to fix a deadlock where the user
destroys object from a thread that does not own the object. This is
an unsupported case and should be treated as an invalid report.
Pick-to: 5.15
Change-Id: I4957784b86a0361adb65b9d023542f96480f00ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
It really could only manifest itself if you started a request and then
immediately cancelled it and then started another one to the same
site. But only if in a certain race outcome - the connection that the
backend was establishing had to finish connecting after aborting but
before a new request had been queued!
Change-Id: I7cad2cf4ac1f64cc838498cefa076cd2c6d26701
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Mostly related to qstrlen().
Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Address a ### Qt6 comment from change
283008e123, and start using
QStyledItemDelegate in more places, so those get proper
look and feel.
Change-Id: I39767ba99b7942faada1fba0ac241deb35563b63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
I still have doubts that QEventPoint can't be made small enough that
copying would be cheaper than reference-counting and all the indirections
in now-noninline accessors, but this gives us the usual freedom to
change the data members later on.
Change-Id: I792f7fc85ac3a9538589da9d7618b647edf0e70c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Before, we used not so accurate QTest::qWait(50)
to measure the accuracy of more precise timer's interval.
In addition, the checked range for remainingTime (50, 200)
was probably wrong, since by definition it couldn't be more than 150,
as we started the timer with interval of 200 and waited at least 50.
In this fix we have additional "tester" timer to measure remainingTime
of "tested" timer. The "tester" is a singleShot timer with interval of
50, and is started together with "tested" timer. Whenever the "tested"
timer timeouts, it restarts the "tester" timer - this is done desired
number of times (2 by default, like in the original test).
The test itself lies now inside tester's lambda. We fix the tested
range (at least 1, no more than 150). The minimum value could in
theory be greater, but it's enough to test that it's not overdue.
Finally, we wait for expected number of test runs. We give it twice
as much time as is in theory needed.
Task-number: QTBUG-83419
Task-number: QTBUG-58519
Change-Id: I43836d787d804f22bb66515ebb215d040189c4f3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
While it's possible to instantiate safe_delete using a nullptr, the
check in if-statement is 99.9(9) % of time redundant and equal
to if (true && object). Some compilers will issue a compilation
error (if warnings are treated as errors for example).
Change-Id: Ib593dc53deb6d2e4b77ea5c896610dc536c61b7c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
I accidentally noticed the message in a CI job, but it didn't fail the
build because the FATAL_ERRO was considered as another text token to
print, instead of a command keyword.
Change-Id: I0e30ebacbed32d1017f9ded681cd6b15cbc32573
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The qt_build_internals_disable_pkg_config_if_needed function didn't
actually check if the pkg-config executable is available when turning
the pkg-config feature on.
This broke certain configurations like Android (on some hosts).
Try to find the executable and take that into account when computing
the value of the feature.
Task-number: QTBUG-85399
Change-Id: Ie79c637f2d2b689c392862c90075d309906fe506
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The generated toolchain file embedded windows style paths for the
android sdk and chainloaded toolchain. This caused CMake does fail at
configure time while trying to evaluate backslashes as escape chars.
Also syncqt was searched for in libexec, which is not the right
directory on Windows. Use the host info package to get the location of
the 'libexec'.
Task-number: QTBUG-85399
Task-number: QTBUG-85911
Task-number: QTBUG-86053
Change-Id: I1b15ce84496d52c3fda2f65138e1eac43bc95c9e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Rather than force setting the apple sysroot and Qt host paths, first
check if they are not already defined on the command line and if they
aren't, check that the paths with which Qt was configured exist.
The goal of the patch is to not set invalid paths, like when using a
Qt built in the CI, which will have a different host path / sysroot
compared to what a user has locally.
Task-number: QTBUG-85240
Change-Id: Ic37566b4fa845d8d1b4e4b5ba7fa4be769e99ca8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Using find_library() to find an Xcode framework will end up embedding
the absolute path of the framework into INTERFACE_LINK_LIBRARIES.
A different machine might not have the SDK installed in the same
location, which will cause build failures. This happens in our CI
because Xcode is installed to /Applications/Xcode11.app.
To fix this, replace all system framework paths with
'-framework Foo' flags instead.
We already do this for OpenGL and OpenGL ES.
In the future we might want to convert these into full standalone
FindFoo scripts that expose proper targets.
Fixes: QTBUG-86299
Task-number: QTBUG-86422
Task-number: QTBUG-85240
Change-Id: I22b2b2d1d9e92108098d3974105e3758978cd8e2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
It flaky fails for both normal and reverse cases.
Pick-to: 5.15
Task-number: QTBUG-41341
Change-Id: If6ecd6dc58f131bb67d46a5d508f59b6bb0fd962
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
[ChangeLog][Source-Incompatible Changes] QProcess::setupChildProcess()
was removed. To execute code in a child process, use
QProcess::setChildProcessModifier()
[ChangeLog][QtCore][QProcess] Added setChildProcessModifier() function
with which one can provide code to be run in the Unix child process
between fork() and execve(). With this function, it is no longer
necessary to derive from QProcess in order to execute actions in the
child process.
Another reason is that we can tell whether the std::function carries a
valid target much more easily than we can tell whether QProcess was
overridden.
The setupChildProcess() virtual function does not need to be marked
final, since no overrider could ever return an inaccessible private
class. This also makes sure the error presented to the user is about the
return type, not about attempting to override a final.
Clang:
error: virtual function 'f' has a different return type ('void') than the function it overrides (which has return type 'QProcess::Use_setChildProcessModifier_Instead')
GCC:
error: conflicting return type specified for 'virtual void MyProcess::setupChildProcess()'
note: overridden function is 'virtual QProcess::Use_setChildProcessModifier_Instead QProcess::setupChildProcess()'
ICC:
error: return type is neither identical to nor covariant with return type "QProcess::Use_setChildProcessModifier_Instead" of overridden virtual function "QProcess::setupChildProcess"
MSVC is not relevant since it doesn't compile to Unix.
Change-Id: Ia8b65350cd5d49debca9fffd15f801161363aea7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
We don't support older compilers from before they accepted
the architecture codenames.
Change-Id: If13a10ed95b34007858bfffd1631a08b425fa9c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This was added for Qt 5 in 780137d585 but
apparently the change was never ported over to CMake.
Fixes: QTBUG-86452
Change-Id: If13a10ed95b34007858bfffd1631a084370a3232
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The implementation can be more efficient with two 32-bit fields instead
of just one, but it depends on whether operations on 64-bit atomics are
locked or not.
Quick check for the following architectures does not reveal any
problems, but someone needs to investigate more. Notably, GCC and Clang
generate a call to libatomic's __atomic_load_n / __atomic_store_n / etc.
32-bit std::atomic<uint64_t>
Arch ::is_always_lock_free .is_lock_free()
ARMv7-A false true
i386 false true
MIPS false true
PPC false true
RISC-V false true
SPARC false true
Change-Id: Ia2273af1172d493092d6fffd163251a99064c51b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This reverts commit ff69227a49.
Reason for revert: 64-bit atomics on 32-bit systems are often
(but not always) worse than the 32-bit semaphore as it was
implemented. Plus the High32 and Low32 functions are returning
the same thing, forgetting the endianness check.
Change-Id: I5d5ade6e9bc7086600ff2302546385151e32142b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Android 11's SELinux rules block the RTM_GETLINK requests that
qnetworkinterface_linux.cpp needs to make. So disable this completely
and fall back on the older rimplementation. Bionic has some workarounds
in their getifaddrs() implementation to make this work.
Fixes: QTBUG-86394
Pick-to: 5.15 5.15.1
Change-Id: I87447a0ecdee4dc7b506fffd163180c2b1db7835
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
... and the associated enumeration.
Using them is almost always a certain mistake.
1) op+ between two enumerators of the same enumeration yields int,
not QFlags, so removing the type safety that QFlags is supposed to
give and breaking the semantics of bitwise operations.
2) op+ between two enumerators of different enumerations is
deprecated in C++20 (already flagged by GCC10), and again yields
int. This is a code smell. Dedicated classes (holding a combination
of unrelated enums) should be used instead.
3) op+ between an enumerator and its QFlags loses the semantic
meaning of bitwise operations. If the real meaning was to use
operator|, then use that instead; operator+ hides the intent,
and can introduce bugs by creating a result not expressible via
OR combinations of enumerators:
enum E { A = 0x01, B = 0x02 };
QFlags<E> f = E::A;
f + E::A; // ???
f + E::B; // ???
Identical reasoning applies for operator-. Technically the
other arithmetic operators could be disabled as well, but I
really don't expect any real-world usage for them.
This has spotted bugs in Qt.
[ChangeLog][Potentially Source-Incompatible Changes][QFlags] Using
operator+ or operator- with a QFlags object or with an enumeration
that has a corresponding QFlags object will now result in a
compile-time error, because it's a generally unsafe operation.
Use the proper bitwise operations instead (|, &, ~); or cast
the enumeration to a integral type before attempting arithmetic
manipulations on it.
Change-Id: I5eabc5195dec3d3082bc9da10dbc8cf5dff3e1eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QDateTime::toString uses the C locale since 5ba66c5622
So don't expect locale specific day- and month-names.
Task-number: QTBUG-80441
Change-Id: I08f53b6b33ed9e7eaaa58df4ca6a966c4ba9ef24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change QWindowsWindow::format() to return the QWindow's requested
format instead of storing it as do the other platforms. This will
cause the alpha (layered flag) to be adapted in
QWindowsBackingStore::flush(). Note that it does not fix
the issue; the window does not update correctly after
changing WS_EX_LAYERED.
Pick-to: 5.15
Task-number: QTBUG-60822
Change-Id: I3facd93f993b3b422b6818d55c1bce884fb57234
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Because we removed public setters from QTouchEvent and QEventPoint in
4e400369c0 and now it's proposed to give
QEventPoint a d-pointer again, the implementation of QTouchEventSequence
needs to start using QMutableEventPoint: being a friend will no longer
be enough, because the member variables won't be accessible in the future.
But because we have separate test libs for Gui and Widgets, it needs to
be further refactored into two classes.
Change-Id: I0bfc0978fc4187348ac872e1330d95259d557b69
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Remove compile warning for -Wdeprecated-declarations.
Change-Id: I747c8a390f26cfc4626e40c4684034c394bbf3c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>