Normally, the app's main library's name is read from a metadata field
in the AndroidManifest.xml file, which is filled out by
androiddeployqt.
Add a protected variable in QtLoader for the app main library name
that can be set to provide the library name without the metadata field.
This is useful in cases where we don't have a manifest file filled
by androiddeployqt, for example when embedding QML to an existing
Android app.
As a side effect, change the name of existing variable for the main
library and the method to access it to make it more explicit they refer
to the library's absolute path.
Change-Id: I869547818f4d0272668a1052d7bc6916b7bf5a98
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8e9918e476430cc30007f2acf69f0c0fe120a03d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
IBus added the ClientCommitPreedit property to handle
preedit in case.
If this writable property is set,
ibus_engine tells the client whether current preeditText
should be committed or not in the client side when
focusOutEvent.
(Qt's old behavior is always committing in the client side.)
Fixes: QTBUG-109576
Fixes: QTBUG-58005
Pick-to: 6.6 6.5
Change-Id: I6bb78921ce04cdd3197cba9e2fb00376d5e0ac8b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 84cf0e2be54d9ad183db063fd429b792c67edd18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is useful for example the embedded QML case, where we want to
make sure everything from Qt side is ready before we start to create
Qt windows.
Change-Id: I8148405e35cc8ebb89110f05e07cef06f8ff3709
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6102ee6dd8f3e6cee3e3bc7544329c5c4b7843f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 4c60a11d8f935abb762a83b0ab99cefa6db3060c.
Reason for revert: Breaks QMainWindow::restoreState(). Dock widget is shown, even if restored into hidden state.
Change-Id: I9808de4e0fd48871c3b234ae9bbaf6c64c8e832d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ea37300d111beea3bb353f036d6c747f63c88dd)
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
We don't recommend foreach anymore, and have in fact
adapted two snippets already to use for(), but missed
the documentation text.
In any case, it feels a bit weird to give an example
how to iterate over QStringList in each of these methods,
so we might as well just remove this part.
Pick-to: 6.6
Change-Id: If8744e48961661ad518f5f24781c38f371d981bc
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 3b9f6b54b1cda08079ae97956478a4af55133803)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All we need are the APIENTRY and WINGDIAPI macros, as those are used
in the gl.h header. Define those locally for the time we need them.
Use a QT_APIENTRY macro instead of hijacking APIENTRY for when we
declare OpenGL functions with the stdcall calling convention.
A few build fixes needed in tests that used Windows types without
explicitly including windows.h first, or that (incorrectly) included
one of the sub-headers of windows.h (like winuser.h).
[ChangeLog][Potentially Source-Incompatible Changes][OpenGL]
On Windows, the public qopengl.h header no longer includes windows.h.
Fixes: QTBUG-120687
Change-Id: I3770ac8eaeee5bcf4e7234e5a2539935a8aa5a7d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit b13c610f50c714873987d8c4f30f50953ade9aba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise, Xcode will auto-generate schemes for all targets, including
internal targets such as foo_autogen and build-only targets such as
ZERO_CHECK and ALL_BUILD, choosing one of them at random when opening
the project for the first time.
If multiple targets get a scheme they will be sorted alphabetically.
We could prioritize them by generating a xcschememanagement.plist
file, but that would require teaching CMake about that feature.
This aligns the CMake behavior with qmake, where we also generate
schemes explicitly.
Pick-to: 6.6 6.5
Change-Id: I3756fced37a4ff7792370da10fc49169cc271ae8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 822dc75f1a0be988b25741a8f16ddc2fbeb48e77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Including/excluding plugins of the platforms type did not work, since
windeployqt was only ever looking for 'qwindows'. Keep the default
behavior of deploying 'qwindows.dll', but also allow users to
add/remove platform-type plugins.
Pick-to: 6.6
Change-Id: I4062a71939224d1462896d95a2541e8caced399d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bca41b1832bf1ce76787109456094149520bc403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Allows us to hide them in a separate folder in Xcode and Visual
Studio projects.
Change-Id: I5ce7884ce50198c3b0c9654bb188f38a8a679be0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6e215a44c131598c5f75198a443d796f2709ad89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With some HighDpiScaleFactorRoundingPolicy, going fullscreen can end up
not filling the whole screen. In this case, ignore the rounding (only for
the window size, not its content).
Fixes: QTBUG-115954
Pick-to: 6.6
Change-Id: Ie87196358ef28dbe2fcbc180b1740ed9f784b4a0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit da473f3a80798d84d0f1bd9175158024a548ec68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit db9fa4a61791794823e570f8aa7f6e5eed8c5f52 excluded
qelapsedtimer_mac.cpp from the unity build. The necessary patches have
been merged, and we can remove this exclusion from 6.6 on.
Pick-to: 6.6
Change-Id: I85b353b202af1fd8eeea43753e5dc5ce18357d19
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 75f5eec2c904b5a3a274d9f1c70e14e687e6fa29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and remove the debug output of the internal QJsonParseError.
This allows users of the function to get the details in
machine-readable form, and to distinguish between !finished and an
actual Json parsing error.
Found in API-review.
Change-Id: Ia237b192a894d692b965f6bedb4c94d3b6537535
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3a61de282c4740efe4a6fa1672e66efaf7c2b408)
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QWindows that set Qt::QWindowDoesNotAcceptFocus like QtVirtualKeyboard
should not get focus.
gets rid of message:
requestActivate() called for QtVirtualKeyboard::InputView(0x1cdf130) which has Qt::WindowDoesNotAcceptFocus set.
Change-Id: I649a8cff599769727beaeee11039cf1291fd502d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit e766df030bc1afe7a654baa59efe5165f6b6cda9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure to pass the widget to QStyle::pixelMetric() as some styles
might use this (e.g. the new windows styles) to determine the correct
pixel metric.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-1857
Change-Id: I5c32f5af8b284749732b610e56b4e3d8c8ed1946
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 43ce457cbd093fc06d99b5ac833c789ef7c893d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's better served where all keys are handled,
and fixes bug with modifier keys
Fixes: QTBUG-118503
Pick-to: 6.6
Change-Id: Ic53d1b332bd918dbc4fdd27ea4e43ad1e1ecce82
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 75ac9adeda41194e1733c69b3176fc2a368a369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When windeployqt had hard coded module information, it had
result.directlyUsedQtLibraries, and result.usedQtLibraries. The latter
was meant to add in the modules that weren't defined. Since we now read
available modules directly, there is no need for result.usedQtLibraries
since it should always be identical to result.directlyUsedQtLibraries.
Change-Id: I60e38c176b11626c1ef5a844e80bc701a9eed189
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a05abede682db4ab20a7c1d9eb45a487e91d6a78)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added QDuplicateTracker to keep track of used tags, rather than looping
through QTestTablePrivate::dataList for every added tag.
Removed method `hasRow`, instead calling `QDuplicateTracker::hasSeen`
directly in `newData`.
Task-number: QTBUG-118619
Change-Id: Idaab70d8c94227f75620924e0f1ead477f93b27a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8a23e3aa323443d2ea958b1213b00031e5b13aed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Windeployqt has a pull all in approach to plugins. This can require some
modules to be deployed despite being unrelated to the application's
dependencies. An output is added to provide information to better reflect
what windeployqt is doing in this regard.
Task-number: QTBUG-117910
Pick-to: 6.6 6.5
Change-Id: Iabf89e0faca862a90c0fcd46e5675dd43655be1d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 40cff9e93c36edcab49c08fa65760c22dc935992)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix indentation, split too long lines.
Amends f9f1272e7c438b79591032877f2b386af8085c3f
Found in 6.7 API Review
Change-Id: I3e9e3647afbe1a49fe78258177aff5cb878ce030
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5e49fa2739bd43e919863b343821c22b3d583afb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The pdf testing relies on the sips tool in macOS to render generated
pdfs into pngs. In recent macOS updates, that tool has changed
behavior, and no longer produces the desired output. Fix this by using
a custom pdf page size, instead of relying on cropping behavior in
sips.
Pick-to: 6.6 6.5
Change-Id: I9b2e947424774bb4456a6aefe04288b84401a9b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit ec324fd4afd1bf843ea601447f40c1e375efe659)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we for some reason can't look up AppKit, or if the table or
string within that table is not found we will end up using the
key as is.
Change-Id: I5d574288e421e586458266899ffdff90eeadec8f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5f15a93f16727824372bfd1a6490754440de942f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't loop over the list of event filters twice, do it once with a
combined predicate.
This code is still has a big impedance mismatch: the removeIf() will
always leave empty space at the back while prepend() needs it at the
front. We should fix this by reversing the meaning of the order of
event filters to mean back()-is-applied-first, so new filters can be
append()ed, but that is for another patch.
Done-with: Jarek Kobus <jaroslaw.kobus@qt.io>
Change-Id: I08324697229a54c8f66c6c320cf7232d707a08f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit edff6a33a1e3757b9bb4831091a3db8fa99e3219)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't have duplicated filters installed,
so break the loop when removing event filter after we
have found the matching one.
Change-Id: Idda87f3090954e020b27bf3fab62677128607f03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b909b8dfe808ed6bbb9f4353729c8810ee0e95c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Resulted from API-review
Change-Id: I84e880dc6edb9c62fd1ddd50d477347443fd52a7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e2462b09b7dcbd52c4be0df5f01508dacf27cab5)
With ES 3.0 and up the GL_MAX_SAMPLES query is available and is
guaranteed to be at least 4.
With ES 2.0 there is no such query.
While what we report from supportedSampleCounts() has little
significance with OpenGL (for the window's color buffer it is
anyway the QSurfaceFormat that decides, not QRhi), QRhi users
such as Qt Quick may rely on supportedSampleCounts() returning
real values and may, for example, warn if the value attempted
to use is not in the supported list. (even if MSAA is fully
functional)
Avoid getting such warnings on a pure ES 2.0 implementation
with 4x at least.
Pick-to: 6.6 6.5
Fixes: QTBUG-120474
Change-Id: I8a34a8bc9ce37ce951fdf7794247e8db44435d41
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 520d755d324a32c97cb9e25b617e99d0ab93d666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The UBSan raises a division by zero in getRadialGradientValues. This can
be avoided by calculating the inverse in
qt_fetch_radial_gradient_template as a checker is done to avoid
division by zero there. (Credit to OSS-Fuzz)
Fixes: QTBUG-120332
Change-Id: I798d1efc87ee07df7ca6f401aa476013cdbffe42
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 69bed6cd3f12a3c1b0182c5a3706efa617090cfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
File extensions with multiple parts, such as as ".tar.gz" are not natively
supported on macOS. Asking NSSavePanel to only allow file types with such
extensions confuses it severely, so we work around it by reducing the
native file name filter to the last component of the extension.
In this situation, we explicitly tell the NSSavePanel to show the full
filename, including the extension, so that the user can more easily
see what the final file name will be.
However, as part of 7f8a80ebf87cccb57da316202e5350eb5eca9d5d we ended
up changing the logic to count the number of possible extensions for
a given file type filter, not the number of parts in the extension.
The logic has now been restored, but moved to init, so that it applies
even if the initial filter is not a multi-part extension.
Task-number: QTBUG-109877
Pick-to: 6.6 6.5 6.2
Change-Id: I244cea1cc2977f8adf7e359ea7116bbfad0e1059
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit fd817c28a03f8b6743ea678c9edf3f8f047db627)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Provides the possibility to read text data as it arrives, instead
of needing to wait until the whole body is received.
Task-number: QTBUG-119002
Change-Id: I64f90148fd41a77c4ae2d5dbd6194a924a9f3a86
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4da14a67a6157c415f8228a8bae7d6b0f895df7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test was flaky, because of qWaitForWindowActive() after show().
It is not guaranteed, that a window has focus after show().
Use qWaitForWindowExposed() instead.
Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I1eb8a73f2beafec00c4a6f6b34bfd36a8d6e4d93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 599328845c7e77bc7b4fd5b4f2de000bb463a814)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The macros expand to declarations that end in a private: section, which
means everything following them is private. As Fabian said in the bug
report, this is obvious when Q_OBJECT/GADGET ...etc are used in a class,
but might be a bit surprising when used in a `struct`.
Fixes: QTBUG-120297
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iacdfc4eb3bab3554cc1142f682b11b32c3868b8f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit eb2db79064bd6e74d0b3485a650e4025d0a39c96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify wording, leave out historical baggage (which
is not really relevant for users that look into new code).
Change-Id: I9be1d42b6d75dd4bf6fccd6ecb47bc7cd6026ed3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f23154c05ba0de300d017f1c50910da324414eef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
ColorScheme is used in Qt as a name for dark/light desktop mode
properties.
The enum value was named incorrectly.
=> Fix it.
Pick-to: 6.6 6.5
Change-Id: I2aa72f81e36c0997127dd6de0e23d4773509ba40
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit c4bd6ac4e5a0782d8771af1485a3b78733180785)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wrap the arguments to \inlineimage in curly braces so that the
describing image text doesn't show on the page.
Fixes: QTBUG-120572
Pick-to: 6.6 6.5 6.2
Change-Id: I00f4befc64c20fb6de1dd5ddcb6ca2573fa7c355
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 5358d7a5fe394a37435a947484f1efb7ce297fa2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt 4.8 reference is not relevant. And mentioning that calling the
function more than once is safe, or why that is, is strange, as users
should still treat the object as something that will go away soon.
Change-Id: Icf24aa8ffe079e35351006dd77063df48a596fab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e02dc31fbf3ae460bea2aea068ccc969d6e852fc)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>