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>
On iOS, if you select some text, the edit menu will show on
top of it. And if you tap on the screen (or inside the menu) it
will hide. But if you type on the input panel, it will stay
open. This is wrong.
This patch will keep better track of whether or not the edit
menu was opened by us, and if it was, ensure we close it also
if the cursor moves by typing on the input panel.
Pick-to: 6.0 6.1 5.15
Fixes: QTBUG-90860
Change-Id: I0a51382030560182e7925c8b694b42e50943514e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This simplifies the Android platform plugin code, since
it no longer has to make QHighDpi scaling calls.
QPlatformInputContext returns geometry in the native
window coordinates. These can be used directly, or in
some cases be mapped further to native global (screen)
coordinates. Note that this mapping now happens after
High-dpi scaling, so we must use QPlatformWindow::mapToGlobal()
instead of QWindow::mapToGlobal()
The inputItemTransform() is applied by QPlatformInputContext
when needed, these calls can also be removed.
Change-Id: I179d44d148dded43683df5e97ad506940894c423
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The benchmark used to crash because QMetaType::typeName would return an
empty string, which is not a legal value for newRow.
Change-Id: I9e6c6c1cf153943bfa21181cd2cca596a7943ea0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Amend ac970d48fd and use
QEXPECT_FAILURE for systemTimeZone test on 32bit systems.
Task-number: QTBUG-89889
Change-Id: I0eed35df871c69a20bcd7c544fc0e9a48dd8db7b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Clang warning: 'isSequential' overrides a member function but is not
marked 'override' [-Winconsistent-missing-override]
Change-Id: I1a7c5516d2656469eab556e7f9d310192510b99b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Pick-to: 6.1 6.0 5.15
Change-Id: I9d3f7ca2022b17559dd5bdd5c6bb8c85e89c3f64
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
And remove direct conversion to take advantage of both the SIMD, but
also threading on all platforms.
Change-Id: I782ae7c80e82b694e23abee28d69cecd0d28c32f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Being able to iterate h = h.add(next) over a sequence of numbers makes
it possible to implement arbitrarily-many parameter functions that
need hypot, e.g. the implementation of V4's Math.hypot().
This amends commit b08368d99f.
Change-Id: I76bb65bd5f318e915d42fa4c935129850e258132
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This simplifies the include path addition we need when compiling and
eliminates the need to rewrite all the #include lines on update.
Change-Id: I14e301d277f1eb49286721b012559f0ec84ea520
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
...in the hope that they may work. If not, that's it, but at least we
tried.
Task-number: QTBUG-76970
Change-Id: I134c5cc4cfb5ad1e6f9edbfcf506df20022e127a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
When QWidgetWindow handles a QTouchEvent, it will call
updateTouchPointsForWidget() for each widget it tries
to deliver the touch event to. This will make sure that
the point's position() is updated to be local to the
widget being processed.
The problem is that we never reset this overwriting of
local positions in the event after we're done. So if we
later try to synthesize a mouse event from it, the local
position in the fake mouse event will be based on the local
position inside a random widget, and not the original local
position sent from QPA.
Rather than trying to store all the original local
positions inside the event before going through this delivery
logic, and reset it afterwards, we base the local position of
the synthesized mouse event on the (unmodified) global
position instead.
Fixes: QTBUG-90033
Change-Id: I1588351482de7cce9c06d102db3686ea8dd0c118
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QPointingDevice requires using the constructor to set its settings
in Qt 6.
Replace + with | operator and return QKeyCombination instead of int.
Change-Id: Id3da469cc13b34ec7b55afa751dbc04601880df6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Replace vague symbols with descriptive words.
- Use qScopeGuard() to ensure that removeShortcut prints the number of
removed shortcuts for all execution paths.
Change-Id: I4d36366445756b41b1dc40bbb1e987dce669a723
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This was added by 9ff76c27b9 on
the basis that it signifies a shaping error and would later assert
or crash.
But the line is easily reachable by user code. If Harfbuzz returns
0 glyphs, it just means it is unable to shape the string, for instance
if the input string only contains default ignorables (like a ZWJ)
and does not have any appropriate glyph to use for replacement.
Qt expects there to always be at least one glyph in the output
(num_glyphs == 0 is used to indicate shaping is not yet done), so
to avoid asserts later on, we simply populate the output with a
single 0 token, which is a required entry in the font that is
reserved for representing unrepresentable characters.
This also adds a test and therefore a zero-width joiner to the test
font to reproduce the issue.
[ChangeLog][QtGui][Text] Fixed a possible crash with certain fonts
when shaping strings consisting only of control characters.
Fixes: QTBUG-89155
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ia0dd6a04844c9be90dcab6c464bebe339a3dab11
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Setters of QObjectCompatProperty need to remove the binding, but
only if it is not in the wrapper. This patch adds this method to
the public interface.
Change-Id: Ibc96418fe15b0aeeb2059411ea910ba1f733c255
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
A static build of Qt with QT_BUILD_TESTS=ON would fail with errors like
this:
FAILED: tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2
undefined reference to `qRegisterResourceData(...)'
We create object libraries for resources. In this case, for the
mimetypes of QtCore.
For static builds we added the object files to INTERFACE_LINK_LIBRARIES
of the Qt module the resource belongs to:
target_link_libraries(Core INTERFACE
"$<TARGET_OBJECTS:$<TARGET_NAME:${resource_target}>>")
That is, however, a problem for projects that link only against QtCore,
like testProcessEcho2 above. On the linker command line Qt6Core.a is
before qrc_mimetypes.cpp.o and that doesn't work, because the latter
needs symbols of the former.
To have the resource object files before any other libraries on the
linker's command line, we now treat them as source files.
Pick-to: 6.0
Fixes: QTBUG-90582
Change-Id: Ia2786beb5f7c2eba194e8f00ae8785572df1cf6e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
And remove the direct conversion so we can get both the SIMD
optimization and threading applied.
Change-Id: Id032ea91cc40c1cbf1c8a1da0386de35aa36cfb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It can do unaligned access directly as well.
Change-Id: I4046cf69e2ad8eb628b8b53bfa521800bb35dc6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The initialization was duplicated across the different modes. We now do
the setup once, in a shared showPanel:withParent function.
This also simplifies and removes the need to store the return code.
Change-Id: I3c4da48cfef92bcc59c76cffa15b40150de1a9e1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Relying on Objective-C's no-op behavior when sending messages to nil was
nifty, but a bit confusing when trying to track the ownership model of
the class.
It's now explicit at the call sites what's going on (a cast).
The canSelectHiddenExtension property is valid both save and open
panels, but AppKit will only show it for save panels.
Change-Id: I8e12d629639e2179d155b2ecda1bb2dab2a5757d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For Windows. Based on the code I wrote for QNetworkStatusMonitor.
It also renames the netlistmgr feature, avoiding the abbreviation.
Locally my MinGW fails the networklistmanager feature test so it may
not be supported on MinGW, likely leaving it without a backend at all.
Change-Id: I13bbe4127edc2a9c0bb91602c95f1cb206a85a69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change the setSelectionOnFocusObject() to take geometry
arguments in native pixels, in order to be consistent with
other QPlatformInputContext API.
Calling code which pass non-native geometry must be updated
(in practice only the Android platform plugin).
Change-Id: I1c61b8cf583afe607567d6056ca7ff23cc3de3f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This field has been defined since API level 11, so no reason why we
shouldn't just use that instead.
Pick-to: 6.0
Change-Id: I8e3ffde3680e41f26d776e1f0474f632186a6b27
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
If ImhHiddenText is set then that should take precedence over the
other input method hints. Also, certain combinations aren't really
possible. E.g., ImhEmailCharactersOnly and ImhHiddenText doesn't have
its own specific variation on Android.
ImhSensitiveData and ImhNoPredictiveText are also likely to not work
as TYPE_TEXT_FLAG_NO_SUGGESTIONS is normally ignored by Android
keyboards. A common workaround is to use the visible password variation
but since this will force the layout to use latin characters it's not
something we can use as an universal workaround, so users will need to
manually enable it through the environment variable
QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT
Fixes: QTBUG-85787
Pick-to: 6.0 5.15
Change-Id: I0ff591ec9acf8dd556c7987e6d997cff3ddfe38e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
registerNativeMethods() should be using the local jclass from
findClass() instead of the global reference.
Task-number: QTBUG-89633
Change-Id: I469a9a1ecff95ab9948421baa5c88735ba7ad776
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Always try segments from 64k to 128k pixels, this matches
qimagescale logic, and gives a one percent speedup locally.
Change-Id: I3ef468eac9dca4b84f04850e970f3d15a4f16255
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This enables support for QT_SCALE_FACTOR on iOS.
Fixes: QTBUG-74978
Change-Id: Ibcf0741c178e44802065e472e096a5f4c7d6f3cf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Passing nullptr to QHighDpi::toNativePixels() is seldom
correct, and will work only on the main screen.
Instead, call frameMargins() on the platform window
(instead of on the QWindow) and get the margins directly
in native pixels.
Pick-to: 5.15
Fixes: QTBUG-90716
Change-Id: Id7b31ec3246010c367781b64ed832c589bbaeb0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Also remove tests/tests.pro that would be empty without the benchmarks.
Change-Id: Iaf92a729d1286b3e0c03bf9f877b59e1d83708e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some of the listed source files are already included and must not be
compiled.
Pick-to: 6.0
Fixes: QTBUG-90777
Change-Id: I80b4ca6a50b882445aca513d800ef8375070d786
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Do not use the startSystemResize() functionality in that case.
Fixes: QTBUG-90628
Fixes: QTBUG-73011
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I8d4843c1715c7f75f9b41c904e6f1aebbf0e02d7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
While rebasing and resolving conflicts, I've acidentally removed a
declaration of supportsTls13() making a call expression invalid.
Change-Id: If561091db36f0354b61fa050ff9f72b29eddce53
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Currently the platform plugins use the public QInputMethod
API when querying geometry. However, QInputMethod returns
geometry in device independent pixels, while the platform
plugins require geometry in native pixels.
Add new API to QPlatformInputContext which returns input
geometry in the native window coordinate system:
QRectF inputItemRectangle()
QRectF inputItemClipRectangle()
QRectF cursorRectangle()
QRectF anchorRectangle()
QRectF keyboardRectangle()
These make the relevant QHighDpi calls internally, and
such calls can then be moved out of the platform plugins.
Disambiguate inputItemRectangle() in qandroidinputcontext.cpp
by renaming it to screenInputItemRectangle().
Change-Id: I561745b64fb197d64e3dfddcf0751528bb8d0605
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
- Add links to new topics
- Remove links to obsolete topics
- Update changed topic titles (might break links in module docs)
- Fix HTML file name of the Creating a Mobile Application topic
Change-Id: I8f06171946d85ed0fbfd457ed115f41cb5a9e2d0
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Dating from the origins of our support for the zoneinfo file format,
the mapping of POSIX's day-numbering (0 = Sunday through 6 = Saturday,
see [*]) to Qt's (1 = Monday through 7 = Sunday) was done by mapping 0
to 1, when it should have been 7.
[*] http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
Corrected a QTimeZone test that trusted the results it got without
checking which day of the week those were: they were all Mondays.
Verified that the corrected dates are in fact Sundays.
Checked the zone abbreviations, too.
Fixes: QTBUG-90553
Pick-to: 6.0 5.15
Change-Id: I84b4b14f9892ff687918cd3c42c7c9807e45313c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
As we call operator new on create(), we also need to delete on
destroy(). Otherwise we leak memory.
Change-Id: Ib80fe96c4173cba6fa474d3c81d88fe603d1ded2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In order for other Qt modules to be able to reliably use this property,
it needs to be defined under all supported scenarios. Previously, it
would only have been defined for a per-repo build and not for a top
level superbuild. The only place it was being set was in the
Qt6CoreConfigExtras.cmake file and only when QT_NO_CREATE_TARGETS was
false (so it wouldn't be defined for examples even in a per-repo build).
It was also noticed that INTERFACE_QT_MAJOR_VERSION was also being
handled in Qt6CoreConfigExtras.cmake, but this was not needed. This was
already being done as part of a call to qt_autogen_tools_initial_setup()
which occurs inside qt_internal_add_module().
Fixes: QTBUG-90617
Change-Id: I589316ffb8138bd2df8a1d49fdd6335d2e2836f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Bug: If you do a press and hold on a line edit, the edit menu
will show to let you select a word etc. If you now do
another press and hold to bring back the magnifier glass,
the edit menu will stay open while you move the magnifier glass.
This patch will ensure that we always hide the edit menu when
we show the magnifier. There is never a case where both of
them should show at the same time. By hiding the menu from
the place where we show the magnifier means that we can
remove code from the QIOSSelectionRecognizer that used
to do this for one of the cases from before.
Pick-to: 6.0 5.15
Fixes: QTBUG-90743
Change-Id: If2a92f94422c730c2b223129d96f5bc3bf3deeee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
With gcc 10.2, I cannot compile qtbase without this patch.
Pick-to: 6.0 5.15
Change-Id: I5be48947e2301d5befeec397291c0da597f7eb63
Reviewed-by: Andy Shaw <andy.shaw@qt.io>