These fake mouse events should be synthesized by QtGui, not the QPA plugin,
when the tablet/touch events are not handled by the application and the
Qt::AA_SynthesizeMouseForUnhandledTouchEvents or
Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set.
Task-number: QTBUG-47007
Task-number: QTBUG-60437
Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QOpenGlWidget and QuickQidget do not work at this time anyway.
This also causes gl to be initialized for widget apps, so disabling this
will optimize widget apps.
We could use Qt::AA_ForceRasterWidgets as well.
Task-number: QTBUG-67797
Change-Id: I8f86a9f72e6f3d437a818b4fbe3d6f3658e17d04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without
any replacement, and adding the attribute to the pixel format results
in context creation failure, so we're assuming the feature is no longer
supported an disable it wholesale on macOS.
Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It's almost completely blacklisted anyways, and the parts that are
not are flakey.
Change-Id: I4601d751a2963c94c62ec439dd78b874034069a0
Reviewed-by: Liang Qi <liang.qi@qt.io>
We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3.
Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Otherwise the SDK upgrade (or downgrade) may subtly and silently affect
the resulting binary, or if it results in build breaks, the user won't
know why.
We limit it to applications for now, as that's the point where it's
most important to catch the SDK upgrade, but technically we should
also do this for intermediate libraries. Doing it for everything
will likely incur a performance cost, so we skip that for now.
Change-Id: I8a0604aad8b1e9fba99848ab8ab031c07fd50dc4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The files match the ones in pixman 0.17.12
Task-number: QTBUG-69276
Change-Id: Idd03c6979456ad2cf4dcc2aee6986ebc95140937
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Short-cuts the case where there is no gamma correction to avoid a
conversion over RGBA64 and back.
Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Minor bug that caused highlighter to not work properly.
Task-number: QTBUG-66084
Change-Id: I7860d7a13c402e3236f4c844020e35e11f6e53e5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This is the squashed diff from wip/webassembly to dev.
Done-with: Peng Wu <peng.wu@intopalo.com>
Done-with: Sami Enne <sami.enne@intopalo.com>
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Started-by: Andrew Knight <andrew.knight@intopalo.com>
Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When building with warnings are errors for Android with gcc 4.9,
it wrongfully fails on use of uninitialized variable.
Change-Id: I39c5e8413c30567fba60cbba6a8b26d537c5836e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Replace by reinterpret_cast or const_cast, respectively.
Use auto when initializing a variable to fix Clang warnings
about repeating the type name, do minor tidying along the way,
and a few conversions of 0 or NULL to nullptr.
Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For ControlType != QSizePolicy::DefaultType, qCountTrailingZeroBits()
is used which, MSVC 15.8.1 does not consider constexpr due to built-ins.
Exclude the check by #ifdef.
Task-number: QTBUG-69983
Change-Id: Ifc3dc3d94a804246bee1705fc8f3ac9b04ee4d32
Reviewed-by: Alexander Shevchenko <sav_ix@ukr.net>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
instead of trying to reverse-engineer it from the final target including
extension and possible bundle path, construct the basename explicitly.
this avoids that we mangle the filename if the actual target contains a
period for some reason.
Task-number: QTBUG-70097
Change-Id: I0bae9f010ab82e258680830250f8e28656f09d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum
from qmetaobject_p.h. Also added a few comments for Qt 6.
Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This feature is needed to register complex types (e.g. Q_GADGETS) at
runtime, using a single constructor method and added type parameter.
Without having the type id available to the Constructor it is impossible
to specialize behavior, thus requiring separate constructors for each
type. Generating these separate constructors at compile time is easy,
but not at runtime.
[ChangeLog][QMetaType] QMetaType can now register constructor for a set
of dynamic types.
Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
translateTouchEvent needs to filter events based on the message type
passed in msg, as Windows sends more than just down/up/update events,
it also sends enter/leave for each touch and occasionally a few more.
One of them is WM_POINTERCAPTURECHANGED which indicates a general loss
of touch input, which needs to be translated to a touch cancel event.
Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending
duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise.
Also avoid sending duplicate events for each additional touchpoint:
Windows already bundles all available touchpoints for a touch event
when calling GetPointerFrameTouchInfo, so we get all points at once,
but we'll still receive other events for each additional touchpoint,
resulting in reading the same bundled data again for each one and
sending duplicate events to QWindowSystemInterface.
Use SkipPointerFrameMessages() to avoid receiving the additional
events for the frame we just processed.
Finally, add raw event logging when the platform verbose level is >1.
Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
When adjusting the tab order for compound widgets, it can happen that
the order is already correct. The check for this case forgot one case
which lead to a garbled focus chain.
Task-number: QTBUG-68393
Task-number: QTBUG-69619
Task-number: QTBUG-10907
Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
PM_TabBarScrollButtonWidth used the size of the ::scroller subcontrol
without considering that there are two QToolButtons and therefore
returned the wrong size for a single QToolButton.
QStyleSheetStyle::subElementRect() had no handling for
SE_TabBarScrollLeft/RightButton and therefore the values for the
scroller toolbuttons set via the stylesheet were never used.
Fix it by dividing the scroller width by two and add the code path to
handle SE_TabBarScrollLeft/RightButton in
QStyleSheetStyle::subElementRect
Task-number: QTBUG-69653
Change-Id: I1adfe6333f3183bba621bbbb4d10969920c6cd46
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
To avoid bothering the user who just wants to build all the test cases
in qtbase. It is better to move the docker related testing to the check
target. Then, it won't break the build procedure and force users to
finish test server provisioning in advance.
Change-Id: I2c4212297342c3eec7bcbebff9f991b7346d9503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e798e8a03b)
Avoid reading a pixel outside the image even if we multiply the result
by 0. This mirrors a similar old fix in the the 32bit scaling path.
Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
the test uses CoreFoundation api directly, so it must link it
explicitly.
amends 6c8f32388b.
Change-Id: I76b7d8ab41d6a66138eb45bd0f067cfee8e96cb8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the test uses CoreGraphics api directly, so it must link it explicitly.
amends b0abe20d4.
Change-Id: I734bfbedff56df731c1e528670f686565b63f3b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
These autotests are not currently working with the Ubuntu 18.04
platform being introduced to the CI.
Task-number: QTBUG-70227
Task-number: QTBUG-70226
Task-number: QTBUG-70224
Task-number: QTBUG-70223
Task-number: QTBUG-70209
Change-Id: Ibe7cafd37763d7d305d8c3d9ec17bc6339db744a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Named placeholders can only contain characters in the range of
[a-zA-Z0-9_] but this was not documented anywhere.
Task-number: QTBUG-69775
Change-Id: I5c4eff7674b1fc04cef60e7d7f44cd87414ffbe9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The device pixel ratio was not applied to the section indicator pixmap
which made it look blurry on HighDPI screens.
Task-number: QTBUG-70084
Change-Id: I8b07b2ffc51781c2d2d89484b8618173f0692fe4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When QSqlQueryModel or QSqlTableModel is created it will create a
QSqlQuery which defaults to using the default QSqlDatabase connection.
If this connection belongs to another thread then it will throw a
warning as this is not safe to use. Since the QSqlQuery is always
recreated when a query is set, the instance which is a member of
the class can effectively be invalid until a new one is set.
Task-number: QTBUG-69213
Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
std::get and std::visit are only available on macOS 10.14, so as long
as we're building with a deployment target lower than that, we can't
enable C++1z globally unless we special-case use of those functions.
Change-Id: Idb5eb5992ea4dd7eab92f5310321720e19ac793e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This prevents the view from triggering display of its superview when
being temporarily added, which is both inefficient and causes issues
when those dirty-rects are wrong due to the wrong frame position of
the added view.
The additional drawRect: calls and corresponding expose events
resulting from the needsDisplay calls also caused repaint issues
in Qt Widgets. QWidgetBackingStore doesn't seem to take the exposed
region into account for an expose event, and will try to flush all
dirty regions. Some of those may be outside the exposed region,
and will be clipped away by the window system, never ending up on
the screen, but with Widgets still thinking it has flushed all
dirty regions.
This is a separate issue, possibly solvable by setting the
wantsDefaultClipping property on NSView to NO, but this needs
further testing, so applying this commit as workaround makes
sense, even if it's just hiding the real bug.
Task-number: QTBUG-67998
Task-number: QTBUG-68023
Task-number: QTBUG-69990
Task-number: QTBUG-69740
Task-number: QTBUG-69292
Task-number: QTBUG-69332
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 38979332d0)
Change-Id: I4ef3fef29f749daa4f3a11fe9186ae77b359f966
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The functions checks for _glyphs.isEmpty() and returns
in that case, so, there is no point in having
another code branch for _glyphs.size() == 0 below.
Unindent branch for _glyphs.size() > 0 and brush
it up a bit to silence clang-tidy (warnings about using
isEmpty(), nullptr).
Change-Id: I78e86583bb30c7bea1357e7a45f61b07d5a4d139
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Compute QPointF hi-res screen coordinates based on the HIMETRIC values
contained in the native message. This gives the same high-precision
screen coordinates as what the old WinTab handler supported.
Add the possibility to not synthesize mouse events if the platform
plugin option DontPassOsMouseEventsSynthesizedFromTouch is set,
just like we do for finger touches. This makes it possible to have
clean Pen events without mouse duplicates for an application that
handles both input types in parallel.
Add raw event logging when the platform verbose level is >1.
Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Following QTBUG-40015, QDomDocument::setContent is reentrant.
This change updates the documentation accordingly.
Fixes: QTBUG-69920
Change-Id: Id09e3541156f52d1a976afd02b410c263d3b3352
Reviewed-by: David Faure <david.faure@kdab.com>
This way we can easily use them as keys in QHash and QSet.
Change-Id: Ie744c3b5ad1176ba2ab035c7e650af483757a0c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The table and macros weren't extensible enough for non-Latin-based
languages.
Change-Id: I950f06de57aaf6bd0b24e0056e4acee2fb655f3d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes compilation failure on Windows, due to TraceLoggingValue not
correctly casting pointer arguments to a known type.
Change-Id: I6027debe4ea3440588dd8677209d6d47048b6b0f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Otherwise the dynamic loader will complain about missing symbols when
the binary is run on platforms below our supported deployment target:
dyld: Symbol not found: __os_activity_current
Referenced from: QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/torarne/build/qt/5.12/qtbase/lib/QtCore.framework/Versions/5/QtCore
Trace/BPT trap: 5
We want this to trigger our own logic in qt_apple_check_os_version(),
where we tell the user in more friendly terms what's going on.
An alternative to the targeted weak imports would be do import the
whole library as weak, using -weak-lSystem.B. This doesn't seem
to cause any performance issues at startup, but since we only need
the two global symbols we stick to the more targeted solution just
to be on the safe side.
Change-Id: I87c1f185f6dcf9df26c700d31bb5071ddf7685be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The application name wasn't always printed, so we try try a few
more possibilities before falling back to the process name.
We also run the check as early as possible, instead of relying
on a QCoreApplication.
We do not have to provide a dialog to the user, as macOS will do
this for us if the application is launched from Finder.
Change-Id: Ifbec86946d60294806364e08964852fd4b74ff56
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This autotest fails on the Ubuntu 18.04 platform.
Task-number: QTBUG-70153
Change-Id: I2a2b0075a046664cdf5733d8629f634b4e33dc6f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
We have #if-ery on Q_OS_DARWIN controlling an expectation of gettign
"GMT+1" and "GMT+2" instead of "CET" and "CEST" in two tests; this
turns out to not be a deficiency of macOS so much as of how we
configure Coin's VMs. While we fix that, we need to ignore failures
in these tests, so that we can pull the #if-ery out and clear the
blacklist once the VMs are set up properly.
Task-number: QTBUG-70149
Change-Id: If3577200cf980b3329161ab3eea7bd2e9d0124e0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>