The only users of more than one read- or write channel are the SCTP
code and QProcess. SCTP being pretty rare, optimize for the common
case of at most two QRingBuffers for reading (QProcess) and one for
writing. Even with more channels, QVLA shouldn't be slower than QList
- on the contrary.
Need to adjust tst_toolsupport and TypeInformationVersion, as
QFilePrivate::fileName has changed.
Pick-to: 6.3
Change-Id: I3baf982ba1f4dc51463be8730e414f6164072d8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QApplication hides the fact that the reason is never set by several
QPA plugins, but Quick items don't receive the correct reason on
Windows, Android, the offscreen plugin, and other platforms.
Add relevant scenario to the QFocusEvent test case, and fix the
plugins to always set the focus reason when handling window activation
changes. Exclude the minimal plugin from the test, it seems largely
unmaintained anyway.
Task-number: QTBUG-75862
Change-Id: I5404a225b387fc9a3851b6968d0777c687127ed1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Introduce a TRY_EXPECT macro that uses qWaitFor, and use it whenever
EXPECT was used after a call to processEvents.
Fixes: QTBUG-94036
Pick-to: 6.2 5.15
Change-Id: Ia935444d529c2798637bf9b4a56e47a8dc9d75d2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
In preparation for addition of new baseline tests, establish a new
test category, "baseline". This is similar to the category
"benchmarks" in that it contains tests that use the QTest framework,
but conceptually are not unit tests, in contrast to those under auto/.
Move the existing QPainter baseline test, tst_lancelot, into this new
category, and rename it accordingly.
Baseline tests use the QBaselineTest extension to QTest. Move that
extension too into the tests/baseline directory, allowing the clean
out of the baselineserver directory.
Pick-to: 6.2
Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Antialiasing is disabled when the painter's antialiasing attribute
is set behind the clipping function(example `setClipPath` or
`setClipRegion`). The cause of this problem is that the
antialiasing state of the clipping region is not updated after the
antialiasing attribute is set.
A variable is required to record the painter's transformation state
set before the clipping function, because the transformation will be
applied to the clipping region, resulting in the abnormal clipping
region. The value of `s->matrix` is not accurate for the clipping fun-
ction.
Pick-to: 6.2
Fixes: QTBUG-97269
Change-Id: I409a9db32efc3b991ebb97ec9aed19bbddb273d8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
- getgid/getpwuid are not supported
- process should be used with config check
Task-number: QTBUG-96176
Pick-to: 6.2
Change-Id: Ib6854772bcf52f3533cb722f963426717926258b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Utilizes the native pdf renderer of macOS, so the test is only enabled
on that platform. As the PDF generation should be platform independent
anyway, this should not matter.
Pick-to: 6.2 5.15
Change-Id: I8b6b70562d1f24fdb77795aa7eb5843279aaae85
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- process environment/DNS are OFF for INTEGRITY
Task-number: QTBUG-96176
Pick-to: 6.2
Change-Id: I189a97f88c96a428586c31a66b8d250e04482900
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe
Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add painting of sets of lines, both connected and unconnected, that go
outside the device area.
This prepares for fixes & improvements in the painting code.
Pick-to: 6.2 6.1 5.15
Change-Id: I9cffc760524e9ade42362c9a04949270ac24180f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Remove SRCDIR defines from tests that don't use them. There is a
standard define called QT_TESTCASE_SOURCEDIR that is available to all
tests and serves the same purpose.
Pick-to: 6.2
Change-Id: I2aa237739c011495e31641cca525dc0eeef3c870
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QFont should be constructed with a list of font families.
Pick-to: 6.2
Change-Id: I61141b25d3f6e25f4fea141acbfa8e164d7af58f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The QtTest best practices documentations recommends using output
mechanisms such as qDebug() and qWarning() for diagnostic messages,
and this is also what most of our own tests do.
The QWARN() macro and corresponding internal QTest::qWarn() function
was added when QtTest was first implemented, but was likely meant as
an internal implementation detail, like its cousin QTestLog::info(),
which does not have any corresponding macro.
This theory is backed by our own QtTest self-test (tst_silent)
describing the output from QWARN() as "an internal testlib warning".
The only difference between QWARN() and qWarning(), besides the much
richer feature set of the latter, is that qWarning() will not pass
on file and line number information in release mode, but QWARN() will.
This is an acceptable loss of functionality, considering that the user
can override this behavior by defining QT_MESSAGELOGCONTEXT.
[ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning()
Pick-to: 6.2
Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This does not fix all data races that we have in the system yet.
One major issue is the virtual disconnectNotify(), that can be
called from any thread and thus is inherently problematic, as it
can collide with the object getting destroyed at the same time
in another thread.
Pick-to: 6.2 6.1 5.15
Task-number: QTBUG-88248
Change-Id: I9d841eb363b7e4f0de1657aeb8f5340d0fd55190
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Useful for some HDR representations and HDR rendering.
Change-Id: If6e8a661faa3d2afdf17b6ed4d8ff5c5b2aeb30e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
While at it, move tst_android under corelib/platform/android.
Change-Id: Icf91cd75cb5e04d03fe6a81d52fba52a485ca41f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Extended QObjectPrivate::ExtraData to store a pointer
to its parent, and reimplemented qGetBindingStorage()
function for QObjectPrivate::ExtraData.
This allows to use Q_OBJECT_COMPAT_PROPERTY macro
for a property, stored in QObjectPrivate::ExtraData
and solves all the problems with calling a custom
setter.
Task-number: QTBUG-85520
Change-Id: I40e01c29430846359ef9160fa1ae97c702be9a18
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
pro2cmake did not take into account the
QT -= qt
bit of the .pro files.
Fixes: QTBUG-91676
Change-Id: If1373ee966312e4246490bd7389d75be9fa739cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When stroking a dashed path, an unnecessary amount of processing would
be spent if there is a huge number of dashes visible, e.g. because of
scaling. Since the dashes are too small to be indivdually visible
anyway, just replace with a semi-transparent solid line for such
cases.
Pick-to: 6.1 6.0 5.15
Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
These are also failing in RHEL 8.2
Task-number: QTBUG-52523
Change-Id: I1448124376a2b415351d1a755043431050808e38
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
The test is blacklisted in dev and 6.1, let it fail properly. We can
watch the history of the test and remove the blacklisting if/when it
passes consistently on supported macOS versions.
Pick-to: 6.1
Task-number: QTBUG-20984
Change-Id: I3211ecf565995578c83a092c637890c0e8bfd766
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
These two tests (applicationTest() and mainWindowTest())
require QApplication::setActiveWindow() to work, which it
does not on Wayland.
Task-number: QTBUG-91418
Change-Id: I0e7b4e24050684b437de63d19bd885bab53d36b9
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
The emulation detection has been usable only on qtbase tests, move it to
QTest so that it can be used in other modules as well.
Pick-to: 6.1
Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
gcc 9 consumed enourmous amounts of memory building the test, regularly
dying on a VM with 4GB RAM. Splitting it up helps.
As a drive-by, use inline static variables, and rename the header used by
other tests to tst_qmetatype_common.h.
Change-Id: Ib716d8e3506aac6c87845e57b04cb1a4f6c68387
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It fails on 10.15 and 11, preventing those from being significant,
and the test is already marked as expect-fail based on QTBUG-20984.
Task-number: QTBUG-20984
Change-Id: I6911166a1c3e9173d6d36f2a3a68b37778fd3406
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Previously it only returned checked or unchecked for a tri-state
checkbox.
Fixes: QTBUG-84616
Pick-to: 5.15 6.0 6.1
Change-Id: Ife72098e35f8295fd389bda232de5478ffa7e87f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
RGB10 internal texture format is not supported on GLES, use RGB10_A2
instead.
Pick-to: 6.0
Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Those serve no purpose anymore, now that the .pro files are gone.
Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Remove the qmake project files for most of Qt.
Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.
Also leave the qmake project files for utils and other minor parts that
lack CMake project files.
Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The alignment has been recently updated but never correctly tested,
as test has either been disabled or marked as insignificant.
Change-Id: If6e529c290b2057f58c3b27c89279d9e90728ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.
Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Apparently some library definitions went overboard, link them directly.
Pick-to: 6.0
Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
And inline the fast checks inside the methods in QBindingStorage.
This allows QObjectBindableProperty and friends to inline all the
fast checks and almost completely eliminates the overhead for property
accesses when no bindings are being used.
Read and write times of QObject based properties when no bindings
are being used:
Read Write
Old style property: 3.8ns 7.3ns
QObjectBindableProperty (no notification): 4.5ns 4.3ns
QObjectBindableProperty (with signal): 4.5ns 7.6ns
QObjectBindableProperty (inline accessors): 3.2ns 3.4ns
Numbers without this patch:
Old style property: 3.8ns 7.9ns
QObjectBindableProperty (no notification): 7.2ns 7.7ns
QObjectBindableProperty (with signal): 7.2ns 16.0ns
QObjectBindableProperty (inline accessors): 6.3ns 6.7ns
Change-Id: Ifd1fa3a489c3be8b1468c0b88af547aac397f412
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 98c82fb445acf45cc4c4bc86a5adda43358127bf)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We want to re-enable Android tests in QTQAINFRA-3867. However,
many tests are failing already preventing that from happening.
QTBUG-87025 is currently keeping track (links) to all of those
failing tests.
The current proposal is to hide those failing tests, and enable
Android test running in COIN for other tests. After, that try
to fix them one by one, and at the same time we can make sure
no more failing tests go unnoticed.
Task-number: QTBUG-87025
Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Our tls certificate/key are a bit on the old side and need to be
updated. But for now let's lower the openssl level. In this case openssl
complains about the server's key used for DHE being too short.
Task-number: QTBUG-86187
Change-Id: I142a7d52f7599f60b8f4f3ff3ac5ce61fed06b4c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Use QScreen APIs instead.
Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.
Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.
Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
These were now always defined, hence redundant.
Leave the #define in place so that we can verify we actually do always
define it, in a #else of an existing #if check on it.
Change-Id: Iea4c3dbc8f9982268bcf81da5ef17fe2ebf5c462
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove around 1000 compiler warnings about missing overrides
in our auto tests.
This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.
Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The qmake parser of pro2cmake handles completely commented lines to make
assignments like this work:
SUBDIRS = \
foo \
# bar \
bar
However, assignments like
SUBDIRS = \
foo \
#bar \
bar
were cut off at the commented line.
Fix this by allowing leading whitespace for "fully commented lines".
Change-Id: Ib5de850a02fd9b9ebb7c056c2f64f9d684334b08
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QBindingStorage is a class that can store a set of binding objects
for the properties of a QObject. This will get used to reduce the
memory overhead of the property system when adding bindable properties
to QObject based classes.
The binding storage has a pointer to the TLS entry containing the
currently evaluating binding. Like that we avoid repeated TLS
lookups and reduce the overhead of the property system to one
pointer lookup and one compare for the case that properties
aren't being used.
Each QObject now owns one binding storage object, that can be used to
store binding data for properties that members of the QObject.
Change-Id: I27427c03c2ba281f072e074be96147bdbcaac246
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When a signal/slot connection is activated, a lock on the receiver
object is taken (to be sure it doesn't get destroyed).
The path for blocking queued connections however took the lock on
the sender by accident, fix that.
Pick-to: 5.15 5.12
Change-Id: I8cd938a50eca2bf71e7bfb86768ee0c8431afdfa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
warning: all paths through this function will call itself [-Winfinite-recursion]
Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test explicitly asks for a non-native file dialog, which works on
macOS as well.
Change-Id: I964c6d98501b4207c2b6c2ce1df39f654c801a43
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This doesn't give useful defaults on all platforms; icon themes are not
provided on platforms other than Linux, and the mime database doesn't
always return user-friendly names based on file names.
However, both icon themes and the mime database can be customized by
application developers by shipping a data file side-by-side with the
application, without the need for reimplementing the provider class.
Change-Id: Ie4b18ac1b861e2da64f01d1f209986b27fbe6bd5
Task-number: QTBUG-66177
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As this class is a subject of the library hook data, there must be a
solid understanding of the member's alignment and padding across
different architectures. By reordering the layout, this patch provides
a clearer way of adding new members to the class.
Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.
Change-Id: Ied8b69bdeb9da50ff05aba2107bc75509674b18e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And remove one of the type id to name mapping that still
existed in QMetaType. QMetaTypeInterface can provide that,
so there's no need to have a second copy of the data.
qMetaTypeTypeInternal() can still map all the names of all
builtin types to ids. That functionality is for now still
required by moc and can't be removed yet.
Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There is no need to generate wrapper functions for equals,
lessThan or debugStream for pointer types, as those can
easily be handled by a few lines of code in QMetaType itself.
Change-Id: If79b3bc3a629249c1d17c9e592202f08b59f80ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And remove the old manual registration code for those operators.
Add some special handling for long/ulong, as these types could be
streamed as a QVariant so far, but are not directly streamable
through QDataStream.
[ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators()
and QMetaType::registerDebugStreamOperator() methods have been
removed. The streaming operators for a type are now automatically
registered together with the type registration. This implies that the
operators should be visible wherever the type is visible and being used.
[ChangeLog][Behavior Incompatible Changes] Because the QDataStream and
QDebug serialization operators are automatically registered with
QMetaType, the declarations of those functions must be present at any
point where the type is used with QMetaType and QVariant.
Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
MidButton had its // ### Qt 5: remove me
upgraded to Qt 6 at 5.0; but it dates back to 4.7.0
Replace the many remaining uses of MidButton with MiddleButton in the
process.
Pick-to: 5.15
Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It works as follows:
- user calls write(const QByteArray &);
- this function keeps a pointer to the chunk and calls a regular
write(data, len);
- write(data, len) calls a virtual writeData();
- subclass calls a new QIODevicePrivate::write();
- QIODevicePrivate::write() makes a shallow copy of
the byte array.
Proposed solution is fully compatible with existing subclasses.
By replacing a call to d->writeBuffer.append() with d->write(),
subclasses can improve their performance.
Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.
Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
warning: format specifies type 'int' but the argument has type 'qsizetype' (aka 'long long')
Change-Id: I6099b53efecea46d191d5dc019c986f99e49c1f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And generate a few more test projects that were missing.
Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.
Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is in preparation for regenerating them with the new qt_foo
prefixed APIs.
Change-Id: Iff34932d642b1c0186ee39f952adf3ad367fd602
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet). A few more cleanups will arrive in the next few
patches.
Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.
tst_qglobal had just some minor changes to keep testing the macro.
Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We have seen during the Qt 5 series that QMouseEvent::source() does
not provide enough information: if it is synthesized, it could have
come from any device for which mouse events are synthesized, not only
from a touchscreen. By providing in every QInputEvent as complete
information about the actual source device as possible, we will enable
very fine-tuned behavior in the object that handles each event.
Further, we would like to support multiple keyboards, pointing devices,
and named groups of devices that are known as "seats" in Wayland.
In Qt 5, QPA plugins registered each touchscreen as it was discovered.
Now we extend this pattern to all input devices. This new requirement
can be implemented gradually; for now, if a QTWSI input event is
received wtihout a device pointer, a default "core" device will be
created on-the-fly, and a warning emitted.
In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when
multiple devices were in use simultaneously. Now that each event
identifies the device it came from, this hack is no longer needed.
A stub of the new QPointerEvent is added; it will be developed further
in subsequent patches.
[ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer
to an instance of QInputDevice, or the subclass QPointingDevice in case
of mouse, touch and tablet events. Each platform plugin is expected to
create the device instances, register them, and provide valid pointers
with all input events. If this is not done, warnings are emitted and
default devices are created as necessary. When the device has accurate
information, it provides the opportunity to fine-tune behavior depending
on device type and capabilities: for example if a QMouseEvent is
synthesized from a touchscreen, the recipient can see which touchscreen
it came from. Each device also has a seatName to distinguish users on
multi-user windowing systems. Touchpoint IDs are no longer unique on
their own, but the combination of ID and device is.
Fixes: QTBUG-46412
Fixes: QTBUG-72167
Task-number: QTBUG-69433
Task-number: QTBUG-52430
Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Remove QDestopWidget public header, simplify the implementation that
maintains a Qt::Desktop type QWidget for each QScreen, and turn
QWidget's initial target screen into a QScreen pointer.
QApplication::desktop() now takes an optional QScreen pointer, and
returns a QWidget pointer, so that applications and widgets can get
access to the root widget for a specific screen without having to
resort to private APIs.
QDesktopWidgetPrivate implementations to look up a screen for an index,
widget, or point are now all inline functions that thinly wrap
QGuiApplication::screens/screenAt calls. We should consider adding those
as convenience APIs to QScreen instead.
Note that QWidget::screen is assumed to return a valid pointer; there is
code that handles the case that it returns nullptr (but also code that
trusts that it never is nullptr), so this needs to be defined, verified
with tests, and asserted. We can then simplify the code further.
Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Many of these were generated by clazy using the new qevent-accessors check.
Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are some slight differences between normal drawText()
and QGlyphRuns/QStaticText for decoration widths in certain
fonts. We decided to accept this and tried working around it
in the test by using ForceIntegerMetrics (since the difference
is < 0.5 pixel). This enum has been deprecated, so we move
the tests into Lancelot instead, since the idea here is to
test for regressions, not to compare the two painter commands.
Note that there is something off about decorations with
drawGlyphRuns() and drawStaticText() which is exposed
(not caused) by this, perhaps related to using a matrix
for positioning, since that was untested before.
This also takes the liberty of moving the emoji test string
from text.qps, since this was not in the statictext.qps yet.
Change-Id: Ib2d697095cbd11829cdd50b3c0268c85e9607c78
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It's disabled in qmake too, due to being almost all blacklisted
and flaky. Plus locally when i tested, i had to give accessibility
permissions manually, otherwise it failed.
Change-Id: I55ce7a81c46ac28f41c43f5c159fecc22d489966
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We now assume that source code is encoded in UTF-8 by default on
all platforms (and verify this with an auto test). Provide
a CONFIG+=no_utf8_source option for backwards compatibility.
[ChangeLog][qmake] qmake will tell the compiler that source code is
encoded in utf-8 by default. This mainly has an effect on Windows, where
MSVC still assumes source code is encoded in the current ANSI code page.
Use CONFIG+=no_utf8_source to get back the Qt 5 behavior.
Change-Id: I6dcafcaeefdea7d3907ccb723aeb7d23ccc0f04f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... and do a local code cleanup:
- add override
- port from foreach to C++11 ranged for loop
- remove dead code (`gestureEvent` (née event) was already
dereferenced when we check it for null'ness, so it cannot be
nullptr, so the condition is always true).
Pick-to: 5.15
Change-Id: Ica5e34fbe65c95f6573630f188582b90be15c8f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Cleaning up those that are trivial to remove because they have direct
replacements.
Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
All remaining pieces are gone, configuration included.
Relevant CMakeLists and configure.cmake were regenerated.
Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When drawing multiple distinct (unconnected) lines (e.g. from
QPainter::drawLines() or a QPainterPath with alternating
movetos/linetos), the dash pattern should not continue from one to the
next, as it should when drawing a connected line (e.g. polyline).
Both the cosmetic stroker and the full stroker does it right, but the
fast rasterizing codepath got it wrong.
Fixes: QTBUG-83048
Change-Id: I3d090f7121726755a0e53cb66b99a5563ac0e1c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qtokenautomaton is something from xmlpatterns. The fact that this
didn't fail with xml patterns not part of qtbase anymore shows that
the test doesn't do anything :)
Change-Id: Ibb1705fe57dac148f0283fba1193126d4d924868
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>