Commit Graph

57192 Commits

Author SHA1 Message Date
Laszlo Papp
a1ca0c99de QProcess: Extend the setStandardOutputFile doc
It seems to be a hidden gem that one can stop redirecting the standard
output to a file without creating a new QProcess instance.

I have discovered this while browsing the private implementation of
QProcess trying to answer this question:

https://stackoverflow.com/a/72989131/2682142

I believe that this should be documented unless it is not meant to be
guaranteed behavior.

Change-Id: I180764d4cc56f6395d6d65942077e3ede63c71ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-23 16:05:38 +01:00
André Klitzing
4fde012a90 Provide more details of failed connection
Otherwise the errorString from qtls_openssl is lost that
would help a lot why a tls connection failed.

"Error during SSL handshake: error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve"

Pick-to: 6.4 6.3 6.2
Change-Id: Iab74b73488219686e5926308db02bc4063818c9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-07-23 09:29:05 +02:00
Thiago Macieira
df0085d3a2 QVariant: do allow non-default-constructible types
So long as you only ask us to copy it. Copying is mandatory, though.

I'll firm up the warning in a later commit, which may not get cherry-
picked as far back.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105140
Change-Id: I3859764fed084846bcb0fffd170432abf65dc197
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-22 12:42:55 -07:00
Thiago Macieira
392566cf61 Revert "Drop call to setPlatformScreen in QHighDpiScaling::setScreenFactor"
This reverts commit 7b2ae3faab.

Reason for revert: this breaks multi-monitor XCB with HighDPI.

Fixes: QTBUG-105079
Pick-to: 6.4
Change-Id: I386c9480c33d1f67b3478332c8e03fe3eeeeee39
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Fushan Wen <qydwhotmail@gmail.com>
2022-07-22 19:42:55 +00:00
Ivan Solovev
5a5bc86028 QT_INLINE_SINCE: take version into account
This patch improves the QT_INLINE_SINCE(maj, min) macro to take
deprecation version into account.
If the specified (maj, min) version is less than or equal to the
version defined by QT_DISABLE_DEPRECATED_BEFORE, the macro will expand
to "inline", and the out-of-line fallback will be removed from the
library.

This is achieved by introducing the helper
QT_IF_DEPRECATED_SINCE(major, minor, whenTrue, whenFalse) macro.

Fixes: QTBUG-104131
Pick-to: 6.4
Change-Id: I285029dad7b71126072b024a3be6d7b11341996d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-22 20:26:56 +02:00
Dimitrios Apostolou
45501f6ca6 Ensure list has elements before getting them
Before a recent fix it would happen occasionally that
lastNormalizedPositions.at(0) would segfault because the list was
empty. The cause of the flakiness was fixed, but make the test more
resilient anyway by checking first the list is correctly populated.

Furthermore on some platforms this check fails:

  qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.8) < 0.05

So instead of QVERIFY use QCOMPARE_LT to print the values when it fails.

Task-number: QTBUG-104268
Change-Id: Id5430eb53c133cf5d23647cfd9749f01f266efce
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-22 19:19:59 +02:00
Dimitrios Apostolou
60f61198f2 Fix test flaky-crashing on OpenSUSE with KDE window manager
Sometimes XCB_EXPOSE event is being propagated twice, once before and
once after qWaitForWindowExposed(). But the window has focus only after
the second expose event. Changing it to qWaitForWindowActive() fixes the
issue.

Fixes: QTBUG-104268
Pick-to: 6.2 6.3 6.4
Change-Id: Ibc78dd4958ed1a4a8d0967b29d2a53457ab9ae8b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-22 19:19:58 +02:00
Harald Sitter
be09628e15 fix AT_SPI_BUS_ADDRESS actually working
the previous invocation wasn't working because QSpiAccessibleBridge
first needs to construct the connection before it can connect to the
enabledChanged signal that gets emitted as part of connectA11yBus,
effectively missing the signal emission because the connection wasn't
established by the time the emit happens. delay the signal emission
through the eventloop so the caller has time to connect to all signals.

https://bugs.kde.org/show_bug.cgi?id=452132

Change-Id: I1cf9fdd824b2c118cc6278b207aaaedeff259bb1
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
2022-07-22 18:21:16 +02:00
Axel Spoerl
2f4204238c Sync and assert StandardPixmap enums in QPlatformTheme and QStyle
Add missing enum values in QPlatformTheme::standardPixmap to sync with
QStyle::standardPixmap changes from:
785d2b9d07
aa5a595a98

Add enum values NStandardPixmap at the bottom of both enums as well
as an assertion in QStyle constructor that these values are identical.
Add omitvalue for NStandardPixmap in QStyle (QPlatformTheme enum is
not documented).

Pick-to: 6.4
Change-Id: I9ee528d032c445bed5aeace716893b2af8367de2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-22 16:52:35 +02:00
Volker Hilsheimer
e79d7f12e6 Update freetype to 2.12.1
ftdebug.c files are new, adapted the import script to copy the source
file for Windows as well.

Replaced the CMakeLists.txt content that was imported from the .pro file
with the respective variables and logic from the freetype CMakeLists.txt
file, which should make it easier to maintain this next time.

Pick-to: 6.4 6.3 6.2 5.15 5.12
Fixes: QTBUG-105032
Change-Id: I1e846167b268df4b1b0a50dcec602def1a0bdcb4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-07-22 14:25:26 +02:00
Kai Köhne
425a6415e7 Doc: Remove non-existing directories from qtxml.qdocconf
Change-Id: Id34d1620ff5beeaee6cc308ea9e8a0a2233febe7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-07-22 13:32:29 +02:00
Kai Köhne
4b31724abe Doc: Document protected variable as internal
Fixes
  qt5/qtbase/src/xml/dom/qdom.h:200: (qdoc) warning: No documentation for 'QDomNode::impl'

Task-number: QTBUG-105091
Change-Id: Ib4341aac7f01878bf63dab07d6905cb1efee5123
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-07-22 11:32:28 +00:00
Marc Mutz
538378f229 Port QCollator/Posix to qsizetype
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-105038
Change-Id: If0cbe82105b753dfebfe1fa1ca7cbd759012e3d5
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-22 13:05:50 +02:00
Marc Mutz
c1991c63fc Fix QString::toHtmlEscaped() for >2Gi character strings
More unfinished int → qsizetype porting.

Fixes: QTBUG-105104
Pick-to: 6.4 6.3 6.2
Change-Id: I3470de31c476b3d7736661550916828e43546573
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-22 11:05:50 +00:00
Ivan Solovev
929bb153ee Partly un-deprecate QMouseEvent::source()
We have deprecated the usage of Qt::MouseEventSource getter in
QMouseEvent::source() since 6.0. However, we have a lot of related
APIs, where the usage of this enum was not marked deprecated. Also we
have a lot of code in qtbase, qtdeclarative and some other modules
that rely on those values.
In most cases using QMouseEvent::source() is the only way to pass
the proper value to the other APIs.

This patch un-deprecates the method, so that we can safely identify
all of its usages in our code, and port away from it.

At the same time, we do not want the client code to use this method,
so documentation still mentions it as deprecated since 6.0.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: I767002aa6dc754fb5a58cf8fbf35774dae9986ed
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-22 09:07:35 +02:00
Ivan Solovev
4b9c738185 QAction: add QT_DEPRECATED_VERSION_6_0 to deprecated methods
And fix all the new warnings.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: I2a5791f495575d71d2344429aca3363f9922e31b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-21 23:12:15 +02:00
Volker Hilsheimer
8fed0a6aa6 Undeprecate QAction::setMenu(QMenu *)
We deprecated QAction::setMenu(QMenu *) in Qt 6.0 because QAction needed
to become part of QtGui, and QMenu is a QtWidgets class. To keep
existing code working, we added a private API operating on QObject *,
and a template overload of setMenu, which allows callers to pass in and
get the object as a QMenu without any change to their code. The
implementation relies on a virtual function in QApplicationPrivate.

This solution might be as good as it gets. Making QAction operate only
on QObject* in the public API breaks exiting widget code, and it is
unlikely that we will come up with a QMenu abstraction that unifies
widgets and Quick UIs without breaking code either.

So, undeprecate the existing solution. If we come up with something
better, we can still deprecate it again in time for removing it in Qt 7.

Pick-to: 6.4 6.3 6.2
Change-Id: I1982b61feb1b1af99f4647e892c5fd74340d9c77
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-21 23:11:58 +02:00
Volker Hilsheimer
a18a88b19b Undeprecate QColor(string) constructors
They are used in a lot of code, deprecating them now just creates noise
and porting effort without adding any value.

For Qt 7 we can remove them if we deprecate them in time for the last Qt
6 release, at which point porting effort is expected anway. Leave a ###
comment behind to that effect.

Pick-to: 6.4
Change-Id: I0a4e78cf1723b02373d23d7cd52783b3f7095428
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-07-21 22:31:59 +02:00
Ivan Solovev
e5a7f021cd Move minimal compiler version checks to qcompilerdetection.h
Task-number: QTBUG-99313
Change-Id: Ia333ef8ee3c26f3511be7953e262aef3a0d7cc6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-21 22:22:13 +02:00
Ivan Solovev
8b029ef142 Do not use QTextFormat::FontFamily when building with QT_DISABLE_DEPRECATED_BEFORE >= 0x060000
The QTextFormat::FontFamily enum is deprecated since Qt 6.0, however it
is still used in the code.

To retain backward compatibility with the old data stream formats, we
introduce a new internal QTextFormat::OldFontFamily enum value, which
has exactly the same value as QTextFormat::FontFamily, and use it
instead.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: Ibf5258b621c2b0aa507005dfe2c1e80c26ddb0d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-21 19:59:08 +02:00
Ivan Solovev
fc172e3093 QShortcut::parentWidget(): Add QT_DEPRECATED_VERSION_X_6_0
And fix the usage that raised a deprecation warning.

As a drive-by: fix the deprecation declaration of QShortcut::id() to
use QT_DEPRECATED_VERSION_6_0 instead of pure Q_DECL_DEPRECATED.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: I5710127864909ce9352c7428e6aabbc89981b8f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-21 19:59:07 +02:00
Ivan Solovev
68ea9c0227 QGuiApplication: do not emit deprecated signals
... when QT_DISABLE_DEPRECATED_BEFORE is past the deprecation version.

This commit actually stops using the deprecated signals when we build
Qt with QT_DISABLE_DEPRECATED_BEFORE >= 0x060000. Otherwise we will
get a compilation error because the signals will be removed.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: Ie513ecc9451bf2d88f80857cf19f3d2b4958d022
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-21 19:59:07 +02:00
Ivan Solovev
24de000a9c QCursor: add missing QT_DEPRECATED_VERSION_X_6_0 for deprecated methods
When the method is wrapped into
 if QT_DEPRECATED_SINCE(MAJ, MIN)
we also need to add QT_DEPRECATED_VERSION_[X_]_MAJ_MIN macro right in
front of the method declaraion, to actually trigger a deprecation
warning.

This patch does that for QCursor's deprecated methods, and fixes all
related compilation warnings in QtBase.

Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: Ic8d059e8c852d4b2dee55e7ea94f4fc7a402cdf4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-21 19:59:07 +02:00
Fabian Kosmale
6a0e59ed50 QVariant: Avoid crash when constructed from unsuitable metatype
If the metatype does not support copy and default construction, then it
it unsuitunsuitable for use in QMetaType. We cannot prevent users from
passing in such metatypes (as we have e.g. a ctor taking QMetaType), so
verify this in customConstruct, and make the variant invalid in that
case.

Pick-to: 6.2 6.3 6.4
Change-Id: Ib1f0149c8fb9a1cce0049fd0311980754cc85d1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 08:37:34 -07:00
Tor Arne Vestbø
030923c0de Add -Wshorten-64-to-32 to headersclean
Fix existing warnings by casting to the appropriate type.

Change-Id: Ic44d2a71e1a2e508199dbb46bea7a19e183ec42c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-21 17:14:08 +02:00
Assam Boudjelthia
c1086e1fa7 Android: document the supported clipboard mimetypes
Fixes: QTBUG-82477
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: I31a48acbf5cadc18dfe1fe9a54243b710f4f280c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-07-21 14:54:25 +00:00
Marc Mutz
db09fec6a1 QByteDataBuffer: avoid silent failures of read(n)
On 32-bit platforms, the user can ask for more than INT_MAX bytes to
be returned from read(n), by way of its qint64 argument. We can, of
course, not return so much data because allocation would fail, so fail
early, by detecting this situation and do what resize() would have done
if it was not for the narrowing of its argument: throw bad_alloc.

Reviewers may ask themselves whether byteAmount(), which already caps
the request, would not have physically limited the request size to
INT_MAX, since we cannot possibly hold more data than that on 32-bit
platforms. But this is not correct, since QByteDataBuffer is
essentially a list of QByteArrays, and those can be shared copies of
each other (which isn't uncommon, if you consider how a user of the
class may be piecing together data by reusing existing QByteArrays).

The read(n) and readAll() functions are already documented to be
inefficient and should-not-use, we may want to remove them in the
future to force users to think about this problem in the context of
their domain.

Pick-to: 6.4
Change-Id: Ia152db0a1fc65bbef35acd463f12fba1b7726d4a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-21 14:54:25 +00:00
Fabian Kosmale
2d6ca88512 QMetaType: fix documentation
The doc comments were missing the classname, and therefore did not show
up in the correct places.

Pick-to: 6.4 6.3 6.2
Change-Id: I23a56356dcad862e2fe1f6f8c3da2f39852b80c7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-21 15:07:22 +02:00
Fabian Kosmale
c15489579e Purge Q_DUMMY_COMPARISON_OPERATOR usages
It is a noop on all our supported compilers.

Task-number: QTBUG-105098
Change-Id: Ic59d4c86d96ea29a5513d778ddd35df8c7a6877a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-21 14:26:02 +02:00
Samuli Piippo
18ed6a8979 CMake: prepend build dir for examples build
In cross-compilation, the CMAKE_FIND_ROOT_PATH will have path to the
host Qt and examples build will pick up wrong Qt6Config.cmake unless
the build dir path is prepended.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-104270
Change-Id: I7fc7499369a2e5446e1c5257155f81c72716fef7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-21 11:54:47 +02:00
Kai Köhne
65d9593413 Examples: Use signals, slots instead of Q_SIGNALS, Q_SLOTS
Pick-to: 6.4
Change-Id: I79a352d1bac11edf2d2b0443d2f1bb202fb4e254
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-21 11:24:36 +02:00
Kai Köhne
5961dbc0e2 Doc: Hide template magic for MSVC from documentation
QT_POST_CXX17_API_IN_EXPORT_CLASS (introduced in commit e996253774)
works around a deficiency of MSVC by marking affected methods as
templated. Anyhow, this doesn't need to be reflected in the
documented API.

Pick-to: 6.4
Change-Id: I9d5dd8b979a84f2fecc582613c2e944bb33eb790
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-21 11:24:36 +02:00
Nicholas Bennett
fc5482cac6 Support pinch zoom gesture in the Mandelbrot example
Used QGesture for this as per the gesture example.
Moved the help and info text to separate lines.
Enabled word wrap to prevent text going off screen.

As a drive-by, the code to center the window at a size that's a fraction
of the screen is replaced with a simple sizeHint() override. The user
should have control over placement, particularly now that it should be
placed manually onto a touchscreen if the user has one.

Done-with: Shawn Rutledge
Fixes: QTBUG-96702
Pick-to: 6.4
Change-Id: I8dba8b09bed474f585341e9a7a8c71fb60293eee
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-07-21 08:38:44 +03:00
Thiago Macieira
eb9ace1cee QVariant: add missing const to QMetaTypeInterface pointers
They're ALWAYS const objects, though they also chock full of relocations
so they are never in read-only sections of memory (except maybe in final
executables that are position-dependent).

These are methods in a private sub-class of QVariant. No one outside of
QtCore (at least qtbase) should be using them directly. QVariant doesn't
have many friends (a bit anti-social); the one that matters is
qvariant_cast and that one does access QVariant::Private. This is not a
BC problem because QVariant::Private::type()'s signature is not
changing. In any case, QVariant's Q_CORE_EXPORT does not apply to
QVariant::Private anyway (see [1]).

[1] https://msvc.godbolt.org/z/r9cer8eWh

Pick-to: 6.3 6.4
Change-Id: I3859764fed084846bcb0fffd17035355f823dc8f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-20 14:57:32 -07:00
Thiago Macieira
48675dfa33 CMake: disable auto-detection of no_direct_extern_access
The feature is not ready for prime-time. Too many linker bugs have been
found, Clang hasn't finished implementing it, and the status of gold and
lld are simply unknown.

Task-number: QTBUG-105002
Pick-to: 6.4
Change-Id: I3859764fed084846bcb0fffd1702fead133a9a96
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 14:54:22 -07:00
Thiago Macieira
2221b25dac CMake: add one more test for no_direct_extern_access
Found while compiling qtdeclarative tests:

FAILED: qtdeclarative/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen
[...]
ld: qtdeclarative/tests/auto/qml/qmlcppcodegen/data/TestTypes/libcodegen_test_moduleplugin.a(codegen_test_moduleplugin_TestTypesPlugin.cpp.o): non-canonical reference to canonical protected function `_Z28qml_register_types_TestTypesv' in qtdeclarative/tests/auto/qml/qmlcppcodegen/data/libcodegen_test_module.a(codegen_test_module_qmltyperegistrations.cpp.o)
ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

See https://sourceware.org/bugzilla/show_bug.cgi?id=29377

Pick-to: 6.4
Change-Id: I3859764fed084846bcb0fffd1702fe6da341a9e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 14:54:21 -07:00
Thiago Macieira
396170d07b CMake: fix the word order in "no_direct_extern_access"
And take the opportunity to remove the "m" in the qmake feature name and
.prf file.

Pick-to: 6.4
Change-Id: I36b24183fbd041179f2ffffd170224ab75cdd968
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 14:54:20 -07:00
Thiago Macieira
78ef9e9d14 Fix attempt to use -mno-direct-extern-access with Clang
Clang has the option, but spells it differently.

Fixes: QTBUG-105002
Pick-to: 6.4
Change-Id: I36b24183fbd041179f2ffffd170217e82ff6d14d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 14:54:19 -07:00
Alexandru Croitor
552605b0fc CMake: Rename test to tst_gui_variant_no_application
Coin test collector expects tests to start with the tst_ prefix.

Pick-to: 6.2 6.3 6.4
Change-Id: I5cd49bf75fddc121fdfbde80d8a24a6110098011
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-20 16:51:19 +02:00
Yuhang Zhao
4fbb7db08c CMake: Update description of LTCG
Use the full name of LTCG to make it clearer to the user.

As a drive-by, also remove the "Intel" word from the
CET feature's title, according to MSVC & GCC's manual,
they don't contain "Intel" in the feature title either.

Change-Id: I099ba6c5e7470b5699c1ab6b3c4ef2a4bf084580
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 19:16:00 +08:00
Yuhang Zhao
ce9799e4c4 MSVC: Fix the CET parameters
To enable CET for MSVC, only passing "/CETCOMPAT" to
the linker should be sufficient.

Enabling generation of EH Continuation (EHCONT) metadata
is additional protection and should not be necessary.
It also requires all the dependencies to be re-compiled
with EHCONT enabled, otherwise the linker will refuse
to link the obj files. However, this is rather hard
to achieve if your application depends on many 3rd-party
libraries, so to let people enable CET more freely,
we don't enable EHCONT guard by default.

Pick-to: 6.4
Change-Id: Iba08a5ec56c474d291991fb751a0de764719bd85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-20 19:16:00 +08:00
Shawn Rutledge
dcc691c77d Add qt.pointer.dispatch debug message for tablet->mouse synth
We have one for touch->mouse synthesis, so perhaps it's a good idea here
too; then we can confirm that it's missing on Windows, because Windows
normally does the synthesis (setPlatformSynthesizesMouse(false) is not
called on this platform, so the default is true, meaning we expect that
it does that). The cross-platform synthesis (and ability for a platform
plugin to disable) began with f931e5e72d

Pick-to: 6.4
Task-number: QTBUG-102764
Change-Id: Ic6913adbeb6b91e3953ddfe8b401975d95cd9af3
Reviewed-by: Doris Verria <doris.verria@qt.io>
2022-07-20 13:16:00 +02:00
Shawn Rutledge
8824a4e19c Fix Wacom proximity on xcb again
Amends 8e506fdd29

Also remove the lcQpaXInputEvents().isDebugEnabled() check to ensure
that the qCDebug output is emitted. It was meant as an optimization, but
skipping of printf-style qCDebugs when the logging category is disabled
is efficient enough.

Pick-to: 6.3 6.4
Fixes: QTBUG-104875
Change-Id: Id8dc710a8fdb596ddce70380a577205fc52df4cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-20 13:15:59 +02:00
Sona Kurazyan
90f3e1d349 Move the docs for porting to QRegularExpression to a common place
Copy them from QRegExp docs in qt5compat to
doc/global/includes/corelib/port-from-qregexp.qdocinc, so that the
porting docs can be included from both Qt 6 porting guide and qt5compat.

Task-number: QTBUG-89702
Pick-to: 6.4 6.3 6.2
Change-Id: I616e2333f60f36e4851398479939fd062016748d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-20 13:15:59 +02:00
Sona Kurazyan
93f7291387 Include the QRegularExpression porting docs in Qt 6 porting guide
The instructions for porting away from QRegExp to QRegularExpression in
the Qt 6 porting guide were mostly copied from the similar docs for
QRegExp, which are moved to
doc/global/includes/corelib/port-from-qregexp.qdocinc. The later now
covers everything that the docs from porting guide did and doesn't have
the issues listed in QTBUG-89702.

Remove the old docs and include the docs from doc/global/includes
instead.

Task-number: QTBUG-89702
Pick-to: 6.4 6.3 6.2
Change-Id: Ifdb79d5775bc0cadd02c21299d58adb27ae13337
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-20 13:15:59 +02:00
Sona Kurazyan
581a342a3c Add \brief descriptions to QtConcurrent topics
Fixes: QTBUG-104213
Pick-to: 6.4 6.3 6.2
Change-Id: Ib787546ef74133aca4b963a4341283147d2e8fb2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-20 13:15:59 +02:00
Alexandru Croitor
5afb5fb8e0 CMake: Rename test to tst_qobjectrace
Coin test collector expects tests to start with the tst_ prefix.

Pick-to: 6.2 6.3 6.4
Change-Id: Idc991273bacc41b62dbbf70f2ae0f3e712d34ab6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-20 13:15:59 +02:00
Sona Kurazyan
7afb093dd7 QtConcurrent::ReduceKernel: fix race conditions
resultsMapSize is modified inside the runReduce() method, and the
writes are protected via mutex lock. However, reads of resultsMapSize
through shouldThrottle()/shouldStartThread() (that can be called by
multiple threads) are done without a lock. Added the missing locks.

Task-number: QTBUG-104787
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I700e7b66e67025bc7f570bc8ad69409b82675049
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-20 13:15:58 +02:00
Marc Mutz
87fabf3e4b QLocale/Win: fix truncation bug in winIso639LangName()
The qstrtoull() function returns ulonglong, not int, so we'd be
incorrectly detecting 0x1'0000'0814 as NyNorsk. Paranoia? Sure.

Fix by using auto to hold the result.

As a drive-by, make the QByteArray const so .data() doesn't
attempt to detach(), and shorten a long variable name to stay
within line-length limitations.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103531
Change-Id: I740d0c5934e54c9f716688fa9c00de0ac4029936
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-20 11:15:58 +00:00
Marc Mutz
1a40bc37d4 QLocale/Win: replace 0 with nullptr in winLangCodeToIsoName()
The function returns a pointer, not an integer.

Found while working on QTBUG-103721.

Change-Id: I18a9987d99c645a5b410c4b11128bfebcc5dcddd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-07-20 13:15:58 +02:00