50377 Commits

Author SHA1 Message Date
Joerg Bornemann
3fd72dbf1b Document more arguments of qt_internal_add_tool
Change-Id: Ia89922bb7d8ce327ea864889f5e2132427c58be6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit a63f72d442df201065efbe6868f669a5855aa557)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 20:37:37 +00:00
Alexey Edelev
ce7ab499f3 Remove the corelib_add_mimetypes_resources call for the Core library
Looks like the corelib_add_mimetypes_resources call is redundant and
deprecated. It duplicates the mime-type database in the Core library.

This also fixes the static build of the qmimedatabase tests, since
avoids propagation of the resource symbols by the Core library.

Fixes: QTBUG-89952
Change-Id: I5c0dbd761b7726589fdf6970cd546af89d2ff837
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 01e32d5c4a0ca1da0f31f57b970ef271fe13bd1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 20:37:31 +00:00
Joerg Bornemann
83c3f0b3bb Prepare installation of tools to libexec
Add the INSTALL_DIR argument to qt_internal_add_tool to allow
installation of tools in other locations than INSTALL_BINDIR.

Task-number: QTBUG-88791
Change-Id: I88ede81a4c13c82f6d209156d3801ce130f8fc10
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit c1cbfcb38fc3aac01da8d32cb8607fad76210e29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 20:37:30 +00:00
Alexey Edelev
37d6083690 Fix qmake_qmake_immediate path for Android
Add missed RCC_DIR to the qmake_qmake_immediate.qrc path,
when generating android deployment settings.

Fixes: QTBUG-90969
Change-Id: If4959581fcc153d9c19d178233297fc7b440b2f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f8736d34d4ec00d27d05993de2dee661089f0dfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 20:37:27 +00:00
Liang Qi
1122a204d5 xcb: unset old states and set new ones for window
This partly reverts a02959bb5b43a3f9d881e5213ceedf535202b6a1.

Fixes: QTBUG-87078
Change-Id: I69e18ad3c0a8d142b2e1f5ab87990addc97d9df1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit f61b140482d9578c07410a5979379e44e05352e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 20:37:26 +00:00
Joerg Bornemann
1668b12466 Fix deprecated API in network/torrent example
Change-Id: Ie4493f0d93cdeff281c3826d2ca3beb4e68d7a0f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit ab585356bd8815bdc17cecac0a0d5fcf54d50dff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 18:20:51 +00:00
Joerg Bornemann
90860224c8 Fix CMake build of network/torrent example
The ui_XXX.h include did not match the location of the XXX.ui file, and
AUTOUIC failed with
    "SRC:/addtorrentdialog.h"
    includes the uic file "ui_addtorrentform.h",
    but the user interface file "addtorrentform.ui"
    could not be found in the following directories
      "SRC:"

While this could be fixed by adjusting the include paths properly, this
would complicate the CMake project file, and we're dealing with an
example where needless complexity would cloud comprehensibility.

Move the .ui file next to corresponding source files instead.

This removes the need for any special cases in CMakeLists.txt, and we
can remove .prev_CMakeLists.txt.

Fixes: QTBUG-87457
Change-Id: Ic2dec5ded7100e22d5afc571efc4b009bc62e41c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 0c51a8756377c40180619046d07b35718fcf1784)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 18:20:51 +00:00
Tor Arne Vestbø
aa499b5fbc tst_qapplication: Prevent desktopaware test from deactivating main test
Applications on macOS are automatically activated (put into the foreground),
when launched from the Finder, or via 'open' on the command line. But when
launched from the terminal, e.g. foo.app/Contents/MacOS/foo, the application
will launch in the background (inactive).

In Qt we override this behavior, activating the app even when launched from
the terminal, as a convenience, as long as the application is a GUI application.

Unfortunately this means that when tst_qapplication launches a subprocess that
is a GUI app, it will steal activation from tst_qapplication, which in turn
will break tests that later try to activate a window and check that the window
is then active. The window will not be active until the application is active.

We can work around it by preventing Qt from activating the application, but
ideally we'd find a better solution to this, as we don't want to sprinkle
overrides all over our tests.

Fixes: QTBUG-90699
Change-Id: If53a86548002b739df0c0a7153d6244924a4a205
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 09cc63d425dabfa37b406e7eb1cee627c2eabb67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 18:20:49 +00:00
Mårten Nordheim
a1ad779db6 MinGW: fix warning in QMatrix4x4::map functions
The definitions get the following warning (treated as error):

redeclared without dllimport attribute after being referenced with dll
linkage [-Werror]

I take it to mean that because they are labelled 'inline' the compiler
disregards the 'dllimport', but that makes it inconsistent with the
declaration. So we label the declaration inline as well.

Change-Id: I87bb42141a1086b2c565db881077f33acb4aab64
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 10aa4b5c61b0073a76ff22946f1682f021cbd34b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 18:20:45 +00:00
Mårten Nordheim
329a99605c Schannel: Fix incomplete downloads with read buffer restricted
When the read buffer has a max size we do our best not to exceed it.
Usually there's no problem and we just read more when the next
tcp frame arrives. However if there's data leftover after the last
tcp frame arrived then we won't receive any more data. To counter
this QSslSocket would try to invoke QSslSocketPrivate::transmit
indirectly if there were any bytes available on the plain socket.
The problem is that with Schannel the last few remaining bytes
would not be in the plain socket, but in the 'intermediateBuffer'.
So let's make QSslSocket aware of that.

Fixes: QTBUG-90625
Change-Id: If56e4cce558f99c9a08a1f6818e005a887712ef2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Norbert Pfeiler <norbert.pfeiler+git@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 6d4da1340f18b66e60ed6969aeb7180e00d39077)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 14:15:01 +00:00
Kai Köhne
b6e644ad40 Fix attribution for tinycbor
Amends cbdf2ba46aed53d002b90d4d9683c28306f8e0a9

Change-Id: Ie1a89ec9367ecc2d674b5f8b27ab3d9bc5a16eca
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit df255a4a04149ca11704c8c9113149d16c79ea5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-15 11:21:27 +00:00
Allan Sandfeld Jensen
95191e55e1 Extend colorspace testing and fix bug it uncovered
When changing transferfunction the look-up-tables needs to be
regenerated.

Change-Id: I83ca5fe570f85d478a374f52c0a82db84e70c3b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit b2631c72c0628e68c0fae7567fd12e6646455efc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-13 12:21:03 +00:00
Samuli Piippo
83dcbf75ad Move QEMU emulation detector to QTest
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.

Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0ce443691fac1188103e5eaa66be40278d5d5e97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-13 10:14:16 +00:00
Assam Boudjelthia
1c0073ba72 Android: set minimum recommended android SDK to 29
comply with the api version used by default with androiddeployqt and
in docs. Google play also requires api 29 as minimum.

Task-number: QTBUG-90943
Change-Id: I05e2a90b4d7f2120b0198e3fb7b8b1b2398eba93
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit e711eb35f54cabf8b0beff49e5b748731d042c63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-13 08:05:25 +00:00
Allan Sandfeld Jensen
1803f904bd Fix QImage::fill with semi-transparent QColor
A few formats were not treating the input QColor correctly. Fixed and
added more exhaustive test.

Change-Id: I872aeeb45e518f9a34b4ac35642264821f9927f2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 95712c5e5438e4eb5cd205ab4659febf3192137a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-12 20:46:11 +00:00
Assam Boudjelthia
f94fbaf80a Add build.gradle to easily modifying Java project with Android Studio
Change-Id: Ie030ff0a3569caa0eacfa331d21f59e5455c90ed
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 886a2d4511bdd5705595bcf4a29fb22f84c0e9aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-12 15:38:19 +00:00
Assam Boudjelthia
ea8a0eb417 Fix docs misuse of escape character \
Use {} instead of \, this fix a badly generated block of text.

Task-number: QTBUG-89632
Change-Id: Ia4aad4c06285eb016a092f4340669fcbef1a6780
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 448ea34637af3a8a92c2a4c5780815ca44e0ecf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-12 11:09:17 +00:00
Mårten Nordheim
2983fe8f09 QNetworkInformation fixups
Addressing feedback that came after the reviews
ended from both bot and people.

Added CLASS_NAME to the CMakeLists files for the plugins so that
cmake can generate the correct import.

Fixes: QTBUG-91061
Change-Id: Ib3f1e863100c1c421a6c0a4081b1d40696d67b23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 92b15beb9aa09467583230a018c23114bb666a8e)
2021-02-12 07:55:09 +00:00
Giuseppe D'Angelo
2c55e121c2 QMatrix4x4: deprecate operator*(QVector3D, QMatrix4x4)
The operation is sketchy for a number of reasons:

1) Mathematically, it doesn't make sense. The code interprets the
QVector3D as a point, extending it with w=1, and uses it as a
row vector. But similarly, the vector could be intepreted as a
directional vector, with w=0. No semantic is "better" than the
other.

2) QMatrix4x4 is not meant to be post-multiplied. Granted,
one could use a QMatrix4x4 as arbitrary storage for 16 floats,
but QMatrix4x4 builds itself to be always *pre* multiplied
(e.g. translate changes the 4th column, not the 4th row). We
can keep post multiplication for the general case if we do it
against a QVector4D, but I don't feel that we should support it
also for QVector3D.

[ChangeLog][QtGui][QMatrix4x4] The multiplication operator
(operator*) between a QVector3D and a QMatrix4x4 has been deprecated.
User code needs to extend the QVector3D to a QVector4D first
(by specifying the intended w coordinate), and then multiply
the QVector4D by the matrix.

Change-Id: I41b64d8ab7eb6126dc4c49fe29cf3f1b7afc7987
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 654a2164994974639e62f9d388408ed559b797a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
v6.1.0-alpha1
2021-02-12 02:03:06 +00:00
Assam Boudjelthia
121ad4c22f Refactor duplicate code for clearing JNI exceptions before returning
Add a private function to handle checking/clearing and deleting the
local reference to jobject before returning a QJniObject.

Task-number: QTBUG-89633
Change-Id: I0ea28c8ba4da0bfc1e341c6b4c1f61fecfec87a6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit c7bcc51e2c196e5cc3def89137ca31b4a9d29157)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 19:16:29 +00:00
Assam Boudjelthia
afd74eb7fb Android: take JavaVM() from QJniEnvironment and not QtAndroidPrivate
Task-number: QTBUG-89482
Change-Id: Idfd442afc90c00e672b28b43c78c789813f46c7d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3348107c038cbac724e33d6bb30671ddddc1505a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 19:16:29 +00:00
Giuseppe D'Angelo
f576e22f6e QMatrix4x4: deprecate operator*(QMatrix4x4, QVector3D/QPoint(F))
The operation does not make sense at the "fundamental" level
for these classes (algebraic, in this case), so it shouldn't exist.

It's also a semantic trap:
* it interprets a _vector_ as a _point_ instead (the vector gets
  1-extended in 4D)
* after the multiplication, it gets perspective divided.

These semantics do not belong to operator*.

operator*(QVector3D/QPoint(F), QMatrix) will be tackled in a next commit;
we don't have a straightforward replacement for it.

Drive-by, document that map() interprets vectors as points.

[ChangeLog][QtGui][QMatrix4x4] operator* between a QMatrix4x4 and a
QVector3D, QPoint, or QPointF has been deprecated in favor of map()
and mapVector().

Task-number: QTBUG-89708
Change-Id: Iad78d6eb68cc8cdc3ac16b1635c4d3b522c95213
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 6862ce3d7763d8163cc1350c45bc6adae8b4fc7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 19:16:27 +00:00
Assam Boudjelthia
0c413c379a Fix registerNativeMethods for good
The initial implementation and the commit
c00ab6f8eaa3cdc9a29dd103c91b2eaf212cac9f was wrong:
* env->findClass() in fact returns a global reference, and in any
case we shouldn't be calling that, instead QJniObject would be
enough.
* The size param provided to env->RegisterNatives was wrong.
* A test for registerNativeMethods() is added to ensure such break
is not repeated again.

Task-number: QTBUG-89633
Change-Id: I4d3a6a9270755f465c40add25521fb750dd4de0a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit deca7cd730a44988d3e15c551d9a82a5c75618e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 19:16:26 +00:00
Tor Arne Vestbø
4a3fe46313 iOS: Disable three-finger-tap editing interaction menu when there's no focus object
A typical Qt application, such as a QML application, is a single full
screen QUIView, containing all of the granular controls of the UI.

The view accepts first responder status, so that we can pass on text
input to a possible text field inside the UI. That however triggers iOS
to bring up the editing interaction menu whenever the user taps with
three fingers, as iOS can't know that only parts of our view is suitable
for interaction.

To mitigate that we override the editingInteractionConfiguration getter
of the view, as documented, and dynamically report the correct enablement
based on whether we have an active focus object that accepts input.

This works because iOS queries the getter from the three finger tap
gesture recognizer, before showing the menu.

Change-Id: I0874340c42e437e1d7251896993f2eafe122f09e
Fixes: QTBUG-89735
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f0f00dbd119e0169bc81aa761e4d548e4ecf2214)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 17:13:15 +00:00
Joerg Bornemann
c1781dd958 configure: Don't guess the compiler if the user already chose one
We must not guess the compiler from the -platform argument if one of the
following holds:
- the CXX/CC environment variables are set
- the CMAKE_CXX_COMPILER/CMAKE_C_COMPILER variables are passed

Fixes: QTBUG-90914
Change-Id: Iff7a0e7b8857f77333f1705f118d7952af5234ba
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit 41e3d167d5e1dede286e6960037c5ac115eb692f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 10:30:02 +00:00
Samuli Piippo
dec5cfcd4b CMake: setup windows tools path only when building on Windows
Fix cross-compilation on Linux host.

Task-number: QTBUG-91052
Change-Id: I48c970f0e6af71e3eda3818557e764f60d3836ad
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 24d2215b67e1875046aa8c856751260f4356453f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 10:30:01 +00:00
Assam Boudjelthia
71fc71c96e CMake: add Qt::Gui dependency by default for Android tests
Normal Android apps require Qt::Gui dependency and since tests don't
need to handle any special cases for an app without Qt::Gui, let's add
it by default.

This also will allow us to remove some workarounds done on CI side to
run tests for Android.

Fixes: QTBUG-90870
Change-Id: I845650c17a1b73e4c4977043f863ec44e50f06c3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit 85c7a9d3a6710f8487ce4aa1e4e2d7d1d46b6cde)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 10:30:01 +00:00
Richard Moe Gustavsen
cdf8c96118 iOS: don't report selection changed if it didn't change
Be more careful about reporting a new selection to Qt. The code for
handling IM selection events in QQuickTextArea is quite complex
and need to take pre-edit text into account. The latter means
that when the pre-edit text changes, as a result of the user composing
a word, the width of the pre-edit text will also change (and as
such, the cursor rectangle). But the cursor position itself stays
the same.  And for this reason, it emits cursorRectChanged more often
than strictly needed. But rather than trying to clean that up, we
do some extra checking before we send the IM event from QPA in
the first place.

Fixes: QTBUG-63018
Change-Id: I689d989c3fe5d61ef2b1dbee7a70418b7790bce9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit be06164201d7d9ccdbaaff343af2e8f3662c044d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 08:22:37 +00:00
Joerg Bornemann
89590a1fed Fix FindWrapOpenSSL.cmake if OpenSSL::Crypto is UNKNOWN_LIBRARY
The attempt to call target_link_libraries on OpenSSL::Crypto failed when
this target was added as UNKNOWN library by FindOpenSSL.cmake.
Instead, set the INTERFACE_LINK_LIBRARIES property directly.

Fixes: QTBUG-90925
Change-Id: Idbc1379c89480225fc7a8d417416ed20404a1122
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b6b9e54f167aab104600f4d4a2db71ae70561c3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-11 08:16:15 +00:00
Eirik Aavitsland
db06e85722 Fix recently added auto test of text layout overflow
Ignore width of trailing space.

Fixes: QTBUG-91038
Change-Id: I74e278366a2c3b170335738bf6d6ee23933b361a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit be4127d6f747742c714914e1b313186422b438f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 22:33:33 +00:00
Eirik Aavitsland
8c2860672f Filter cosmetic lines using transformed, not world coordinates
Lines smaller than 1e-12 would not be drawn even when scaled up.

Fixes: QTBUG-75630
Change-Id: I8f261876c325b60f61e95ca2e5fde2cb227d4cba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 1549dff04c49aa37333e54f8bc45900d0f35b270)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 22:33:29 +00:00
Alex Blasche
f8d209c0da Fix completely wrong init_class and jar_bundle_native values
This prevented androiddeployqt from properly deploying libraries which
specify init class via the ":" delimiter.

Change-Id: Ib9cfa7edc864d7d540577df22284ceb9714a2511
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
(cherry picked from commit 8cceb04232001e51276f1588d9e67f2c696fbe91)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 14:46:43 +00:00
Andrei Golubev
dca5a2ca39 Restore pre-Qt6 QList::fill() behavior
Somehow QList::fill(t, newSize) introduced a regression in Qt6:
when newSize < QList::size() we should resize to the newSize.
This is aligned with QVector::fill() in 5.15 and std::vector::assign()

While 6.0 is already out, picking it to 6.0.x could save someone who
haven't migrated yet as well as fix some accidental bugs in Qt's code

[ChangeLog][QtCore][QList] Fixed QList::fill() regression introduced in
6.0: calling fill() with size < current list size wouldn't truncate the
list

Fixes: QTBUG-91042
Change-Id: Ic166e2c5e42390b61df1030f7c705e344433f7f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 6512a7fc642c65455db770385c67cfa6d71c294c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 14:46:42 +00:00
Assam Boudjelthia
ab9032acbb CMake: always pass QT6_INSTALL_PREFIX to androiddeployqt
Qt CMake uses a fake_prefix as install dir when running tests instead of
the main qt install path, this will throw androiddeployqt off since it
expects the real qt install path which has gradle and java sources.

Fixes: QTBUG-88579
Change-Id: I6580470840ae14d4a4a68a95f217b30408d7ab44
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0d42f4df9275897d708ee01ed879ac185aab7360)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 14:46:39 +00:00
Alex Blasche
0415dca628 Fix typo in android APK generation log
Change-Id: I9e593f35e1c4a51ef2cd4b08fe7e4b7c1a35a5d6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 04eb9b7c3279e7e8c3f6079cc28cee9baea5e944)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 14:46:35 +00:00
Alexey Edelev
2be22ecf29 Fix compilation of the QPSQLDriverPlugin plugin with enabled PCH
PostgreSQL package delivers several header files such as pthread, zlib,
zconf, uuid, etc. within Windows installation package. The headers are
exposed to the compiler by PostgreSQL include paths and have different
versions. When compiling PCH of the QPSQLDriverPlugin plugin, MinGW uses
the pthread.h header from the PostgreSQL include paths, that cause an
error related to pthread implementation mismatch.

Disable PCH for the QPSQLDriverPlugin plugin, when using MinGW.

Fixes: QTBUG-90850
Change-Id: I0be91bbefe37731acb2658d679b5b644ef552b23
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 43cb801ccb10e2d9efd230803822761b794fd4fb)
2021-02-10 09:52:48 +00:00
Kai Köhne
fe38ba8cf3 Update name of c++2a to c++20
Keep the c++2a feature, but make it an alias for compatibility
purposes.

Change-Id: I6f153109be84659806f1b7a57a88a187875166d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 3c412c93c251862a2791557881f9232fd76fda79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 09:13:11 +00:00
Assam Boudjelthia
4f2f53dd7f CMake: fix typo in qt_finalize_executable snippet
Task-number: QTBUG-90943
Change-Id: Idea90f1a5fdd2070102ebda85feed79abcba3f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit ab907053bd7b4c5acc1ddb9220a708b9244f7b0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-10 00:42:37 +00:00
Mitch Curtis
37c6b53217 Doc: link to QScopeGuard in QScopedValueRollback documentation
Change-Id: I02b9960fe37b09bc373ed52dec84b1efc8f43397
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1c2aa56cfa2c5648f05aed912dae2bb3ed5d8951)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 21:59:24 +00:00
Assam Boudjelthia
77b035aa6e Documentation improvements to JNI API
Amends 4e60681c879a54cf5b34862a30e27c492ed36363.

Fixes: QTBUG-89632
Change-Id: I7856e9b63eea5ba68a5472575016540ae656ec5f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 817f8ac03cd4e85b7813b45f8cabf5b679f28702)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 18:23:26 +00:00
Wang Chuan
bbdcc86c52 QPlainTextEdit: adjust scroll bars when showing up
The text of QPlainTextEdit might change when it is invisible, so an
adjustment of scroll bars is needed when the QPlainTextEdit showing
up, otherwise the range of scroll bars might be incorrect.

Fixes: QTBUG-77937
Change-Id: I45c686c7e09ca7b2944c36122e9157de0ec4f0e0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 13ae47d98057c2ddca8c865b845973d7e4c8dd8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 17:52:06 +00:00
Jonas Karlsson
30001fdaf9 QTextureFileData: support key value metadata
Task-Id: QTBUG-76970
Change-Id: I9dba1b373250cea4d0c806997290a7afcdc900d7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 2861cfb6f851d7cee503b19f0e800a33374db66c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 17:52:04 +00:00
Topi Reinio
69f267defa Doc: Online CSS: Fix image captions overlapping images used in tables
Fixes: QTBUG-90963
Change-Id: I15c7459246ed6dfa1ad85b732484770babeabfdc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 222c0ab081251f5249f31b6236ca7b912d303816)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 17:52:03 +00:00
Laszlo Agocs
9fc6a9099e egl: Add debug option to print all EGLConfigs
QT_QPA_EGLFS_DEBUG=1 prints the attributes for the chosen EGLContext.
Make QT_QPA_EGLFS_DEBUG=2 print the same for all EGLContexts.

Change-Id: Id161d04789fbd015e29e5a5a89a0901000096ea3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit d8c771c53acb58cc79cadbb795d59d5e8db7754e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-09 12:12:29 +00:00
Christian Strømme
27337fe242 Android: Fix the input type for date/time
The default variation of the DATETIME class is to show the layout for
date and time. If either date or time is requested, then only set one
of them.

Change-Id: I5178f5f80490b7b0d7e7011d11da402a316d164a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 86e10e1acd34ae4463bb2b0c24b8bdab71c6ade4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 21:02:54 +00:00
Joerg Bornemann
0da2b24991 configure: Fix handling of -translationdir argument
This is supposed to be mapped to INSTALL_TRANSLATIONSDIR, not
INSTALL_TRANSLATIONDIR (without the s).

Fixes: QTBUG-90946
Change-Id: Icec93ffc0dc80d9ac7cf6cf1b13824bc2a1e795f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit b9d1dc43f2764d765caf9fa8102aafea268ed3bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 15:06:41 +00:00
Allan Sandfeld Jensen
ac05ca5072 Handle macOS 11 issues in softHyphens test
Calculate the effective width of the hyphen better, and compare with
ceiled sizes.

Fixes: QTBUG-90698
Change-Id: I7ed2eb44c54240ecb2f8a38e5acf1f32608b2bfb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0ffdbb21261eee3a9ec1cd541478ee883a12065c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 15:06:07 +00:00
Laszlo Agocs
d95069771b eglfs: kms: Log gbm bo handle and stride as well
Change-Id: Ie345a3f4a4ab0407e3c532c6385ae31ca698d628
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 3bda970935d4d54c07fa1d6454e2472abff66a77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 15:06:02 +00:00
Assam Boudjelthia
c834aefa77 Fix compiler warnings for QFontMetrics use
Change-Id: I4c416280cef8c316258817184e94962c250370da
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d6b9200e329281269ad8c74177f2b2621798ae56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 14:33:22 +00:00
Peter Seiderer
b5ff6da096 CMake/QtAutoDetect: fix failure with multiline toolchain file
The unquoted 'string(FIND ${toolchain_file_content} ...)' call fails for
multiline content of the variable toolchain_file_content, so add
quotes around, fixes:

  [...]
  CMake Error at cmake/QtAutoDetect.cmake:42 (string):
    string sub-command FIND requires 3 or 4 parameters.
  Call Stack (most recent call first):
    cmake/QtAutoDetect.cmake:311 (qt_auto_detect_android)
    CMakeLists.txt:19 (include)
  [...]
  -- Configuring incomplete, errors occurred!

in case the given toolchain file starts with multiple lines
in the first 80 characters, e.g. in the case of buildroot:

  #
  # Automatically generated file; DO NOT EDIT.
  # CMake toolchain file for Buildroot
  #
  [...]

Task-number: QTBUG-90980
Change-Id: I8e038e08d83016e8253f2e83b2efb8f06034c6cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 8aff901f70def69c2ac56754ef4146150e43bf8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-08 12:11:23 +00:00