Commit Graph

37378 Commits

Author SHA1 Message Date
Thiago Macieira
2851edc027 Merge "Futex/Windows: add support for notifying TSan" 2021-03-11 20:34:00 +00:00
Fabian Kosmale
fb7bad01fe Merge "QObject: remove QAbstractDeclarativeData::parentChanged" 2021-03-11 18:03:39 +00:00
Thiago Macieira
d424ccdb77 Futex/Windows: add support for notifying TSan
The code was already there, just only implemented for Linux.

Change-Id: Ib709fc1585f647a98d54fffd16663881b6d24d6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-11 17:42:35 +01:00
Tang Peng
b5615d3921 Remove unreachable code
Having a `break` after a `return` is pointless as it's never reached.

Change-Id: I30877e926c006fac45681f547e97a55410f02e43
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-11 16:11:00 +00:00
Alex Trotsenko
6bd6151329 QProcess/Win: implement async closing of write channel
Instead of blocking in QProcessPrivate::closeWriteChannel(), we can
handle a pending close in _q_canWrite() slot when there is no more
data to write.

Change-Id: I2a30789b6099a2ec075292348ebe33a11341bca3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-11 16:05:40 +02:00
Paul Wicking
5fa8f5df7b Doc: Change section titles that cause bad links
Section titles are valid targets for QDoc's autolinker. When
they are identical to other valid link targets, such as for
example a class, these sections may cause invalid links.

Pick-to: 6.0 6.1
Fixes: QTBUG-91141
Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-03-11 15:01:35 +01:00
Paul Wicking
b42df9756a Doc: Add hyperlink to relevant section
Pick-to: 6.0 6.1
Fixes: QTBUG-91734
Change-Id: I3910c7fcf1625ad08a65e691a8eaf9ed6b61779a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-03-11 15:01:33 +01:00
Fabian Kosmale
e8b7e4e96a QObject: remove QAbstractDeclarativeData::parentChanged
The code in qtdeclarative did not do anything at all anymore.

Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-03-11 14:53:26 +01:00
Mårten Nordheim
d76c0e3224 Merge "QEventDispatcher(Win): Always honor interrupted status to avoid races" 2021-03-11 13:31:17 +00:00
Eskil Abrahamsen Blomfeldt
3102d611bd Merge "Support family names that end/start with space" 2021-03-11 13:09:00 +00:00
Laszlo Agocs
aa9b4bd01e Merge "rhi: metal: Stop using BufferOp for no good reason" 2021-03-11 11:33:53 +00:00
Mårten Nordheim
f274f91ceb QEventDispatcher(Win): Always honor interrupted status to avoid races
There may be a race where e.g. thread 'B' is woken up by a queued invoke.
At the same time thread 'A' asks 'B' to quit, which will set various
atomics (some important ones are 'interrupt' in the dispatcher and
'exit' in the event loop), but it does _not_ try to send another wake
since there is already an unhandled wake triggered by 'B' itself.
Sadly 'B' reads the 'exit' atomic before 'A' updates it.
Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to
it, meaning 'A's interrupt is ignored. Then, since there is no
interrupt, 'B' goes back to waiting for events, leaving the thread alive
and running instead of quitting.

Maybe this has unforeseen consequences (one consequence is that it will
return and re-enter the event dispatcher once more, possible
unnecessarily)

Fixes: QTBUG-91539
Pick-to: 6.1 6.0 5.15
Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-11 12:11:18 +01:00
Zhang Yong
02bc441553 The conditional statement is missing parentheses
Add a ')' to the judgment statement.

Change-Id: Iadfdfb7643bc5224cb3029a2abb42c3c14982eef
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-11 19:10:07 +08:00
Eskil Abrahamsen Blomfeldt
7fd9ed3201 Support family names that end/start with space
If the family name starts or ends with a space in the actual font
data, then this would not be selectable by Qt. This is because we trim
the family name before matching it against the contents of the database.

Testing on Windows GDI, it actually does trim the spaces on the
family names (matching a request for "Chibola" with a font called
"Chibola " for instance), but since we read the font data ourselves,
we are not doing this.

To ensure we never have font names that cannot be matched in the
database, we make sure we trim the family names before registering
them.

[ChangeLog][QtGui][Text] Fixed matching against fonts which has a
family name that ends or starts with a space.

Task-number: QTBUG-79140
Pick-to: 6.1
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I9cdb50b78a7da2d2697f992ce462033eb1d7ada7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-03-11 11:55:46 +01:00
Laszlo Agocs
adf6ba7eae rhi: metal: Stop using BufferOp for no good reason
Do what the Vulkan backend does, and just take the offset
and the QRhiBufferData. There is no reason to store a full
QRhiResourceUpdateBatchPrivate::BufferOp struct within the
backend.

Change-Id: I67528029de40320b3e4f031346d40dfc0bb9ab52
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-03-11 10:17:13 +01:00
Laszlo Agocs
0c6375a346 rhi: metal: Skip unnecessary writes when updating the entire buffer
Follow the similar Vulkan change in 20eb40bce9
and drop the queued up buffer data for a given slot when the current update
covers the entire buffer. This is relevant in particular for Qt Quick 3D
where such dynamic buffer changes are common.

Change-Id: If1e70d78968586b552a5357bc97af10cc61d9611
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-03-11 10:17:00 +01:00
Joerg Bornemann
a21fe37c72 Remove now unneeded QT_BOOTSTRAPPED check from qlibraryinfo.cpp
Since qmake links against QtCore, we don't need to check for the
bootstrapping case in qlibraryinfo.cpp anymore.

Change-Id: I644b1e71db727773b3e32ac650481df134acf033
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-03-11 10:00:24 +01:00
Joerg Bornemann
e158d699e0 Remove all qmake-related data from q[make]config.cpp
Now that we're not actually using qmakeconfig.cpp anymore, we can remove
it together with all qmake-related information that was written into
qconfig.cpp.

This also moves the qtConfEntries array back to qlibraryinfo.cpp.

Change-Id: I5e57d8c55613332cc3e57b11df4398d46aed259b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:18 +01:00
Joerg Bornemann
a08b1f6359 Read QLibraryInfo paths directly from QLibraryInfo and not from qmakeconfig.cpp
Change-Id: I1db1c871ec6b4e572bd36df6aff7a5be8a4a706c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:01 +01:00
Joerg Bornemann
c651e7ba18 Do not write Sysroot and SysrootifyPrefix into qmakeconfig.cpp
Those have fixed values.

Change-Id: I7f1ba8036f43413d3c805f4b419ae79e037343fb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:51 +01:00
Joerg Bornemann
17055f5f48 Remove the platformsSection constant from qconfig.cpp.in
This is not configurable and doesn't have to be in the generated
q[make]config.cpp files.

Change-Id: If294d735800a3b5c6b3e269abdd86df401cf4864
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:27 +01:00
Yang Yuyin
2a9c93a348 QIcon::setIsMask: delete extra judgment
QIcon::detach can judgment if the d pointer is nullptr

Pick-to: 6.1
Change-Id: I90fd5f50ed2565a5654b978c4603635e62677953
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-11 16:58:45 +08:00
Laszlo Agocs
dd7087342d rhi: metal: Avoid unused argument warning on iOS
Change-Id: I4cb729f3d8dbe7703b89153b742ce2874f35cfd2
Pick-to: 6.1 6.0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-10 16:21:03 +01:00
Laszlo Agocs
83fb8fe208 rhi: metal: Use the layer as the single source of truth
...when it comes to the output size.

This mirrors what all other backends do. For example, with Vulkan
the only source of size is the surface (VkSurfaceKHR), never the
QWindow, even though we'd expect that the surface size equals
to window_size * dpr, and that's almost always true, but there
are exceptions. (e.g. we have seen bugs on Windows with some drivers
in high DPI situations where the Vulkan surface did not fully match
the window size, yet it is the surface, and only the surface, that
matters for rendering, i.e. viewports and such must match the surface,
not the native window)

With Metal we hit a similar problem on iOS: the QWindow's size*dpr
and what we calculate from the CAMetalLayer have a height difference
of 1.

Mitigate this by making QRhiSwapChain::surfacePixelSize() and the
calculation for currentPixelSize() done via the same route (the
CAMetalLayer). Otherwise, if there is a mismatch between what the
QWindow and the layer says, Qt Quick will think that there is a
resize happening (has happened) whenever starting a new frame, and that
has far reaching consequences (suboptimal performance, increased
memory usage by buffers, etc.)

Change-Id: I114df92bf35622c99f2747420fdce401db7705a6
Pick-to: 6.1 6.0
Fixes: QTBUG-91438
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-10 16:20:53 +01:00
Piotr Mikolajczyk
e6ca200a3a Android: Fix constant resize of a large TextEdit on click
If there is a large (3/5 of the screen in portrait or 2/3
in landscape) TextEdit on the screen, and it gets focus
on click, it will be shrank to fit the screen. Next click on this
TextEdit will restore its normal height, the next will shrink.

Pick-to: 5.15
Fixes: QTBUG-91056
Change-Id: I3dbf085cbfdc2739d537a304c16e28c58a6e01ce
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-03-10 13:11:33 +01:00
Topi Reinio
4916255445 Doc: Fix warnings on qproperty.cpp
Task-number: QTBUG-90662
Change-Id: I91f8b83c68c3692dc620063c93be9ddea64685a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-03-10 08:11:04 +01:00
Zhang Yong
1df915ee1d QtGlobal docs: code tidies
Reformat a couple of examples correctly.

Change-Id: I2f0897267b4e3c4d7d2925f2d20cc45687278b0b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-10 01:42:44 +00:00
David Faure
1d567eb63d Merge "QConcatenateTablesProxyModel: skip dataChanged in hidden columns" 2021-03-09 15:32:01 +00:00
Thiago Macieira
35e9c21793 Merge "QProcess/Unix: add a RAII class to hold the argv and envp pointers" 2021-03-09 14:55:58 +00:00
Laszlo Agocs
b33462614f Merge "rhi: gl: Fix missing uniform data with certain command lists" 2021-03-09 13:45:23 +00:00
Elvis Lee
b34462c840 Merge "Support EGL protected content extension" 2021-03-09 13:25:00 +00:00
David Faure
f6efbd23b5 QConcatenateTablesProxyModel: skip dataChanged in hidden columns
When the source models don't have the same number of columns, the proxy
keeps only the smallest number of columns across all source models.
Afterwards, if a source model emits dataChanged in a column past
that number (a "hidden" column), the proxy needs to ignore it rather than
assert.
But also, if the source model emits a dataChanged signal across both
visible and hidden columns, then the last column number needs to be
adjusted so that the signal is correctly processed and forwarded.

Task-number: QTBUG-91253
Pick-to: 6.1 6.0 5.15
Change-Id: I939e8ec0faf41370472f86785851292e4372f72c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-09 13:39:45 +01:00
Thiago Macieira
c452a040d3 QProcess/Unix: add a RAII class to hold the argv and envp pointers
Instead of having so much manual pointer manipulation and duplicated
code.

Change-Id: Ic90d8429a0eb4837971dfffd1664f8f63753440a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-09 12:22:12 +00:00
Laszlo Agocs
80029e0ca6 rhi: gl: Fix missing uniform data with certain command lists
Following patterns from the other backends is insufficient with OpenGL
because we do not use real uniform buffers. There is currently a
possibility that a shader program will be bound without following it
with setting uniforms. Correct this by having a second level of tracking
of the associated srb object in the pipelines.

Pick-to: 6.0 6.1
Fixes: QTBUG-91630
Change-Id: I74a012daade826dd22c436bde06381c1233bad11
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-09 12:00:48 +01:00
Elvis Lee
7a68aa6fc7 Support EGL protected content extension
A protected context is required to allow the GPU
to operate on protected resources, including protected
surfaces and protected EGLImages.

For example, GPU can post-process on protected content
like DRM protected content so that complex, nonlinear
video effects or mapping onto textures can be used.

The surface format option may be relevant for DirectX
and Vulkan in the future:

  https://microsoft.github.io/DirectX-Specs/d3d/ProtectedResources.html
  https://www.khronos.org/registry/vulkan/specs/1.1-khr-extensions/html/chap12.html#memory-protected-memory

Change-Id: I2d155f0e68b830276690b4833b22a2bc452cdcad
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2021-03-09 11:58:12 +01:00
Eskil Abrahamsen Blomfeldt
642ed84a2d wayland: Remove bogus warning about ignoring WAYLAND_DISPLAY
On Gnome, we will not default to Wayland at the moment, even
if the desktop is run in Wayland mode. In this case, we warn
users that they can still select Wayland manually using
QT_QPA_PLATFORM.

Problem was: We never checked if they had actually explicitly
selected Wayland, so even in the cases where we would end up
using that QPA plugin, people would still see the warning.

This moves the check to the end of the platform selection
algorithm, after we have collected all the information.

Pick-to: 6.0 6.1
Change-Id: I0d734bd0782c5e58d6dc63f69b7d531a479ad942
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-09 11:05:52 +01:00
Dong Rui
bac4495619 Delete duplicate condition in QComboBox::setPlaceholderText
There is a duplicate condition judgment in QComboBox::setPlaceholderText, just delete it.

Change-Id: I570415c5930372866f290216a89260353d3992b7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-03-09 13:20:53 +08:00
JiDe Zhang
bc1f61d010 Update documents of QLocale::Country
Quoting from https://en.wikipedia.org/wiki/ISO_3166:
"ISO 3166 is a standard published by the International
Organization for Standardization (ISO) that defines
codes for the names of countries, dependent territories,
special areas of geographical interest, and their
principal subdivisions (e.g., provinces or states).
The official name of the standard is Codes for the
representation of names of countries and their subdivisions."

In order to prevent the word "Country" from causing ambiguity, the
document should clearly state that this enumeration refers to a country
or region.

Change-Id: I05543faa4193b3ddaf31d02c670b4b5f46e94389
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-09 09:09:51 +08:00
Shawn Rutledge
065fd12f2d Merge "xcb: use QXcbScrollingDevice for a touchpad" 2021-03-08 22:23:17 +00:00
Shawn Rutledge
f85e70c569 xcb: use QXcbScrollingDevice for a touchpad
When using XQuartz on macOS, the virtual pointer device is detected as
a touchpad, not a mouse; but QXcbConnection::xi2HandleScrollEvent()
expects the device to be an instance of QXcbScrollingDevice for storage
of some state. A touchpad that has the scrolling capability must be
that type, not a plain QPointingDevice.

Fixes: QTBUG-91402
Pick-to: 6.1
Change-Id: I1b82766d4a3f87f656e56c0d8904def26fb0979a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-03-08 20:24:51 +00:00
Jan Grulich
acaabc9108 FileChooser portal: send window id in hex
We send window id in decimal, however, it is expected to be send in hex.
This causes a mismatch and makes portal dialog to show in background.

Pick-to: 5.15 6.0 6.1
Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-08 20:05:19 +01:00
Qiang Li
d2d957ff67 Merge "Fix the crashes when animated QTreeWidgetItems are hidden" 2021-03-08 14:38:56 +00:00
Qiang Li
f140ef04a0 Fix the crashes when animated QTreeWidgetItems are hidden
QTreeView's drawTree implementation performs lazy layouting
when calling itemDecorationAt. If animations are enabled,
this can change the list of items, and invalidate the copy
made earlier.

Don't copy the list of items, use a reference instead so that
code iterating over the items later operates on valid data.

Add an assert in the private itemHeight method, it must not
be called with an index that is out of bounds.

Fixes: QTBUG-42469
Pick-to: 6.0 6.1 5.15
Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-08 12:31:13 +00:00
Christian Ehrlicher
1df974590f QSql/MariaDB/MySQL: misc cleanup
Cleanup the mariadb driver a little bit:
 - use nullptr instead NULL
 - use unsigned long instead int for blob handling now that QByteArray
   can handle more than 2^31 bytes

Change-Id: I79639a42a739aabdf776cc688cb5d664248aa610
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-03-08 12:44:40 +01:00
Morten Johan Sørvig
6e899f8e8c Merge "Add deviceIndependentSize() to QPixmap and QImage" 2021-03-08 10:52:24 +00:00
Morten Johan Sørvig
1471f2ae09 Add deviceIndependentSize() to QPixmap and QImage
This function returns the size in device independent
pixels, and should be used when calculating user
interface sizes.


Change-Id: I528123f962595a3da42438ca560289a29aca4917
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-08 08:27:41 +00:00
Piotr Mikolajczyk
bacf9cd04c Android: Add grabWindow handling
Draws to a pixmap contents of the requested window. On Android it works
only for QtWidgets application.

Qml application contents could not be grabbed due to lack of access to
the contents of OpenGL framebuffer from QAndroidPlatformScreen

Fixes: QTBUG-63275
Pick-to: 5.15
Change-Id: Ief7de1b709387d798138387bb735f4b48cf2928d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-03-08 08:00:18 +00:00
Nick Shaforostoff
4f37cf2ce5 string 16<->8 bits conversion: SIMD on arm32
this adds emulation for 2 NEON commands that armv7 lacks
this increases conversion speed by around 50% in my simple tests

Change-Id: I4f52d353184e9a8d88089de60e17bd5670637c0c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-08 00:31:23 +01:00
Thiago Macieira
d58d0bb970 Merge "QNetworkInterface/Unix: fix DNS eligibility of global addresses" 2021-03-06 00:05:35 +00:00
Thiago Macieira
83876c0256 QNetworkInterface/Unix: fix DNS eligibility of global addresses
[ChangeLog][QtNetwork][QNetworkInterface] Fixed the reporting the "DNS
eligibility" factor (QNetworkAddressEntry::dnsEligibility) for global IP
addresses. Previously, QNetworkInterface interface erroneously reported
all global addresses as eligible, regardless of whether they had already
been deprecated by the OS or were temporary in the first place.

From the tst_QNetworkInterface::dump output (netmask & broadcast
suppressed for readability, IPv6 prefixes changed to protect the
innocent, but the local part is exactly as found on my system):

   address  0: 192.168.26.33/24  dns-eligible preferred:33546998ms valid:33546998ms
   address  1: 2001:db8::800/128  dns-eligible preferred:264817000ms valid:264817000ms
   address  2: fd00::800/128  dns-eligible preferred:forever valid:forever
   address  3: 2001:db8::2f5b:342c:fc53:b9b2/64  dns-ineligible preferred:12422000ms valid:264817000ms
   address  4: fd00::9351:adff:333d:5c8d/64  dns-ineligible preferred:12421999ms valid:531402999ms
   address  5: fd00::7297:9516:fbb4:17ac/64  dns-ineligible preferred:0ms valid:445585999ms
   address  6: fd00::fdc8:e620:691:3b44/64  dns-eligible preferred:forever valid:forever
   address  7: 2001:db8::ae82:a01:5a8a:e210/64  dns-ineligible preferred:0ms valid:264816999ms
   address  8: 2001:db8::c673:e0a2:8927:2118/64  dns-eligible preferred:264816999ms valid:264816999ms
   address  9: fe80::bd89:b998:4aeb:a5d0%bond0/64  dns-ineligible preferred:forever valid:forever

Prior to this commit, only address 9 was showing as ineligible.

Addresses 1 and 2 come from DHCPv6 and are thus always eligible.
Addresses 3, 4, 5, and 7 are temporary addresses added on account of
RFC 4941 and are therefore ineligible (they have the IFA_F_TEMPORARY
flag set). Note how 5 and 7 have also stopped being preferred. Address 3
is the one I see when I go to ip6.me and address 4 is the one used to
reach the router.

Addresses 6, 8, and 9 are the "permanent" addresses that would normally
be based on the MAC address of the interface, but are actually in
"stable privacy" mode for me (RFC 8064). Address 9 is the link-local
one, which makes it ineligible, leaving the other two stable addresses
eligible.

Addresses 1, 3, 7, and 8 are global, from a DHCPv6-PD delegation from my
ISP, which is why they have finite lifetime. Addresses 2, 4, 5, and 6
are from my local Unique Local Address (ULA) prefix, which is why 2 and
6 are valid forever.

Pick-to: 6.1
Change-Id: If8b43dc9678c4b4ba9c1fffd1668fdcae873c6bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-03-05 13:56:31 -08:00
Timur Pocheptsov
734ab493f7 Fix a BIC introduced by extending the namespace QSsl in _p.h files
Renamed the private part of the namespace to QTlsPrivate.

Fixes: QTBUG-91531
Change-Id: Id2d9c458d8d958b35e437eee42889177dad0a7a7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit e4efa00c72c7011f4e5c27722c2a522b30274610)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-05 20:50:02 +00:00
Andreas Buhr
b2c96423bb Merge "Add documentation for Q_OBJECT_BINDABLE_PROPERTY" 2021-03-05 18:51:54 +00:00
Allan Sandfeld Jensen
d9da78b620 Merge "Add ARM version of the "AES" qhash algorithm" 2021-03-05 18:45:55 +00:00
Fabian Kosmale
9e6ad5dc22 Merge "qtypeinfo: make variable templates inline" 2021-03-05 17:18:47 +00:00
Øystein Heskestad
de658d8ca5 Merge "Make qdecompresshelper archive bomb check only trigger for large files" 2021-03-05 16:32:49 +00:00
Allan Sandfeld Jensen
ecf84e0989 Add ARM version of the "AES" qhash algorithm
Change-Id: Ia2c20e970a0149efb7665a5690538f83965e7be7
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-03-05 18:31:27 +02:00
Andreas Buhr
89cc39a894 Add documentation for Q_OBJECT_BINDABLE_PROPERTY
The duo Q_OBJECT_BINDABLE_PROPERTY and QObjectBindableProperty
can only be documented together. The documentation is now with
QObjectBindableProperty. This patch adds a documentation entry
for Q_OBJECT_BINDABLE_PROPERTY which links the user to
QObjectBindableProperty.

Task-number: QTBUG-90511
Pick-to: 6.0 6.1
Change-Id: I9af4a99d49f4b02ee9645a2cc9a9a024a6a1a552
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-05 15:42:45 +00:00
Wang Yicun
89e9164abb Merge "Simplify code, remove redundant condition" 2021-03-05 15:35:26 +00:00
Zhang Hao
f13451539f Merge "Code tidies" 2021-03-05 15:14:28 +00:00
Giuseppe D'Angelo
bcedeb6d3d Merge "QPoint(F): declare as PRIMITIVE, not RELOCATABLE" 2021-03-05 14:38:41 +00:00
Fabian Kosmale
6de9acf779 qtypeinfo: make variable templates inline
And refactor the TMP to use std::conjunction and use variable template
specialization instead of template class specialization for the base
cases.

Change-Id: Iea6a03f13ea3443a0fa7365af21c496670c1e07f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-03-05 15:30:05 +01:00
Øystein Heskestad
be73ca7eb1 Make qdecompresshelper archive bomb check only trigger for large files
This is to avoid false positives.
By default files are large if uncompressed size > 10 MB. Only configurable internally.
Also add auto tests.

Task-number: QTBUG-91392
Pick-to: 6.0 6.1
Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-05 15:13:53 +01:00
Wang Yicun
a913002f13 Simplify code, remove redundant condition
'clazz || (!clazz && isCached)' is equivalent to
'clazz || isCached'

Done-with: Tang Peng <tangpeng@uniontech.com>
Pick-to: 6.1
Change-Id: Ie9eab4a94a61be2b360f64980c4666a622f3a209
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-05 13:52:31 +01:00
Paul Wicking
c1c61c3bb4 Doc: Fix section titles that confuse QDoc's autolinker
Fixes: QTBUG-91620
Pick-to: 6.1 6.0
Change-Id: I7c407c7158324d1fbbeb78e47d2198e8ddf5daa0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-05 13:47:53 +01:00
Zhang Hao
2801dc7f04 Code tidies
The return type goes on the same line of the rest of the signature.

Change-Id: Icacf2e00ed2876c4c9b72b8f6c428c2e37ee42a7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-05 12:26:47 +00:00
Toni Saario
90371e9250 Merge "Skip globalstatic threadStressTest on QEMU" 2021-03-05 11:02:17 +00:00
Giuseppe D'Angelo
48f685f5e5 QPoint(F): declare as PRIMITIVE, not RELOCATABLE
These types can be copied via memcpy, so use the correct tag.

Change-Id: Icba37d42dd8658225ce4889284661d108122d489
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-05 11:19:46 +01:00
Giuseppe D'Angelo
5f501b0e97 QQuaternion: mark as PRIMITIVE type
Change-Id: I043fef8bfc66875b72f34e7939e78c7d1c7f5381
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-05 11:19:44 +01:00
Piotr Mikolajczyk
5c6b10c3ce Android: Place cursor correctly on screen when editing
When editing text the cursor is not placed correctly. So this
has been achieved by tricking Android into thinking that the
input area is only the line where the cursor is, so it is
forced to keep it on screen.

Fixes: QTBUG-91073
Pick-to: 5.15
Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-03-05 07:57:14 +00:00
Wang Yu
852b070529 QContiguousCache: Remove redundant condition
The reverse condition was already checked three lines before.

Pick-to: 6.1
Change-Id: I2f78262004871ec2f3730e2a25f26fe22636cde7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-05 07:27:14 +00:00
Allan Sandfeld Jensen
9fb81fc287 Merge "Add QColorSpace::description" 2021-03-05 00:04:34 +00:00
Volker Hilsheimer
26b53173d6 Merge "QMenu test: turn tooltip animations off" 2021-03-05 00:02:41 +00:00
Volker Hilsheimer
a60f763f25 Merge "Protect against self-assignment, plug potential memory leak" 2021-03-04 22:24:48 +00:00
Joerg Bornemann
48488b810f Fix Android build
The Android build failed, because the namespace QNativeInterface could
not be found. Include the header file where it's defined.

Change-Id: If53eda4d4d4e6d5e66787d74c714215721ba0b60
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-03-04 22:39:21 +01:00
Allan Sandfeld Jensen
01c55405fa Add QColorSpace::description
A way to read the description of the profile from ICC, or set one
yourself.

Change-Id: I68622e30ee209cac99c41f3df934712c3548c0de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-04 22:37:08 +01:00
Paul Wicking
3ae67b4434 Merge "Doc: Use correct include for QWGLContext" 2021-03-04 21:24:32 +00:00
Volker Hilsheimer
3ae09debab Protect against self-assignment, plug potential memory leak
Fixes static analyzer warning f03d95823e9f1395d64501cc111f0f63

As a drive-by, plug the potential memory leak if the assigned-to
QDockAreaLayoutItem already holds a QDockAreaLayoutInfo object.
The subinfo is deleted in the destructor, QDockAreaLayoutItem
has ownership for the subinfo.

Pick-to: 6.1
Change-Id: I8546adc6fb0537078eea9dfb45d1bd9967d8d149
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-04 19:58:44 +01:00
Paul Wicking
15f934dcea Doc: Use correct include for QWGLContext
Pick-to: 6.1 6.0
Task-number: QTBUG-91500
Change-Id: If487a2d14dd61d127dc35aa039f9b71915128da1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-04 18:32:32 +01:00
Thiago Macieira
224c638f78 QProcess/Unix: use a common function to find the target executable
This harmonizes the execution between start() and startDetached(). Both
did QStandardDirs::findExecutable(), but duplicated code. However, only
start() supported launching .app bundles on Mac.

[ChangeLog][QtCore][QProcess] startDetached() now supports launching
.app executable bundles on macOS / iOS systems, like start() already
did.

Change-Id: Ic90d8429a0eb4837971dfffd1664f776b2c0edfd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-04 09:14:04 -08:00
Alexey Edelev
3875575ab6 Merge "Fix build of Core module without regularexpression feature" 2021-03-04 13:32:07 +00:00
Joerg Bornemann
94d5c1bfe0 Merge "Remove win32_system_libs feature from src/corelib/configure.json" 2021-03-04 11:26:42 +00:00
Kai Köhne
52f99ff3d2 Merge "headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVC" 2021-03-04 11:11:36 +00:00
Alexey Edelev
6e5e8016dd Fix build of Core module without regularexpression feature
qregularexpression.h requires FEATURE_regularexpression to be enabled.
Add a condition to the 'qt_pch.h' header to fix the build when PCH
are enabled and FEATURE_regularexpression is disabled.

It seems that the filter implementation of QSortFilterProxyModel
has QRegularExpression as its base. It's necessary to make
sortfilterproxymodel dependent on the regularexpression feature.

Fix the precompiler condition for the extractSections function in
the QString implementation. Use the same precompiler condition for
the QString::section and extractSections functions, since
QString::section depends on extractSections.

Change-Id: I5b775e0842a0aa1a8d47f8dded376bdfcf63b5bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-04 11:31:36 +01:00
Joerg Bornemann
4b9173e354 Fix QT_HOST_LIBEXECS for cross-builds on Windows
Like for LibraryExecutables, we must default to "bin" on Windows for
HostLibraryExecutables in our generated qconfig.cpp.

Pick-to: 6.1
Fixes: QTBUG-91496
Change-Id: Ib5a4b3b3fd6192bd953e615058b482e67ad19462
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-04 10:31:31 +00:00
Albert Astals Cid
eeb4c0a1c9 Merge "Fix signature of canDropMimeData used in code snippet" 2021-03-04 10:22:45 +00:00
Andrei Golubev
70bd6bf1e3 Merge "Fix compilation error in QDateTime" 2021-03-04 09:40:01 +00:00
Joerg Bornemann
00b75e86f3 Remove win32_system_libs feature from src/corelib/configure.json
This feature only existed to trigger the evaluation of the libs gdi32,
kernel32 and friends. Those libs only were relevant for the qmake build
of Qt and can be removed now.

Task-number: QTBUG-83932
Change-Id: Idfd4d8f70b6dbd1067412fecc1115b504b1ad347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-03-04 09:56:09 +01:00
Sona Kurazyan
fcc453df5c Improve docs for Qt Concurrent run with promise mode
For the readers that are new to QtConcurrent, it may be confusing that
unlike the normal usage of QPromise, they don't have to call start() or
finish() when using Qt Concurrent run with promise mode. Be more
explicit about that.

Pick-to: 6.1
Change-Id: I08df6c4ca41bec4120e208a6643ee20c7adf265c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-03-04 09:45:31 +01:00
Timur Pocheptsov
7c1aa0c48c Convert QDtls classes to the new plugin-based design
Essentially, the same code re-shuffled and placed behind
the new interfaces.

Fixes: QTBUG-91174
Task-number: QTBUG-65922
Change-Id: I8f14697f10713f9738c5c7805aed0150c084850c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6c835796c8ea2590008900ffb5f4bf0d902ee73d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-04 08:40:07 +00:00
Albert Astals Cid
b22fe78d85 Fix signature of canDropMimeData used in code snippet
Change-Id: I9026e11630651e740282466551ad78883a0421ec
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-04 09:04:17 +01:00
Eirik Aavitsland
ede0082f86 Update bundled libjpeg-turbo to version 2.0.6
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.6

Pick-to: 6.1 6.0 5.15 5.12
Change-Id: I3e308d241853edf3c1d616955cda203220a258d8
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-03-04 09:04:02 +01:00
Andrei Golubev
538e9fa568 Fix compilation error in QDateTime
One of the changes done in 902505a058
results in a compilation error: somehow an expression
"int * enum value (with underlying type qint64)" has result type
"long int" and thus the compiler cannot find matching add_overflow

Return the qint64 cast back to overcome this
Compiler: gcc 7.5.0-3ubuntu1~18.04

Change-Id: Iaca882762e812bef69ec325df5f59e02082a0130
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-04 08:26:30 +01:00
Giuseppe D'Angelo
fe9d7bf759 QScopedPointer: deprecate swap
Follow up of 612a01be65
(deprecating QSP::take()): for the same reasons, swap()
functions do not belong to QScopedPointer, or they would
allow the pointer to escape:

  QScopedPointer a;
  {
    QScopedPointer b = ~~~;
    qSwap(a, b);
  }
  // b's pointer escaped its scope

Deprecate them as well.

[ChangeLog][QtCore][QScopedPointer] QScopedPointer swapping
functions have been deprecated, as they would allow the
managed pointer to escape the scope. If you need those semantics,
use std::unique_ptr instead.

Change-Id: I2b0938b62f2ef5a3561f61f595a3fb4c505a8f08
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-04 06:49:02 +01:00
Zou Ya
712117f8b8 Redundant condition: tornoff
Redundant condition: tornoff.
'!tornoff || (tornoff && scroll)' is equivalent to
'!tornoff || scroll'

Pick-to: 6.1
Change-Id: I8339faa4d53360db280173ee489e48eba4883b70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-04 10:34:43 +08:00
Huang Jie
d3ec08eea0 Redundant condition: widget
Redundant condition: widget. '!widget || (widget && widget->isEnabled())'
is equivalent to '!widget || widget->isEnabled()'

Pick-to: 6.1
Change-Id: Ife915bd5ea66f8ccff48a1612f8c78c263075c89
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-04 10:33:40 +08:00
Huang Jie
8a226cd76b Variable is Assigned a never used value in qt_make_filter_list()
Variable 'i' is assigned a value that is never used in qt_make_filter_list()

Pick-to: 6.1
Change-Id: Id845ecb5231b97a899443bdcb9f49cccb7f20bea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-04 02:33:03 +00:00
Volker Hilsheimer
6e334a85a8 QHostInfo: simplify assignment operator
The d_ptr is never nullptr. If it could be, then other's d_ptr could
also be nullptr, and we would dereference the null pointer.

Guarding against self-assignment is nevertheless a good practice.

Fixes static analyzer warning
5fc3780532e30c6350a0aa1ad2188a4c.

Pick-to: 6.1
Change-Id: I07ff808e4c4f5bf07b4d6663f1fb4a3301a0fec7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-03 23:41:25 +01:00
Volker Hilsheimer
90b51219dd QMetaType::create: don't leak memory if copy can't be made
QMetaType::construct will return nullptr if a copy is requested but
if there is no copy constructor. In that case, the memory allocated in
QMetaType::create will be leaked.

This case is covered in the unit tests in

template<>
void testCreateHelper<QMetaType::Void>()

so we can't assert in construct that a copy constructor is present if
a copy is requested.

Fixes static analyzer warning 618b1e6877f737df57c39fd35ad91cd4.

Pick-to: 6.1
Change-Id: Ic439b36b1f120b9d0f888efaeab2801d8acc13de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-03 23:41:14 +01:00
Giuseppe D'Angelo
0eca1f4a46 Merge "Port some value classes away from QScopedPointer" 2021-03-03 21:18:38 +00:00
Giuseppe D'Angelo
1086d9a572 Port some value classes away from QScopedPointer
In preparation for deprecation of QScopedPointer::swap, port to
other established solutions:

* QPainterPath was basically a QExplicitlySharedDataPointer
re-engineered around a QScopedPointer. Just use the right class
for the job...

* QBrush is in a similar situation, although its deleter is
more complex; port to unique_ptr for that one to minimize the
code impact.

Change-Id: I7f7c1dd8702f84f5146043347af64dda3c7e6f09
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-03 19:36:23 +01:00
Volker Hilsheimer
7b3883614d Initialize out-variable
QMetaType::convert does have code paths where nothing is written to the
'to' out-variable. Those code paths shouldn't run in this particular
case, but it's good practice to initialize out-variables anyway.

Fixes static analyzer warning 1453920f5abe1e30471eca6aa01d22d1.

Change-Id: I6f6d1044759866c405e61cb51147ca0490c4f3a4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-03 19:16:55 +01:00
Timur Pocheptsov
3bf0a40a3b Merge "Convert elliptic curves and DH params to work with QTlsBackend" 2021-03-03 16:17:48 +00:00
Volker Hilsheimer
9a1f2c2461 Merge "Don't access data in moved-from object" 2021-03-03 15:31:17 +00:00
Timur Pocheptsov
ff76599b59 Convert elliptic curves and DH params to work with QTlsBackend
The corresponding API is becoming a part of QTlsBackend interface,
since it's too minimalistic and does not require additional
interfaces, unlike certificates or keys.

Fixes: QTBUG-91177
Fixes: QTBUG-91175
Task-number: QTBUG-65922
Change-Id: I44dd0adbdf2427962451998664efe234d59fae24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cdf4976b5a01bc5b65aed746acc9cc7f87b0fd97)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-03-03 14:52:16 +01:00
Paul Wicking
afde5faf85 Doc: Specify correct include for QWGLContext
Pick-to: 6.1 6.0
Fixes: QTBUG-91500
Change-Id: Ie842c9e911fe5492cc13aeba459d28d6553438fd
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-03-03 14:51:01 +01:00
Laszlo Agocs
2cfbce4bc6 QOpenGLTexture: Fix typo in enum value
Pick-to: 6.1
Fixes: QTBUG-91431
Change-Id: I59c37de527f53339130216997402f325d0badb12
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-03-03 14:50:59 +01:00
Volker Hilsheimer
4daf83a0dc Don't access data in moved-from object
It's undefined behavior, esp since we leave it to the compiler to
implement a move constructor for the ButtonInfo struct. So read the data
that we need first.

Fixes static analyzer warning
de76eedae524c86f89d6369c0f5af8c7.

Pick-to: 6.1
Change-Id: I8fc458b7e9ba8904ec7a3b1c26aac0628e336ea2
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-03 14:12:08 +01:00
Zou Ya
b487a7929d The condition 'if(oldChild)' is redundant
Either the condition 'if(oldChild)' is redundant or there is possible
 null pointer dereference: oldChild.

Pick-to: 6.1
Change-Id: I28971cfa33294679ddd325158669b422b3a1c2eb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-03 20:52:45 +08:00
JiDe Zhang
b18a845bef Merge "fix: Print a warning message if the Xcb EGL initialize failed" 2021-03-03 11:40:28 +00:00
JiDe Zhang
cc7911beb1 fix: Print a warning message if the Xcb EGL initialize failed
Before, No matter what the value of "success" is, Will print
the "Xcb EGL gl-integration successfully initialized".
If egl initialization fails, this line of printing will be very
confusing.

Change-Id: I6a06e2c14372913823c56ffe2fd8b831e084c719
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-03 17:10:06 +08:00
Volker Hilsheimer
d984fd13ad QGraphicsWidget: don't dereference nullptr
Unlikely that one item is nullptr and the other item doesn't have a
scene, but we do already test for the scene pointer, so don't continue
if it's nullptr.

Fixes static analyzer warning f59576ecf6618447c4f9c7be93fc737f

Pick-to: 6.1
Change-Id: I6d436bb1211ddd412821d6978bab25192033f5e5
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-03 10:00:30 +01:00
Volker Hilsheimer
95e34f7fbc QGraphicsWidget: Check for nullptrs in focus chain handling
The while loops terminate if focusAfter becomes nullptr (unless we break
earlier), so don't dereference those pointers without checking first.

Fixes static analzyer warnings 979f2d508db4d5838f6c9b296120ce60 and
481f2ec7b5851bf19414478428f944b7

Pick-to: 6.1
Change-Id: I60fc5999907fe3b3146d7047ee1eff197719ab31
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-03 10:00:27 +01:00
Volker Hilsheimer
98db996576 Add nullptr checks to QGraphicsView classes
The styleInfo parameter defaults to nullptr, and the scene can evidently
be nullptr since we test for it before ungrabbing the mouse.

Fixes static analyzer warnings
fbd03604cc701651595a2ea33c5562b4 and
30fcb05194f3a2d121fc57b05e0ccf10

Pick-to: 6.1
Change-Id: I8e9d4fe4055115c366ada1cbb22a8f0839ba41da
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-03 10:00:22 +01:00
Ville Voutilainen
6e0ce4ee80 Android: make calling exit() conditional on an environment variable
Task-number: QTBUG-82617
Task-number: QTBUG-85449
Task-number: QTBUG-83043
Change-Id: I5ac67b5d57550e5a1f816e5db01f4aab31127283
Pick-to: 5.15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-03-03 08:18:41 +00:00
Alex Trotsenko
f265c87e01 Allow QWindowsPipe{Reader|Writer} to work with foreign event loops, take 2
When a foreign event loop that does not enter an alertable wait state
is running (which is also the case when a native dialog window is
modal), pipe handlers would freeze temporarily due to their APC
callbacks not being invoked.

We address this problem by moving the I/O callbacks to the Windows
thread pool, and only posting completion events to the main loop
from there. That makes the actual I/O completely independent from
any main loop, while the signal delivery works also with foreign
loops (because Qt event delivery uses Windows messages, which foreign
loops typically handle correctly).

As a nice side effect, performance (and in particular scalability)
is improved.

Several other approaches have been tried:
1) Using QWinEventNotifier was about a quarter slower and scaled much
   worse. Additionally, it also required a rather egregious hack to
   handle the (pathological) case of a single thread talking to both
   ends of a QLocalSocket synchronously.
2) Queuing APCs from the thread pool to the main thread and also
   posting wake-up events to its event loop, and handling I/O on the
   main thread; this performed roughly like this solution, but scaled
   half as well, and the separate wake-up path was still deemed hacky.
3) Only posting wake-up events to the main thread from the thread pool,
   and still handling I/O on the main thread; this still performed
   comparably to 2), and the pathological case was not handled at all.
4) Using this approach for reads and that of 3) for writes was slightly
   faster with big amounts of data, but scaled slightly worse, and the
   diverging implementations were deemed not desirable.

Fixes: QTBUG-64443
Change-Id: I66443c3021d6ba98639a214c3e768be97d2cf14b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-02 22:53:06 +02:00
Timur Pocheptsov
d316ae8e83 QSsl: fix UB pointer use
Weird macro had inverted notion of type safety: instead of casting
parameters and return values (they are pointers) to work with generic
OPENSSL_sk_xxx functions, it was ... casting a function pointer to an invalid
type to get ... nothing, but UB. Home-brewed (un)'safestack'!!!

Change-Id: Ib91a7ba4cd472f370836797e422456f91a4385b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9fc2f1f076b953ff0979fb73ed6e70ac9bde278c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-02 18:03:54 +00:00
Timur Pocheptsov
79138e41d6 Move QSslCertificate's details and cert-related code to the plugins
Also since we have to properly support 'no-ssl' configure option
(alas, we support QSslCertificate on such builds) - introduce
a minimal crippled QTlsBackendCertOnly, which depends on
X509CertificateGeneric.

Fixes: QTBUG-90954
Task-number: QTBUG-65922
Change-Id: Ib9d62903f16b7c0eaaa23e319a822c24a7631dc6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 41fc143635c25f937a557f09890601f6c7d38736)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-02 18:03:00 +00:00
Giuseppe D'Angelo
49bed939b6 Merge "Add the 6.2 deprecation macros" 2021-03-02 16:55:19 +00:00
Morten Johan Sørvig
2a5262c0dd Merge "High-DPI: Set the minimum scale factor to 1" 2021-03-02 16:00:51 +00:00
Giuseppe D'Angelo
29c2a6059f Add the 6.2 deprecation macros
... which makes me wonder, why isn't this stuff bumped automatically
when a minor version branch is created?

Change-Id: Ia43f898163a4baa0896a09bd13d65cf534fe1df5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-02 15:20:11 +01:00
Volker Hilsheimer
f28088873e Merge "QLabel: simplify createStandardContextMenu" 2021-03-02 13:58:43 +00:00
Morten Johan Sørvig
ee409e6f0c High-DPI: Set the minimum scale factor to 1
Avoid painting errors with dpr < 1, also for the PassThrough
mode.

This limits the minimum high-dpi scale factor to 1,
for the code path which determines the scale factor
based on screen DPI.

Pick-to: 6.1
Task-number: QTBUG-89948
Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-02 13:36:38 +00:00
Volker Hilsheimer
e718818745 QLabel: simplify createStandardContextMenu
If control is nullptr in the beginning, then it will be nullptr later as
well, and the function won't do anything. And if the effectiveTextFormat
is Qt::PlainText, then the linkToCopy will be empty, and the function
won't do anything, either.

So we can just handle these cases right away, making the code simplier.

Fixes static analyzer warning 43de3f3125108b4353afd94e94f59926.

Pick-to: 6.1
Change-Id: I5b8eb94a1e40c2725de6a168298d8f3bcde748eb
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-02 12:45:53 +01:00
Volker Hilsheimer
49113c905d Don't access moved-from object
Clang's static analyzer tooling warns about this access-after-move [1].
While the comment above the function indicated that this was deliberate
and relying on a moved-from QString being valid, it is still bad
practice.

Since 'str' is empty in moved-from state if - and only if - it was a
non-const reference, make a compile-time check of the constness of type
T instead.

[1] https://testresults.qt.io/codechecker/daily_analyses/qtbase/dev/qtbase-dev-20210301-e14ccf0553/qstring.cpp_clang-tidy_b0545db57a2cc5dac67a56f76322ffd0.plist.html#reportHash=209ee3db0b17d21919326a1ad6635318

Pick-to: 6.1
Change-Id: Iac1813b61b6a3c2ef4053b911a4043c5382f85e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-02 11:45:41 +00:00
Richard Moe Gustavsen
9d80deb92f cmake: disable snippets/graphicsview if "printdialog" is not available
The graphicsview doc snippet has an explicit
QT_REQUIRE_CONFIG(printdialog) check that will fail the
build if Qt is not configured with "printdialog".
This check should be mirrored in the cmake file, so that
we skip building the snippet in the first place if the
feature is not available.

As it stood, we would build the snippet if "printsupport"
was enabled. But this is too granular, as you can configure
Qt to have general print support, but at the same time, skip
the print dialog. This caused the build to fail on iOS.

This patch will check the correct feature in the cmake file.

Change-Id: I31acc1f7c257e08374ea7b84a7fc38c66f214271
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-02 11:08:07 +01:00
Allan Sandfeld Jensen
b984689ec8 Handle para tags the same way for OOB checks as the other tags
Do not include the first parameter in the main tag anymore. That is
a left over from before unaligned access was added.

Pick-to: 6.1
Change-Id: I2caf027c6b9930d3e23fe5ec8bdcd45db34835a9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-02 08:09:03 +01:00
Hou Lei
b46b33c817 Merge "Canonical type conversion" 2021-03-02 05:12:15 +00:00
Hou Lei
2b83e78f6e Canonical type conversion
Avoid C-style casts when possible.

Change-Id: I623d7bc62bd0e48a5e0493c892d6ad9b11b0ca0c
Reviewed-by: David Faure <david.faure@kdab.com>
2021-03-02 03:04:44 +00:00
Oliver Eftevaag
426b363761 Font style name 'Normal' and 'Regular' have the same meaning
Some popular fonts on linux systems follow a naming convention,
where font styles are named 'Regular', 'Italic', 'Bold' and
'Bold Italic'. Qt so far only accepts the words Italic and Oblique
interchangably, but not with Regular and Normal. This change will
make sure that Regular is interpreted the same as the Normal font
style.

Fixes: QTBUG-90396
Pick-to: 6.0 6.1 5.15
Change-Id: Ibbaf086de742c91f4d380c937ca80e846aa32a2e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-02 03:54:36 +01:00
David Faure
101581484b QCommandLineParser: fix crash if there's no QCoreApplication
It'll display <executable_name> instead in the help output.

Fixes: QTBUG-91430
Change-Id: Ib6211b24cdaa4683a4f62c90b5a1a20ba69f1cff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 23:03:00 +01:00
Friedemann Kleint
b579d8a05b Merge "Brush up the imageviewer example" 2021-03-01 21:27:22 +00:00
Alexey Edelev
d1101c460e Simplify prefix-related functionality of qmake
Since the QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH definitions keep the same
value in modern CMake build, no need to have special handling in cases
where these values are used in qmake. Also it will be useful to
specify the relative path to the prefix directory from the directories
different of 'bin' when use QMakeLibraryInfo.

Task-number: QTBUG-75870
Change-Id: I5a777001eb334dcf05e22853a514d4257352d59b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-01 17:36:56 +01:00
Alexey Edelev
93f55570c4 Remove unused definitions
QT_CONFIGURE_CROSSBUILD is always '0', so it's not necessary to keep
conditional compilation in QMakeLibraryInfo.

Also the QT_CONFIGURE_SYSROOTIFY_PREFIX definition is never used
in the project.

Task-number: QTBUG-75870
Change-Id: I1fe42dce40fddc6a72254736883f93aa4727f6b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-01 17:36:48 +01:00
Allan Sandfeld Jensen
90e9974f15 Handle desc tags the same way for OOB checks as the other tags
Including one entry of the value in the header is pointless after
the unaligned access rewrite, and a potentially dangerous pattern,
though safe here due to overchecking.

Pick-to: 6.1
Change-Id: I4c0380040f89920467c309503408f1df6f88423f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-01 15:51:24 +00:00
Edward Welbourne
b4ee126a75 Simplify QDateTimeParser::fromString() to always record the date-time
Previously, *datetime was only written to if the parse was a success.
When parsing a date-time that's invalid by virtue of falling in a
spring-forward gap, the parser returns a date-time that is invalid but
has a toMSecsSinceEpoch() suitable for use in creating a sensible
interpretation of the parsed string (in offset by the width of the gap
from the specified position in the gap). It is more useful to return
this value than a default-created QDateTime.

Change-Id: I89f39e729b1f9fede1532d8b82f6f676477ddadb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-01 16:45:17 +01:00
Edward Welbourne
83421e320b Try again if mktime() fails when we thought we knew DST-ness
When refreshing a QDateTime(,, Qt::LocalTime) we call mktime on data
obtained from it, passing in the DST status (when known; this keeps
two otherwise identical times in a fall-back distinct). One of the
tests relies on changing zone under the feet of such a date-time,
created in Hawaiian standard time; it serializes it, the reads it back
in Western Australian Daylight-saving time and expects the results to
be equal. However, the two differ in DST-ness, which leads to mktime()
failing for the Hawaiian original, with unwelcome results.

Notice this case, failure with DST-ness claimed known, and retry
without the claim, so as to correct the DST-ness.

Change-Id: Id0278df53130f76fc587769efe946ca9af1adc26
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 16:45:07 +01:00
Edward Welbourne
4a07947375 QTimeZonePrivate::dataForLocalTime: avoid {ov,und}erflow
When computing a recent and imminent time, to bracket the time for
which we want data, take care not to cycle round to the other end of
the range of representable times.

Rephrased comments on this function, in the process, to more
accurately reflect what we're doing.

Change-Id: Iacd36186abc6b19d0ca03981aec80b2c5af077b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 16:45:00 +01:00
Edward Welbourne
63fbabde23 Only store offsetFromUtc when sane (and assert sanity)
The addition of a sanity-assertion revealed that, for an invalid
time-zone, refreshZonedDateTime() left epochMSecs unset but computed
offsetFromUtc from it none the less. Leave it as zero in that case, or
any other where the conversion to UTC didn't give valid date and time.

Change-Id: I0ebd955798532e91e7e211bf065667e313ee5c2d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 16:44:51 +01:00
Edward Welbourne
5af6b59b6e Rework an assertion to eliminate a common sub-expression using a lambda
This take more lines but makes the condition clearer and the lines
shorter, even after converting to use the names for constants in the
condition.

Change-Id: I9e5b7b79ff62095ed11b8723be238444fd32d9c1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 16:44:43 +01:00
Edward Welbourne
902505a058 Use qint64 as base-type for an enum mostly cast to that type
Various constants used in qdatetime.cpp were cast to qint64() where
used. There ware also some Q_INT64_C()s, two of which should have used
members of this enum; the third suggested a new addition to the enum.
Adding that and basing the enum on qint64 eliminates the need for
casting, although one asprintf() does now require a cast back to int.
There were also some redundant casts to qint64(), so I removed those.

Change-Id: Ia51ad8020f037badb1506ca379da19098a8655f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-01 16:44:37 +01:00
Robert Löhning
976fede67c Limit value in setFontSizeFromValue()
Avoids overflows in QFreetypeFace::computeSize and
QFontEngineBox::boundingBox

Fixes oss-fuzz issue 30290

Pick-to: 5.15 6.0 6.1
Change-Id: If8e9ff74bf706a701e26832ad21b3439a3b437f7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-01 15:42:23 +00:00
Giuseppe D'Angelo
e14ccf0553 Kill qHash(QPointF)
QPointF operator== is fuzzy, hence it can't be hashed efficiently.
Prevent the erroneous addition of the overload by client code
by providing it as deleted.

Change-Id: I2cfaaf5c2c8896ec9a7929f7c7bf52a912d0450f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-02-28 20:31:31 +01:00
Qiang Li
269fdef53d Fix z-value of QGraphicsItems being ignored during draw
In QGraphicsScene's function draw, don't copy the children into a
const copy (to prevent detaching in the loops), as they might get
sorted. Instead, use a const reference.

Amends e349f787d5, which introduced
the bug by making a copy of the unsorted list.

Fixes: QTBUG-81316
Pick-to: 6.0 6.1
Change-Id: Iab9b87e75178a883806088a9db234c7a2aaa9301
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-28 19:05:32 +00:00
Giuseppe D'Angelo
cd13ec38a7 QBrush: get rid of an unused private function
No idea why it's there, it's unused.

Change-Id: Icf7b48e1e4ab37158a81e15ffa5a7125bfd10822
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-02-28 18:54:16 +01:00
Allan Sandfeld Jensen
840c8b4de2 Fix out-of-buffer in ICC curv parsing
After the unaligned ICC profile fix, we could read 2 bytes past the end
of the buffer for curv elements with 0 parameters, though we wouldn't
use or return the data.

Pick-to: 6.1 6.0 5.15
Change-Id: Ibea9fa2840c01d690716d8f48e301fbfa67aa163
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-28 17:45:05 +00:00
Fabian Kosmale
9d6ba110e8 QMetaType: Store QMetaObject for pointer to const QObject, too
Before this change, the QMetaType for T const* where T is derived from
QObject would not store the static QMetaObject of T. This commit changes
this. As a consequence, the metatype system can now convert between
const and non-const pointers to QObject. Note that this allows casting
const away; but so does C++ with const_cast.
In addition, a new flag, QMetaType::IsImmutable is introduced, and used
to tag the metatypes of pointer to const types. This allows code to
discern between pointers to mutable and const QObjects, which is
relevant for the QML engine.

Task-number: QTBUG-82354
Change-Id: I3e4e4f39f565bd99a65e161528ce5304df73d6d6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-02-26 09:10:31 +01:00
Fabian Kosmale
50e857a9cb QJsonValueRef: add missing operator[]
Change-Id: Iae165cd7bb2a7ea02d819fa25e0618d81f9a54f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-02-26 09:10:31 +01:00
Andreas Buhr
d1fcc5d94a Document requirements for getters and setters of bindable properties
Getters and setters of bindable properties have to be carefully
written to avoid several problems. This patch adds documentation
for this.

Task-number: QTBUG-89505
Task-number: QTBUG-90511
Change-Id: Ib25590b3d8d95c490d9555c0f258f48cb6cfe4a9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-25 17:21:15 +01:00
Volker Hilsheimer
8cc72e0f63 Assert that QWidgetPrivate::create creates a window
Assert the expected side effect of createTLSysExtra, which might not
allocate a window, but must do so in this case (as we have already
returned if the QWidget is not a window).

Fixes static analyzer warning 2f3bbfe8addb586445e96f8906d6769e

Pick-to: 6.1
Change-Id: I4d5b8651b3510eff8e4a7b25889c0521ba6a4247
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-25 17:11:09 +01:00
Allan Sandfeld Jensen
6315257184 Reduce warnings from ICC parsing
Messages about Qt deficiencies reduced to info, and info set as the
default message level.

Pick-to: 6.1 6.0 5.15
Fixes: QTBUG-91401
Change-Id: Ia97438f08de5e0383e77631dca9b253b47ef8167
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-25 16:08:44 +01:00
Alex Trotsenko
b7e08599cc QEventDispatcherWin32: get rid of the hook procedure
Instead of intercepting the WM_QT_SENDPOSTEDEVENTS message in the hook
procedure, we can handle it at receive points, making
qt_GetMessageHook() unnecessary.

Including general performance improvements, this patch fixes the issue
where some applications (e.g. Ableton Live) do not call a chain of
nested hooks for plugins.

Pick-to: 6.1 5.15
Fixes: QTBUG-90949
Change-Id: If8e96848392c6f10d45af2aac0567707d16af673
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Nuno Santos <nunosantos@imaginando.net>
2021-02-25 17:08:44 +02:00
Allan Sandfeld Jensen
f493d41722 Fix logic problems with table based grayscale ICC profiles
White-point was calculated wrongly and some tables could cause bad
behavior in the tables.

Pick-to: 6.1 6.0 5.15
Change-Id: I24e8f5f3cc1306f5f898a4acbf7b008e26bd04e2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-25 16:08:44 +01:00
Giuseppe D'Angelo
0e22001a3b Add more support for structured bindings
After QPoint(F), it's now the time of QSize(F) and QVectorND,
which can be unambiguously decomposed.

[ChangeLog][QtCore][QSize] QSize is now usable in a structured
binding declaration.

[ChangeLog][QtCore][QSizeF] QSizeF is now usable in a structured
binding declaration.

[ChangeLog][QtGui][QVector2D] QVector2D is now usable in a
structured binding declaration.

[ChangeLog][QtGui][QVector3D] QVector3D is now usable in a
structured binding declaration.

[ChangeLog][QtGui][QVector4D] QVector4D is now usable in a
structured binding declaration.

Change-Id: I67bb152f4210f2be27607179cd2ec522174cc483
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-02-25 16:08:44 +01:00
Volker Hilsheimer
2af45d0cee Assert that we have a socketEngine before calling it
If we are connected or bound, then we must have an engine.
Otherwise in code we frequently test for the d->socketEngine pointer,
including in waitForConnected.

Fixes static anlyzer warning 3b37ce4102843c97ceef2b7bb68a409d.

Pick-to: 6.1
Change-Id: Ib9818282ad2813db97859cbe1f184bcfb5ea4ab4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-25 16:08:44 +01:00
Volker Hilsheimer
2de7f4f771 QIcon::setIsMask: don't dereference nullptr
QIcon::detach might result in the d pointer being nullptr, and other
code tests for that condition and allocates the d pointer explicitly.

Change the order of the tests in setIsMask as well, fix static analzyer
warning 0a4723ca2d216ec8883a3d412aeded4c.

Pick-to: 6.1
Change-Id: Idca12f230036362f13cbaee1ae4f0e5ce6726015
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-25 16:08:44 +01:00
Alexey Edelev
43c28aa904 Use Core library for qmake instead of the Bootstrap library
Move the qmake-specific logic of the QLibraryInfo class to
qmake internals. 'qconfig.cpp.in' now stores information about
the library info entries to keep them consistent between qmake
and the Core library. qmake requires specific features enabled
in the Core library, so building qmake will be skipped if the
features are not enabled.

All flags directly related to the qmake have been removed from
Core lib.

Remove all bootstrap related sections from qmake CMakeLists.txt

Task-number: QTBUG-89369
Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-25 16:08:43 +01:00
Sona Kurazyan
5624b35d65 Improve docs for QFuture::then() with context
Be more precise about attaching a continuation with the default
(QtFuture::Launch::Sync) launch policy after a continuation with
context.

Pick-to: 6.1
Change-Id: I5b80063df2443e5742033864ba012bf34ed4cdf7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-25 16:08:43 +01:00
Allan Sandfeld Jensen
c2bec047e2 And fix handling and test of QImage::fill(uint) as well
Only RGB444 and RGB666 were treated slighlty different from the rest,
but the test had a few additional mistakes.

Pick-to: 6.1 6.0 5.15
Change-Id: I4728b4036affedfffce8bca5c1e7be3869344fbe
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-25 09:46:55 +01:00
Allan Sandfeld Jensen
e3ebbca540 Improve QImage::fill(uint) documentation
Remove paragraph about long gone methods, and rephrase it
as a note on corresponding getters. At the same time
document 64-bit behavior as undefined.

Pick-to: 6.1
Change-Id: I26ffd95040eb0aea30585aa0fa8526417b0ecc7a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-02-25 09:38:19 +01:00
Volker Hilsheimer
976d8b1f74 Assert that setCurrentAnimation has the assumed side effect
setCurrentAnimation(0) is expected to set the currentAnimation pointer -
which it does, as long as there are any animations.

Fixes static analyzer warning 106daf11ddfe9bb4fa7cf98c9097962c

Pick-to: 6.1
Change-Id: I3739bcfda103db391d21f135485f0b700c48ead1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-02-25 00:38:45 +01:00
Volker Hilsheimer
e38b55c47c Consistently test for nullptr
m_view might be nullptr, which is checked before setting up the palette,
so don't set the QTextCharFormat up without checking first as well.

Fixes static analyzer warning 0ef07dd07bebe04b93d1fc802eddb57a

Pick-to: 6.1
Change-Id: Ia1c92eb4183c9e368e92875775cff90e2883ddaf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-02-25 00:38:40 +01:00
Friedemann Kleint
1128e0bea1 QSystemSemaphore: Fix broken translated messages
Add Q_DECLARE_TR_FUNCTIONS() and use tr().

Pick-to: 6.1
Change-Id: I31a27afa06ee2a592a7e588283e5ff08b5d14f3b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-24 14:00:26 +01:00
Volker Hilsheimer
3be3848338 Assert that either both or neither pointer are nullptr
Identical change to qmetatype.cpp

Fixes static analyzer warning 0267bc9b3ba521cf8bf0a7fea8981ee5

Pick-to: 6.1
Change-Id: Id6219f5025d703dd43b1742a067aa934d6aacd8c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-24 13:43:41 +01:00
Friedemann Kleint
f0cc9f10da QStandardPaths: Add translation comment for macOS-specific item
Pick-to: 6.1
Change-Id: Idde81ee9badb41ff7893dcbdfd39ec4cb8db9742
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-24 13:17:33 +01:00
Kai Koehne
ea1c35d557 Disable NetworkManager plugin for -no-dbus
The plugin depends on Qt::DBus, so do not try to configure it if
Qt::DBus is not available.

Pick-to: 6.1
Fixes: QTBUG-91155
Change-Id: I70ddca63a277cd57a253092f97160f89ebc76f06
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-24 11:59:02 +00:00
Edward Welbourne
e8c52d0e8c Fix transitionEachZone() failures on Android
In QTimeZonePrivate::dataForLocalTime(), mistrust the Android
backend's hasDaylightTime(), as it has a comment saying it only knows
about future transitions, not past. This caller of it really needs to
query "has ever had a transition", which this doesn't answer. Many
zones that have no plans for future transitions have had transitions
in the past; these were failing the transitionEachZone() test.

In the process, refine the test itself, making sure we catch some
quirk cases that shouldn't arise and making the debug message on
failure more informative (while eliding the zone name, as this is part
of the test name anyway, so added to the output by qDebug() itself).

Fixes: QTBUG-69131
Change-Id: I88a0528182c247acb8b6327b40516178e455bcc0
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-24 12:08:57 +01:00
Volker Hilsheimer
88d8309290 Add null pointer check
The detailsText widget might be nullptr even if detailsButton is not.
Both are tested elsewhere in code, e.g. in the _q_buttonClicked
private slot, so be consistent.

Address static analyzer warning 00b85157447772462c3b8ffc1da0ae3a

Change-Id: Ib8c31b79653a6e8a9011692cb84ffaa2fb8047e7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-02-24 11:51:47 +01:00
Volker Hilsheimer
1f6dbbd539 Assert that we have a layout before dereferencing
Since we test the pointer in the beginning, it might be nullptr.
But if we receive events that require a layout, then it must not be
nullptr. Assert that assumption.

Address static analyzer warning 06f8cc945ead26f20c6b9599faf76c83.

Pick-to: 6.1
Change-Id: I1c6eb9e9d2c9444fcb9bd1d1d9c345237dc72b33
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-02-24 11:51:47 +01:00
Volker Hilsheimer
52b5e9b766 Assert that either both or neither pointer are nullptr
If called by QMetaType::canConvert with two nullptr values,
the QMETATYPE_CONVERTER_ASSIGN macro will expand to code
dereferencing both 'to' and 'from' pointers.

Assert that others callers provide two valid pointers.

Fixes static analyzer warning 02dc34cc2ad1d4c3c6e55b44e08983f2

Pick-to: 6.1
Change-Id: I24de914faa25dc7cb1da5eae09a125506caac389
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-24 11:51:47 +01:00
Volker Hilsheimer
f6c9dec610 Assert that dereferenced pointer is never nullptr
It can't be, since then 'o' (which is never nullptr) would be different,
and we'd return in the previous line.

Since we test for d->popup a few lines above, help clang static analyzer
to not report this with hash
27ff831d79d1779825fd964239cbefe7.

Pick-to: 6.1
Change-Id: I9f0b14bd88418b897cee2d7a63e8a10fc4a0b01c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-02-24 11:51:47 +01:00
Eirik Aavitsland
8daa944313 Avoid int overflow in QImage rotate90/180/270
Pick-to: 6.1 6.0 5.15 5.12
Fixes: QTBUG-91223
Change-Id: Ice53c80d695a5ffdf9162df84e7c9b1e43106bae
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-02-24 11:51:47 +01:00
Craig Scott
279ebfd487 qt6_finalize_executable(): Enable finalizers to be set per-target
Some plugins need to append additional processing to targets that use
them. This is most commonly needed for static builds to identify
additional plugins that need to be linked, but which cannot be
determined automatically by CMake as part of its transitive
dependency handling. Check for finalizers on directly linked targets
as a way to help automate common scenarios.

Because we need to lookup dependency targets and these may have
visibility limited to the depender target's scope, we now formally
document that finalizers should be called from the same scope as
the one in which the target was created. This was loosely expected
before, but is now made explicit.

Task-number: QTBUG-90819
Task-number: QTBUG-86669
Pick-to: 6.1
Change-Id: I065a3f3a4ab6eeff6a98a655835427949e2fe0f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-24 10:38:02 +11:00
Craig Scott
fe29159aad cmake: Don't give plugins PUBLIC usage requirements
The pro2cmake.py conversion script faithfully reproduced the .pro files
for the plugins, which specified the libraries as public. But in CMake,
the implications of this are that public usage requirements should then
be propagated to consumers. We don't expect any consumers, since a
plugin is created as a MODULE library in CMake, so for Windows we don't
even have an import library to link with. The only exception to this is
for static builds where plugins are created as STATIC libraries
instead, but only in certain controlled situations do we then link to
plugins. Even then, usage requirements are not expected to propagate to
the consumers, so these relationships should always be specified as
private.

This change warns on any PUBLIC usage requirements specified for a
plugin. This check is disabled by default to avoid spamming CI builds
for repos that haven't been fixed yet. The check can be enabled by a
CMake cache option, which is intended for developers to use locally
when fixing this issue in other repos (all plugins in qtbase should
not trigger this warning as a result of changes in this commit).

Task-number: QTBUG-90819
Pick-to: 6.1
Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-24 10:37:49 +11:00
Joerg Bornemann
1f30bcf336 Move build tools to libexec instead of the bin dir
[ChangeLog][Build System] Tools that are called by the build system and
are unlikely to be called by the user are now installed to the libexec
directory.

This is a step towards easier co-installability of different Qt
versions.

Pick-to: 6.1
Task-number: QTBUG-88791
Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-23 17:02:30 +01:00
Valery Volgutov
462410a08b evdevtouch: Fix wrong addTouchPoint for "mtdev"
Origin patch 359546b069
has following rule:
"the state for processed released points is reset
to zero at the end of the SYN_REPORT handler"

Patch 4e400369c0
changed state according new event refactor, but not fully.

Task-number: QTBUG-86013
Pick-to: 5.15 6.0 6.1
Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-02-23 14:22:20 +00:00
Andreas Buhr
dec429e077 Fix handling of virtual/native pixels in QAndroidPlatformWindow
f92e195369 made sure a new
QAndroidPlatformWindow always has a geometry. However, it did not
take into account HiDPI handling. This patch fixes it and introduces
proper HiDPI handling.

Pick-to: 5.15 6.0 6.1
Fixes: QTBUG-91161
Change-Id: Iddf31b7abfd0a1bada3b051ed4de3bf6c2897d8e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-23 15:15:45 +01:00
Volker Hilsheimer
4f24e1e9b1 Initialize out-variables
QSplitterPrivate::getRange might return early, and then the variables
will contain garbage.

Fixes warning from clang static analyzer.

Pick-to: 6.1
Change-Id: I0081ad9847f158da4440b945ba2db7e7f5d4780b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-02-23 15:15:45 +01:00
Andy Shaw
5540c9c107 iOS: Pass the text to handleExtendedKeyEvent when known
This will ensure that the QKeyEvent also has this information passed on
as appropriate.

Pick-to: 6.1
Change-Id: I52436404115b453664b9b3414f8ec4e715dd6a28
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-23 09:36:40 +01:00
Friedemann Kleint
9a5a2d61c0 QtNetwork: Fix build with QT_NO_SSL
Fix:
qsslcertificate_qt.cpp.obj : error LNK2001: Unresolved symbol ""public: static struct QMetaObject const QTlsBackend::staticMetaObject" (?staticMetaObject@QTlsBackend@@2UQMetaObject@@B)".

Pick-to: 6.1
Task-number: QTBUG-90953
Change-Id: I4eb99c2ee4be67dfdf07e52219b73c6b14436344
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-02-22 15:17:11 +01:00
Timur Pocheptsov
9e5d7af6ef A follow-up fix for potentially missing OpenSSL symbol resolving
This patch also adds 'isValid()' to know if a backend from a plugin
is in working condition (say, there is 'openssl' plugin but no or
old openssl libraries in some system).

Task-number: QTBUG-65922
Change-Id: I0b846536a069ca8c5a94e7191f11c81bac6ad527
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 573ba145d76f239dbc7464a78aabc06ed4d00419)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-22 13:00:56 +00:00
Assam Boudjelthia
f265736e9f Re-order includes in qjniobject.cpp
Pick-to: 6.1
Change-Id: I80acd829bfd0940d17170f2277e92bc9620ce929
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-22 13:49:50 +02:00
Volker Hilsheimer
85af149c9b Initialize QStyleOptionHeaderV2 with correct version
Amends 4c6579eacd

Pick-to: 6.1
Task-number: QTBUG-91224
Change-Id: I9a41db9354bff2fa706cf6053aa229cdca16759e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-02-22 10:54:40 +01:00
Volker Hilsheimer
7f1dc4bb75 Complete documentation for QStyleOptionHeaderV2
Document the isSectionDragTarget variable, and add \inmodule command.
Put code and documentation together.

Amends 4c6579eacd.

Pick-to: 6.1
Change-Id: Id8837ca75cd6af13c8dc4c028b304b279e507ade
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-02-22 10:44:49 +01:00
Dong Rui
c5904cb96a QLineEdit: Fix editingFinished() not being emitted when pressing the clear button
When pressing the clear button, the editingFinished() signal was not
received when focussing out.

Call  _q_textEdited(QString()) when pressing the clear button.

Pick-to: 5.15 6.0
Fixes: QTBUG-83295
Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-02-22 07:18:43 +00:00
Thiago Macieira
d012e953bf QProcess/Unix: remove outdated notices about use of posix_spawn() on QNX
We haven't used the spawn functionality on QNX since Qt 5.7 (commit
005a8bfbf0) because that's when we dropped
support for QNX 6.5.0.

Change-Id: Ic90d8429a0eb4837971dfffd1664f9712bdce2d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-21 22:48:38 -08:00
Thiago Macieira
5d977b0fd2 QProcess::startDetached/Unix: report which function failed
Like QProcess::start().

Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664ef1293a6523d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-21 22:48:30 -08:00
Thiago Macieira
f0ce50d335 QProcess::startDetached/Unix: simplify handling of the pipes
Use a structure that will automatically close them for us. This doesn't
apply to startProcess() because the pipes there are long-lived (though
each of them in QProcessPrivate could be an AutoPipe...).

The destructor only runs in the parent process, so the child processes
don't need to worry about setting file descriptors to -1.

Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664ed98f3d74d1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-21 18:47:19 -08:00
Thiago Macieira
089bcb0074 QProcess::startDetached/Unix: remove unnecessary ignoring of SIGPIPE
This is unnecessary because we can only get SIGPIPE if the reading end
of the pipe is closed. And that can only happen if the parent process
has exited, meaning there's no one to read our message anyway.

Change-Id: Ic90d8429a0eb4837971dfffd1664ec6821993ada
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-21 18:47:11 -08:00
Thiago Macieira
f4e3b073b3 QProcess::startDetached/Unix: fix the resetting of SIGPIPE
This should have been SIG_DFL, as we're about to execute a child
process. It's the child's responsibility to ignore SIGPIPE if it wants
to, or get killed by it when it writes to an pipe with no readers.

Qt itself does this for its own purposes (see qt_ignore_sigpipe() [until
I can get some time to teach Linux about O_NOSIGPIPE]). Therefore, we
ought to reset what we've done.

Change-Id: Ic90d8429a0eb4837971dfffd166585a686790dde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-22 02:47:07 +00:00
Thiago Macieira
73a04edce1 QProcess::startDetached: set the error condition on failure to start
And set *pid to -1.

[ChangeLog][QtCore][QProcess] If a startDetached() fails to start the
target application, the QProcess object should now have a proper error
string in errorString().

Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664e825ffcb923e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-02-21 18:46:28 -08:00
Friedemann Kleint
86ebdc07df QAbstractFileIconProvider: Use platform theme icons
Add code paths to use platform theme icons should icon themes fail.

Task-number: QTBUG-66177
Change-Id: I9554637f5230b1f57faaeef6b2c04cf082271edb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-02-21 09:22:32 +00:00
He MingYang
c0112c2346 Initialize some uninitialized member variables
Change-Id: Ia8e06850a2288f40906602adfbe40abb0faf8057
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-02-20 23:02:26 +00:00
Assam Boudjelthia
255459250d Add QAndroidApplication as a nativeInterface
QAndroidApplication provides the Android specific app context() and
isActivityContext() to determine whether the context is an Activity or
otherwise a Service.

Task-number: QTBUG-90499
Change-Id: Iae2eef7ec44859a89825b09f52f09506b20b5420
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-20 22:53:05 +02:00
Volker Hilsheimer
4c6579eacd Unbreak binary compatibility in QStyleOptionHeader
4d94384612 introduced a new data member to
QStyleOptionHeader, and reduced the size of the orientation member.
This changed the binary layout of class instances, and breaks ABI.

180c662b07 added another member within
the new bitfield.

Introduce a new QStyleOptionHeaderV2 class instead with the new members,
and use that in QHeaderView, and the styles using the new members.

Fixes: QTBUG-91224
Pick-to: 6.1
Change-Id: I47e6841e6652e4b67f247b7b4514e90be5609156
Reviewed-by: David Faure <david.faure@kdab.com>
2021-02-19 22:21:30 +01:00
Morten Johan Sørvig
bb110cee5d Add scaledPixmap() override
QAbstractFileIconEngine implements the QIconEngine interface
and creates a new interface where subclasses override the
filePixmap() function.

QIconEngine subclasses must now also override scaledPixmap();
add implementation which forwards to filePixmap().

(The intermediate implementation in QPixmapIconEngine is not
used by QAbstractFileIconEngine.)

Pick-to: 6.1
Task-number: QTBUG-91104
Change-Id: I229e3a003ad0c3fff768eac7e75c59fe7145fcaa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-19 15:23:33 +01:00
Volker Hilsheimer
24b07b2b2d macOS: don't let windows that are transparent for input become key window
Such windows are typically used as mostly transparent overlays on top
of other windows underneath. Letting such an overlay become the key
window breaks cursor updates and focus handling.

Pick-to: 6.0 6.1 5.15
Fixes: QTBUG-83632
Change-Id: I192d419a5bdb8dfa0e9223e9fbbd7876c62fe743
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-19 15:05:37 +01:00
Nico Vertriest
3fa50b7b41 Doc: Fix warnings about wrong snippet path or missing .pro file
Task-number: QTBUG-91147
Change-Id: I6a55b2b713dd70cf1cbb0b93a8d4152e175e2c4d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-02-19 14:04:21 +01:00
Timur Pocheptsov
43d933bf50 Port QSslKey to the new plugin-based implementation
The idea is to have QSslKey(Private) backend-neutral and hide
all library-specific code inside plugins.

Fixes: QTBUG-90953
Task-number: QTBUG-65922
Change-Id: I2eeee3b2b72c78c2e24f2fb914abce3caa913be8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0352cf8e1bf57615b9faf3f6f383896444e762ac)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-02-19 11:57:05 +01:00
Timur Pocheptsov
9385e54071 qssl.h - address comments from API review
Enumerators initially were to be flags, but this changed later, no
initialisers needed now.

Change-Id: I72b24f979e207e21d6f42a11cf0ae8887df473d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b6778832636fc8f6911eb30bc9767ea6caaf6642)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-19 10:42:22 +00:00
Alex Blasche
0f4b2ccea4 Remove assignment to variable which is never read
Highlighted by static code analysis.

Pick-to: 6.1
Change-Id: I0e0d33c66c3aac5135204212bea2d5d48bad3739
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-19 09:51:18 +01:00