fix QLineEdit Cursor Rect and InputMask area overlapping,
the cursor rect area is white. when inputMask is set,we don't
need draw cursor.
Fixes: QTBUG-89578
Pick-to: 5.15 6.0
Change-Id: Ibec7f8f1f7331a12438fd821c2002903260da10a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
With the updated QEMU and toolchain, these tests now pass.
Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add internal function to cleanup compiler flags out of the
CMAKE_xxx_FLAGS_xxx variables. Use introduced interface to clear
the '/EHsc' flag for the MSVC compiler family. This adjusts the
CMake behavior to the qmake one.
Change the 'EXCEPTIONS' option handling in helper functions. Add
ability to add enabling and disabling exception flags. Previously
it was only possible to add disabling exception flags.
Fixes: QTBUG-89952
Change-Id: I60d47660a97ae9b5a1d1f4107d352c9e97890144
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Header files of a Qt module are usually found in subdirectories.
Avoid creating object file paths like "header_foo/bar.h.o".
When building with conan, the "header_foo" subdirectory was not created
for whatever reason.
Now, we make sure we have clean object file paths, e.g.
"header_check/foo/bar.h.o", and we create the directory upfront before
invoking the compiler.
Fixes: QTBUG-90529
Change-Id: Ifa5d6b97e07fc4e249c58cda5128439d60b14f5f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 54980200c79b466a276a4d3054390e4b3162e9ed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By marking undeclared and unused copy/move constructors as deleted.
Change-Id: Ie74b9cb015090dbb425b701a55eadb9d80ab0285
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Read/write/notify properties, 3 out of 5 defined in this class.
Task-number: QTBUG-85520
Change-Id: Ic6c74f90a2fa3c71d71cf9a5d557f1b6fc489d35
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Same reason as for the version without args. Amends
1461df2ce4.
Change-Id: Ib9f0d8f27d858ff35134001c3cd7945b17668ae4
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
To minimize code duplication, move the socket notifier deletion to the
closeChannel() function, where the pipe descriptor will be closed.
Change-Id: If75ba1c955c706ae6e2b3d9f53f7a25e4aa32fa7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
As part of Qt 6 restructring for the extras modules, this change exposes
the Jni APIs which are very important for Android platform. This patch
adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based
from private QtCore and QtAndroidExtras.
The Jni interface is cross-platform which justifies the name, but
currently, this API is used mainly for Android, and the naming comes
generic without Android keyword to avoid any future limitation on
supporting other platforms.
[ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and
QJniExceptionCleaner APIs.
Task-number: QTBUG-89482
Fixes: QTBUG-89633
Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Change-Id: Ie9c1484c8ad3483da3d559e1703770cdf22cec5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We missed takeBinding as a supported operation on Q(Untyped)Bindable.
To avoid adding version checks to code dealing with QBindableInterface,
we simply synthesize takeBinding as a combination of binding to retrieve
the binding and setBinding with a default-constructed
QUntypedPropertyBinding.
Change-Id: I43803a0dfe210353d0235f0373d2257f75ffe534
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Consider a zero we need to divide with illegal input.
Fixes oss-fuzz 29347
Pick-to: 5.15 6.0
Change-Id: I2aae1d765d2dd81c95d423038ef5cb878d4f8026
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
The test was flaky in recent test runs on X11. Debugging
showed that the global position of the synthesized mouse
events was not correct due to the window not being mapped
properly. Use QTest::qWaitForWindowActive() instead of
QTest::qWaitForWindowExposed() to ensure that.
Task-number: QTBUG-90016
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ie1bc4157e6d0e807d8530f70dcbd27b5e2fc813c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
We were using the first abbreviation in the list, where the current
time's one is probably more apt.
We look up displayName() using ICU, when in use, but that abbreviatio
may be unknown to it. So ensure, when using abbreviation in place of
empty id, that we get the system zone for ICU, for use if we're asked
for the display name.
This is a follow up to b12d6c6a8a.
Pick-to: 6.0 5.15
Change-Id: I177db55de1ffbc763def8a0423642f2b3da74fa6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We have plenty of places where we add some squares and take a square
root; this may be done more accurately and faster by hypot().
Introduce QHypotHelper to handle hypot with more than 3 parameters,
and with 3 when the C++17 version is missing (which it never should
be). Include an overload taking arbitrarily many valus and ensure that
we can use qHypot() with qfloat16. Illustrate with some example uses,
add some tests.
[ChangeLog][QtCore][QMath] Header <QMath> now provides qHypot(), an
implementation of std::hypot() taking arbitrarily many numeric values,
including support for qfloat16, while avoiding the overflow and
underflow problems that arise when naively taking the square root of a
sum of squares.
Change-Id: Ia4e3913fe83fc27d17d8e7f1a52f03ad445c1fed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Fetched from the authoritative source, verified the content matches
that of the current master revision in the github repository.
Amend one cookie jar test to find the last group in the last chunk
correctly - each group arises from a non-empty hsah-table entry, but
the last few hash-table entries may be empty, in which case the last
group isn't just before the last index, it's earlier by the number of
empty hash table entries. In the process, amend this test and the
related test of the end of the first chunk to iterate all the entries
in the group (in the present version, as it happens, each end-group
has just one entry, but that may vary).
Task-number: QTBUG-90214
Pick-to: 6.0 5.15
Change-Id: I6da365a6ca558124f8275e392735071dc77e04bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
No change to QLocale's data, one addition to the Windows time-zone
data. What was formerly "Us Mountain Standard time / Canada" is now
Yukon Standard Time.
Fixes: QTBUG-89784
Pick-to: 6.0 5.15
Change-Id: I4c9a23620e74ea379be8a4c5ba0896d35fe9b594
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Ported all properties, except activeThreadCount. Marking it dirty may
cause a re-evaluation of properties depending on it, which may reault in
a deadlock in case of trying to read activeThreadCount property which is
being marked as dirty.
Task-number: QTBUG-85520
Change-Id: Id073b0895c89a9e6b05b57ad520db994e550a1c9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
- Skip unused metatype id
- Do not construct a QVariant from an int, when we instead want to
construct a QVariant for a given metatype (was: metatype id in Qt 5)
Pick-to: 6.0
Change-Id: I1ac19dec5549b424a9429f69999eaf8e96c022e2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Since qsizetype is signed and the profileSize unsigned, it can turn
negative circumventing the test here.
Fixes oss-fuzz issue 29278.
Pick-to: 6.0 5.15
Change-Id: I1e211c78db6f4ff150613f52d8fc29807f0088ff
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Commit 18fc9e1bf8 introduced a
Windows-only QT_TOOL_PATH_SETUP_COMMAND to make it possible to
call the tool of a module while building the module itself.
The "set PATH=..." command in QT_TOOL_PATH_SETUP_COMMAND was flawed,
because it contained escaped double quotes which made the set command ineffective.
Fix this by removing the escaping of the double quotes.
This was uncovered when porting qtscxml to CMake.
Change-Id: I5909aa841e7895d6d0feb4037a935b805ccfdc99
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
At least some of them don't like the fact we have classes with
non-trivial destructors but trivial move/copy constructors -
disable them explicitly, hopefully those analysers are smart
enough to stop complaining.
Change-Id: I285711a2d21bff89661af928ba326ecd5b69823f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
perf indicates that we spend quite some time in ~QVariant in the
referenced task's benchmark. With this patch, we significantly reduce
the amount of work we do in the destructor for trivial types: Instead of
calling an out-of-line function, which does a few checks and then does
an indirect call through a function pointer to a do-nothing dtor before
freeing the memory, we now simply free the memory.
We achieve this by changing QMetaTypeInterface to leave the dtor
function pointer null if the type is trivially destructible. Then, in
QVariant we use the QMetaTypeInterface directly instead of going through
QMetaType.
Task-number: QTBUG-90560
Change-Id: Iaf87036710e1680323842e1ba703a5d3d0e5027a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the current index is invalid,a placeholdertext will be displayed.
Fixes: QTBUG-90595
Pick-to: 6.0 5.15.2
Change-Id: Id4c6b9c959242b96ee0944b8fc3131a9a2fdcccc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Set the available virtual screen geometry. This geometry is needed for
QEventPoint::normalizedPosition calculation.
Pick-to: 6.0
Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
- Add move constructors to QRegularExpression, QRegularExpressionMatch
and QRegularExpressionMatchIterator.
- Update the documentation to explicitly state that only destructor
and assignment operators can be called for a moved-from object
Task-number: QTBUG-86634
Change-Id: I06b4f54e300541033a9a18339c97338717a06da0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
In QtSetup.cmake the PROJECT_VERSION_MAJOR variable was used to
identify prefix of 'Qt<version>HostInfoConfig.cmake'.
Qt<version>HostInfo is not found, if project version differs
from qtbase version.
Move the 'INSTALL_CMAKE_NAMESPACE' and 'QT_CMAKE_EXPORT_NAMESPACE'
variables to 'QtBuildInternalsConfig.cmake'. In this case
variables will be exposed for a wider list of internal routines.
Use the 'INSTALL_CMAKE_NAMESPACE' variable as prefix to find
Qt<version>HostInfo module.
Fixes: QTBUG-90345
Change-Id: Ic595d1c5beb74f34e69b58e18590a3afc2f346f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Make use of the device pixel ratio in the QIcon paint method so the @nx
hi-dpi pixmaps are selected when appropriate when painting to a
QPainter.
Pick-to: 6.0
Fixes: QTBUG-90042
Change-Id: I53995a2285ef879e3c4fddb9f8da702e256a260f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Replace condition of XCB::XFIXES from the 'XCB_XFIXES_FOUND' variable
to 'TARGET XCB::XFIXES'.
Fixes: QTBUG-89979
Change-Id: I77b8b4046dc6852ecb209d942ee94d864a35c378
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Add CMake upstream(3.20.0) version of FindPostgreSQL.cmake, to avoid
server-related headers lookup.
Avoid using the Qt version of the PostgreSQL module, if it's
older than the CMake's one.
Fixes: QTBUG-89639
Change-Id: I71a0c3508000901969933aea8a08d1ad431db711
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
- Remove indirections via helper functions that did nothing but
redirect.
- Remove unneeded checks of !m_helper in delegate. The helper is
always valid for a delegate.
- Use m_ prefix for member variables, as in the rest of Qt.
- Implement init: as per modern Objective-C recommendations.
- Remove respondsToSelector checks that were not needed.
- Use modern Objective-C property syntax.
- Fix code style issues/formatting.
- Remove unused functions.
- Reorder and remove unused includes.
- Class-initialize member variables.
Change-Id: Iedc084b67bb496b2ef13001a0e6aa46d4574eb57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
None of the APIs used for non-modal operation require NSOpenPanel.
Pick-to: 6.0 5.15
Change-Id: I7ea49a8dad6e724a8a0d4321ea443d4cdcc5a6b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This was a regression from 395e2d9bc4.
The system behavior is to show the menu on press, so we follow that.
This is also documented at:
https://doc.qt.io/qt-5/qsystemtrayicon.html#ActivationReason-enum
Fixes: QTBUG-86518
Pick-to: 6.0 5.15
Change-Id: Ia4dc5356bf0377a9d55f238caf5bf1becd95648d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>