On Windows, and possibly other platforms, a touchpad can send a mouse
button press followed by an unexpected mouse move event to the same
coordinates, before sending a mouse button release, which may confuse
applications. Before the enhanced mouse event processing was added, the
code in QGuiApplication was responsible for deducing the mouse event
type and other info, and in the process performed a checking that
discarded events that did not change state. The enhanced mouse
processing code lacked this checking. This change adds an equivalent
checking to the enhanced mouse event processing.
Fixes: QTBUG-85431
Pick-to: 5.15
Change-Id: Ie3e2ae8cbf9870d465dfd2c8808942dd6fc647d2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The comment claims it is needed for "the deprecated
QHash::iterator::operator--()", which has been removed already.
Change-Id: I90f5abdcd14e6cac4ed7144e96eb26bf34477391
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Implement the static parts of QWindowsWindowFunctions.
Move some things around and make them static in tablet support
to make this easier.
Task-number: QTBUG-83252
Change-Id: I24c3b0b3c6548eb96c4f3285a4e46385a1e79ef5
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We don't want to print the QString as represented by the debug
operator, but instead want to expand line feeds and other character
codes as normal.
Change-Id: I7261d8f94e7b4382733f06eb22f9a740a5c0488f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Before 0a93db4d82 we would polish the
application palette even when it was the default palette, as we
always recreated the system palette each time a style was set.
After the change we skipped polishing the palette unless it was set
by the user, under the assumption that the style would set its
own default palette if it wanted to override the system palette.
This turned out to break the style's ability to slightly tweak the
palette via polish (versus the more full on standardPalette approach).
We now polish both the default palette and user palettes, and we do
so as part of the normal palette update logic. This ensures that
the style also gets a chance to polish the palette when the platform
theme changes.
The polish will not have an effect on the resolve mask of the palette,
as the polish is conceptually the same as a base palette, and should
not affect e.g. Qt::AA_SetPalette.
Fixes: QTBUG-85469
Fixes: QTBUG-85188
Pick-to: 5.15
Change-Id: I869e9c442b177de4f1dc49eb75220709306f4d12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
toArgb32 was leaking an SSE4 instruction when not inlined.
Pick-to: 5.15
Change-Id: I5df87bc7343f4ec40881a0aedd6f066323143817
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
src/corelib/text/qstringconverter.h:160:54: error: no matching constructor for initialization of 'QStringConverterBase::State'
src/corelib/text/qstringconverter.h:72:19: note: candidate constructor not viable: no known conversion from 'QFlags<QStringConverter::Flag>' to 'QFlags<QStringConverterBase::Flag>' for 1st argument
src/corelib/text/qstringconverter.h:75:9: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'QStringConverterBase::State' for 1st argument
src/corelib/text/qstringconverter.h:108:24: note: candidate constructor not viable: no known conversion from 'QStringConverter::Flags' (aka 'QFlags<QStringConverter::Flag>') to 'const QStringConverterBase::State' for 1st argument
src/corelib/text/qstringconverter.h:159:32: warning: constexpr constructor that does not initialize all members is a C++20 extension [-Wc++20-extensions]
src/corelib/text/qstringconverter.h:187:11: note: member not initialized by constructor
src/corelib/kernel/qproperty.h:403:14: error: deduction guide must be declared in the same scope as template 'QProperty'
src/corelib/kernel/qproperty.h:202:7: note: template is declared here
src/corelib/kernel/qproperty.h:403:14: error: deduction guide declaration without trailing return type
src/gui/painting/qregion.h:139:5: error: unknown type name 'HRGN'
src/gui/painting/qregion.h:140:29: error: unknown type name 'HRGN'
Change-Id: I3c195a60ceeb51664368a4aeef90c70c31954fc3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Sometimes the info we show in the configure summary might differ from
the information that CMake computes.
To more easily debug and fix such cases, print out various CMake info
variables like host and target info, compiler versions, sdk versions,
etc.
Change-Id: I37a11dfabe5369236af78684a09bd3cec3fdd398
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
There was an inconsistency where configuring qtbase on Apple Silicon
with the following command line produced different results rom the
second variant.
$ cmake ../qtbase -DCMAKE_OSX_ARCHITECTURES=arm64
vs
$ CMAKE_OSX_ARCHITECTURES=arm64 cmake ../qtbase
That happened because the CMAKE_OSX_ARCHITECTURES variables was not
passed to project-based try_compile calls. This resulted in compile
tests like SIMD avx to succeeded on Apple silicon, which shouldn't.
To address that, always pass the architecture on macOS if it's
specified.
Change-Id: Ia12e86230cc6e5e11f387e3cbb273d90646ef2e3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Qt6 package was not found the tests were configured in-tree as opposed
to standalone tests.
Use the same trick we do for building examples in-tree.
Specify the path to the build tree packages, and don't create targets.
Amends 96e3ee0659
Change-Id: Ia60de416ce0afff5bd40be8c0c6e3c7898fd7ebf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
They should not clutter the "public" QPA headers that clients
use to implement new platforms, and having them in the private
headers allows us to check for private configure features.
Change-Id: Ib4b4db96c086d81bb5810392c7c8922fc5b4950d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Since 5.0, registerTimer() without a timer type; and filterEvent(void *)
Change-Id: Id50c2daaf7b144ec403351d0fc50111272b34521
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
They've been no-ops since (at least) 5.12.
At the same time, save future readers the need to git blame to find
out how long the other deprecated enum name is.
Change-Id: I2081ba2859c6540651b6f6807cc6bd59890bfce5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Since 5.8: setHidden(), isHidden()
Part of the QCommandLineParser test also used setHidden().
Change-Id: I05a1c63ff3beb1167ed75632c1b71d7fff17f09e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since 5.0: QUrl's image of the QUrlQuery API
Remove deprecation-suppression from tst_qurl.cpp, too.
Change-Id: Ide826283cb4e177fb34fb4080502f5a4620bd5d7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Since 5.3 joining() and old Joining type
Replaced by JoiningType joiningType()
Change-Id: Iefee50aaf94cec6d67b5fc004b3e68357b2015c5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Hardcode the tests which were previously scanned from the source.
See qtbase/24e83de8d1924b8003c84f1df05b7befea2c5120.
Change-Id: I8fb05568977f86726b20948a9c2d1cfce5cba161
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data
qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data
qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
At the moment it just exposes QTBUG-84676, that is, OpenSSL
and non-OpenSSL backend act differently. Went a bit overkill
in making it data-driven, so if someone wants to add more
samples it should be easier to do so.
Change-Id: I96538c9563d12d69c217415ba85e244dda5e0cd0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If QSslConfiguration::setCaCertificates is set to empty list openssl
cannot verify the OCSP-Response.
Qt will provide it as QSslError::OcspResponseCannotBeTrusted that can be
ignored. But the openssl error is still in the error queue and prevents
a successful reply in QNetworkReply::finished.
So let's clear the queue after OCSP checking to avoid side affects.
Change-Id: I44a7f45a2eebd20ea86a235a0534f80986c40a26
Fixes: QTBUG-85638
Pick-to: 5.15
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
OpenSSL 1.1.1 has a convenient function for parsing ASN.1 times;
use that instead of the hand-rolled code.
Change-Id: Ic0aecc915f362c02b220819305f3f3c347a75297
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This only arises when the system locale tells us to use its zero as
our zero digit, since no CLDR locale uses it by default. Adapt an
MS-specific QLocale::system() test to use Suzhou numbering, so as to
test this.
While updating the locale-restoration code to also restore the digits
being set in that test, add restore code for the long time format,
where previously only the short time format was restored. Add a
comment to make it less likely one of those shall be missed in future.
Fixes: QTBUG-85409
Change-Id: I343324bb563ee0e455dfe77d4825bf8c3082ca30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adds a namespaceURI parameter to the following methods of QDomNode:
firstChildElement(), lastChildElement(), nextChildElement() and
previousChildElement()
Those methods can now be used to filter for elements with a specific
namespaceURI without the need to use QDomNodeList.
[ChangeLog][QtXml][QDom] Added namespaceURI parameter to browse methods
like firstChildElement() to filter for elements with certain namespaces
without the need of QDomNodeList.
Change-Id: Ic2cfe8c6d5d5f6b5fcf27165df15bce54ad0f23a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The tests/auto/cmake project can be configured separately as a
standalone project with qt-cmake, or as part of the overall qtbase
standalone tests.
To do that a bunch of things were done
- Ported all Qt5 strings to Qt6
- Replaced in all projects the use of add_definitions and
include_directories with a target based approach, except for 2 tests
where we check that the old-style approach works, otherwise the
tests would file
- Removed some (possibly unneeded) EGL / OpenGL tests
- Fixed some C++ code
- Added setup code to tests/auto/cmake/CMakeLists.txt to figure out
which modules are available and should be tested
- Fixed Qt6CTestMacros.cmake to be loaded by Qt6Core
- Removed the CMake tests to not be run in qmake builds of Qt because
they would fail anyway
- Enabled the CMake tests to be part of standalone tests
- Disabled auto-passing of the C and CXX compiler cache vars when
cross-compiling so that the tests can somewhat pass on boot2qt.
This is the issue we encountered in
e2b2cd9397
- Ultimately disabled tests for boot2qt, because the -rpath-link
flag is not generated by CMake for some reason.
- Added code to setup the environment when running an executable that
was built as part of the test, so that the proper Qt libraries are
found. This handles both the standalone tests case and separate
project case.
The remaining unported tests are test_import_plugins which requires
quite a bit of work to get some modules and plugins built that were
done as part of the qmake .pro files, test_plugins that checks
some Network plugins which I'm not sure about, and
test_add_big_resource which doesn't work with namespaced builds
and there's no good way of detecting those at the moment either.
Change-Id: Ic8809c72817d1db81af6c6014c11df6473ad8c75
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This change provides the following per-module variables
Qt6Widgets_LIBRARIES, Qt6Widgets_INCLUDE_DIRS, Qt6Widgets_DEFINITIONS,
Qt6Widgets_COMPILE_DEFINITIONS, Qt6Widgets_PRIVATE_INCLUDE_DIRS.
These are deprecated and are only intended for easier porting from
Qt5 to Qt6. Qt consumers should instead rely on the Qt module targets
e.g target_link_libraries(app PRIVATE Qt6::Widgets)
Note that the variable contents includes transitive values for
everything except the _LIBRARIES variant. So Qt6Widgets_INCLUDE_DIRS
will contain values for Widgets, Gui and Core.
Qt6Widgets_LIBRARIES only contains a value like Qt6::Widgets, and when
that is used in target_link_libraries(), CMake will take care of the
transitivity.
Change-Id: I625e25aab7ba5eaf14de1dc76ba2a1a0c85e6226
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Each module package needs to first find the Qt6 package to ensure
that all the necessary info is setup for further depedencies to be
found.
Task-number: QTBUG-81672
Change-Id: I3ee608d24c1efbb63a063261fb36341bf52fb78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Expand the getSetCheck to include all properties, and add a test to
verify the fallback logic for the tooltip property.
Use the meta object system to set and check properties in the
tooltip-test to verify that things don't break when migrating to
the new property system.
Change-Id: I56355e8b436ede46701a124a9241ed26d2c706c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fix:
src/widgets/dialogs/qwizard_win.cpp:515 C4996: 'QMouseEvent::globalX': Use globalPosition()
src/widgets/dialogs/qwizard_win.cpp:529 C4996: 'QMouseEvent::globalX': Use globalPosition()
src/widgets/dialogs/qwizard_win.cpp:544 C4996: 'QMouseEvent::globalX': Use globalPosition()
and add missing High DPI scaling for the native event on this occasion.
Change-Id: Ib9a8ab0b3419fa0435eba38401b91c445acdb7bf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Make sure to init tagsDone from constructor.
Avoid relying on QXmlStreamReaderPrivate::init().
Change-Id: I40c08dd370b0ad519e2d6ebc23b8a906c836508e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Allows defining multiple static plugins in the same translation unit.
Change-Id: I175fd4980b21a461a18c23ed1a62a3cea73e67a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QEasingCurve has a richer variety of curves and curveShape was already
implemented by changing the easingCurve property.
[ChangeLog][QtCore][QTimeLine] Deprecated QTimeLine's curveShape
property in favor of the easingCurve property.
Pick-to: 5.15
Change-Id: I7261c0f24d7e02bc94624f0b74d699df62de1a52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
As they are protected, they need to be excluded from the Python
bindings, which is best done by a pattern.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I667aa3b8e229e11b3b46635adfddbd62ce4747c1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>