Commit Graph

45802 Commits

Author SHA1 Message Date
Joerg Bornemann
4b23baddd3 CMake: Write QT.XXX.depends entries into module pri files
Qt module targets now export the "_qt_config_module_name" property,
which contains the module's name in qmake land. This can be different
from the lower case target name (e.g. Test vs testlib). This exported
property is used when retrieving the dependencies of a module outside
of qtbase.

The property's name is a bit odd and lower case, because we want to be
able to set it on INTERFACE_LIBRARY targets, for instance header
modules. This CMake pecularity is described in
https://gitlab.kitware.com/cmake/cmake/issues/19261

Fixes: QTBUG-84287
Change-Id: I4a75af3ebeabebc56a0f77d464e45ab7fd81eafa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-25 21:18:30 +02:00
Volker Hilsheimer
37b0a9c8a3 Fix deprecation warning by not going through QChar
mValue is a QByteArray, so no need to expand data to UTF16 just to
compare it to a Latin1 character.

Change-Id: Ib3c8770867cd5509bb4c2ac5e45aabca577b3bba
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-25 19:18:30 +00:00
Michal Klocek
5786ac12f0 Fix hellowindow example
It seems this example never worked as expected.
It has a 'multiple' option which should show extra
windows with rendering taking place in different
thread, however although render is moved to other thread
render() function was never called in that thread.

Fix following things:
 * make rendering in other thread
 * stop requestUpdate if nothing is exposed
 * add timer so animation works at the same speed despite
   of number of windows (renderer B renders two windows)
 * wait for render to finish before triggering requestUdpate
 * remove mutex where not needed

Pick-to: 5.15
Change-Id: I420436bd28d0357534332dd55b088d634d906c14
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 17:37:57 +02:00
Michal Klocek
71d63049f7 Fix typo in documentation of QPlatformWindow
QOpenGLWidget has backing store and does not really fit into
doc's context. Change it QOpenGLWindow.

Change-Id: I7f92e49497b8cc35d322b607c865c2914672ace3
Pick-to: 5.15
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 14:46:35 +02:00
VaL Doroshchuk
0ffef9cb8d RHI: Introduce QRhiTexture::RG8
Change-Id: I58f35b2629bd6464f08cba66e852215472fcbe2a
Fixes: QTBUG-84384
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 14:21:03 +02:00
Eirik Aavitsland
ecca816ea1 Fix RHI-GL mapping of DXT3/5 compressed texture format identifiers
DXT1 is BC1, but DXT3 is BC2 and DXT5 is BC3.

Change-Id: Icb0ea4cc9efeab2453343753e9fda7f825c9b8d1
Pick-to: 5.15
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 13:55:52 +02:00
Kai Koehne
1381b59222 Remove last remainings of Qt Quick 1 imports
amends  e1fd607493

Change-Id: I4587ae287635bc9718325a24bee728f1c1938978
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-25 11:48:12 +02:00
Alexander Volkov
f57e6a3b03 xcb: Fix comments' indentation
Change-Id: Ic0a3e65dd1abc907f1941590ab042f785d90d91c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-05-25 12:33:27 +03:00
Martin Koller
7c5775f918 allow definition of SP_LineEditClearButton in css
Added the new css property lineedit-clear-button-icon

Change-Id: I4596b923eb34325a73d0a80b72d963fd6204ea26
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-05-25 11:09:50 +02:00
Lars Knoll
f1cbc3c9d2 Change QString::toIntegral_helper to use QStringView
This implicitly makes it use qsizetype for the length.

Change-Id: Ib39a5a8dd71e48b45179079f7c7fe5e4edbdb5eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-25 10:34:31 +02:00
Lars Knoll
f315f42dfd Cleanup header file
Remove dead code

Change-Id: I315f9ae2f098b1a7b72d7cd24161325822c62edd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-25 10:34:14 +02:00
Rolf Eike Beer
c4b172b7f0 QVncScreen: fix crash on disconnect client did not request cursor
Change-Id: I758c79d87bd239b6fde9bae4e97c5b31450fa813
Pick-to: 5.15 5.12
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 10:29:37 +02:00
Lars Knoll
97d22d7171 Remove qxmlstream from qmake compile
It's not used at all.

Change-Id: Ia30befd497cc337221dfad89c201822b5bb7fd7c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-25 10:28:35 +02:00
Lorn Potter
3fbf7b34cc wasm: set status codes from network operation
Pick-to: 5.15
Fixes: QTBUG-83991
Change-Id: Ie1e88189bee8b6a9dc6cb2a721777a5e1032307a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-05-25 17:42:06 +10:00
Lorn Potter
745a7fa31e wasm: fix heap crash when making multiple network calls
Pick-to: 5.15
Task-number: QTBUG-83991
Change-Id: I354934b53799f3eeb958395932bed18289b1e279
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-05-25 17:41:49 +10:00
Friedemann Kleint
f061c413de Windows: Fix wrong DPI used in font size after changing scaling
QWindowsFontDatabase::defaultVerticalDPI(), which was used
for converting the point sizes was missing an updating
logic for scaling changes. When implementing it, it turned
out that the value obtained from GetDC(0) does not adapt
to scaling changes.

Remove the function and set it from the screen manager directly
to the DPI of the primary screen.

Pick-to: 5.15
Task-number: QTBUG-82267
Change-Id: If05ebc893fe78a9461500aba97f2dc127cdf4406
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-05-25 08:52:32 +02:00
Heikki Halmet
fc8c011450 Blacklist imageAtRightAlignedTab in CentOS
Task-number: QTBUG-46206
Change-Id: I98add304d052f3fc5c0ab80077ba66e8e159748e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-05-25 08:16:14 +03:00
Heikki Halmet
d8ea25b917 BLACKLIST test_Gestures tests for new platforms
Task-number: QTBUG-84258
Change-Id: I4722444ffd8a9b1ebc262a424778a19704881832
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-25 05:16:10 +00:00
Heikki Halmet
3e17098fcd BLACKLIST QWidget tests for CentOS
Tests focusProxyAndInputMethods and
multipleToplevelFocusCheck will be blacklisted

Task-number: QTBUG-84259
Change-Id: I7d5baf1e700192eed3c7c8dcfe671e247f11b8c7
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-05-25 08:16:05 +03:00
Tony Sarajärvi
623670d243 Blacklist tst_QTimer::zeroTimer on Ubuntu 20.04
Task-number: QTBUG-84291
Change-Id: I198cfe813617a5bb65b0e1059a43b6933d610720
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-25 05:16:00 +00:00
Tony Sarajärvi
778b8265b7 Blacklist tst_qfont tests on new platforms
Task-number: QTBUG-84248
Change-Id: I5285a12a9f1feaf748fc1734f122473c02d115e5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-25 05:15:53 +00:00
Kari Oikarinen
afdfb08e3a Remove references to deleted file shift-jis.txt
Amends 33bb695a28.

Change-Id: I7a7d90dc406ffbf015e760a7c41534564bfbe13e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-24 22:24:47 +03:00
Christian Ehrlicher
8657296173 QItemSelectionModel: simplify QItemSelectionRange
Simplify QItemSelectionRange by removing the unneeded
user-defined functions - the compiler can generate them by it's own.

Change-Id: I49c00f937df98bb1ad18057b7bae7a0e06919909
Reviewed-by: David Faure <david.faure@kdab.com>
2020-05-23 10:53:30 +02:00
Christian Ehrlicher
f9874ad7bd QListWidget: remove unused member
Remove the 'dummy' member - it's not needed since ages.

Change-Id: I4869cf9153c892ea065340335ff7accd529a79c6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-05-23 10:53:29 +02:00
Christian Ehrlicher
c7ef17b231 Models: remove version check for clearItemData()
The version checks for clearItemData() are no longer needed now.

Change-Id: I5052188fb96cf637128662f3442d339820f0f41d
Reviewed-by: David Faure <david.faure@kdab.com>
2020-05-23 10:53:26 +02:00
Christian Ehrlicher
ee3994384a Examples/RegularExpressionDialog: remove deprecated options
Remove the two deprecated (and non-functional) options
OptimizeOnFirstUsageOption and DontAutomaticallyOptimizeOption.

Change-Id: Id5191cee84bf7b1ae65f828a981f93d98db23f53
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-05-23 10:53:24 +02:00
BogDan Vatra
eaa6191307 Android: Fix RESOURCES for Android MultiAbI
Pick-to: 5.15
Change-Id: I57560f51115ae560e3133096f402c6c9735f15a6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-05-22 13:43:04 +00:00
Giuseppe D'Angelo
ed2c3f6756 QSslCertificate: overhaul ASN.1 datetime parsing
Instead of manual string splitting (EW!), use QDateTime parsing.
Moreover, X.509 certificates *must* have a valid start/end date.
In case of parsing failure, reject the certificate. An autotest
for this last case is coming in a separate patch.

Change-Id: I934bf9e6a4a92e4befdb3b0f9450f76f67bad067
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-05-22 15:40:22 +02:00
Tor Arne Vestbø
7a1650e343 Move QtVulkanSupport into QtGui and QtOpenGL
Task-number: QTBUG-83255
Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-22 15:38:28 +02:00
Kai Koehne
948134371e Licenses: Remove reference to change in Qt 5.4
Qt 5.4 is not documented anymore since quite some time.

Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-22 15:38:28 +02:00
Eirik Aavitsland
880f709fd0 RHI: facilitate compressed atlas textures in gles2 backend
Since glCompressedTexImage2D() does not allow zero data, it could not
be executed during texture build. Instead it would be done during the
first subresource upload. This made atlasing clumsy, since one had to
introduce a fake upload of the full texture size before the subtexture
uploads. This commits lets the gles2 backend deal with that instead.

Introduces the UsedAsCompressedAtlas QRhiTexture::Flag for opting in
to this behavior.

Task-number: QTBUG-78582
Change-Id: Ib6e4ea637c62cc8a51bd9a4a06e59882f335f2a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-22 10:32:11 +02:00
Eskil Abrahamsen Blomfeldt
3ec0df4b5f RHI: Store texture handle as 64-bit int
When storing a void* pointer to the texture handle, we had
to ensure that the variable would exist until the build phase,
which is error prone and caused errors in QQuickWidget because
we copied the texture ID from the FBO into a local variable
before passing it into QQuickWindow::setRenderTarget().

The reason for using a void* was that we cannot know the width
of the handles in the different backends, but we do know that
they are 64-bit at maximum, so instead of storing potentially
dangling pointers, we just make it a 64-bit integer and cast
it back and forth in the backends.

Task-number: QTBUG-78638
Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-22 10:32:10 +02:00
Friedemann Kleint
547d5e1f55 Windows QPA: Fix deprecated QString::fromUtf16(ushort*) call
Amends 23849826b4.

Change-Id: Iefd29bd4c19aaf7c4444b2913bd143dc11c03d3c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-22 09:29:12 +02:00
Tor Arne Vestbø
f76161d61f Move QRasterBackingStore to QtGui
Task-number: QTBUG-83255
Change-Id: I339173de6e109c5a9b9572972ba894c15053c034
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-21 20:28:37 +02:00
Lars Knoll
2f05aa82e7 Adjust resize() behavior of QString and QByteArray to match Qt 5
resize() to a smaller size does not reallocate in Qt 5 if the container
is not shared. Match this here.

As a drive-by also fix resize calls on raw data strings to ensure
they are null terminated after the resize.

Change-Id: Ic4d8830e86ed3f247020d7ece3217cebd344ae96
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-21 17:59:31 +02:00
Tor Arne Vestbø
42024666a3 Move QMacInternalPasteboardMime to QtGui
Task-number: QTBUG-83255
Change-Id: I00fda24479ad2c04781c5fefaa15fac1118033a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-21 13:21:53 +02:00
Alexander Volkov
9bad3508fc Add missing override
Change-Id: I88000e82ecbdc55e621dc8e22aff5e8f55cf9d0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-21 11:34:12 +03:00
Timur Pocheptsov
e7ca98f40f QSslSocket::addCaCertificates - do not duplicate certs
If we already know the certificate, there is no need in adding it again.
This function is deprecated, but will stay forever in 5.15.

Pick-to: 5.15
Change-Id: I760f5bcffea78ac02c5643ee1112725edd32f15a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-05-20 19:46:16 +02:00
Timur Pocheptsov
c86e54fb17 Make OpenSSL back-end work with 3.0 alpha
DSA/DH/etc _bits functions were first deprecated, then un-deprecated,
so we don't worry about them for now. SSL_CTX_load_verify_location was deprecated
and two new functions were introduced instead (one using file, the second
- path). It's unfortunately 3.0 only, so we have to check OpenSSL version.
DH_check is deprecated and we have to use EVP_PKEY_param_check with
tons of a boilerplate code around.

Fixes: QTBUG-83733
Pick-to: 5.15
Change-Id: Icd401ab6aad30c23c37443c7bc82c702fb843640
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-05-20 19:45:53 +02:00
Joerg Bornemann
32cb48e26c Revert "CMake: Don't create *Depends header for header-only modules"
This reverts commit e875f45805.

Reason for revert: syncqt creates a master header that includes
the *Depends header. Therefore we must always create the *Depends
header. Ignore for now that *Depends headers are empty and pointless
for module headers.

Change-Id: I1dcc836788b3d46c4f1b504d2d64e9eb67b66206
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-20 17:27:30 +02:00
Joerg Bornemann
aa097aa028 CMake: Hot fix for Ninja Multi-Config with MSVC and OpenSSL
For now, we have to turn off the 3rdparty lib generation code for
qt_lib_XXX.pri files, because it's broken for NMC if the 3rdparty
libraries have different binaries per config.
The actual fix is more involved.

Task-number: QTBUG-84348
Change-Id: I863e69085b68c0dbbb3f6c415111bc255799e155
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-20 17:27:28 +02:00
Joerg Bornemann
0b01e62ff4 CMake: Move qt_lib_XXX.pri generation to module finalizer
Introduce a qt_finalize_module function that is called as a
CMakeLists.txt finalizer and call qt_generate_module_pri from there.

This is done in preparation for writing the QT.XXX.depends entries to
the module pri files, because we must do this after all dependencies
have been added.

Change-Id: Ia61db73383541651389fd647523ef535792874d4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-20 08:24:31 +02:00
Marc Mutz
e1cab870cb Extend QTypeInfoMerger to more than four arguments
Use template argument pack and C++17 fold expressions.

Because MSVC doesn't grok fold expressions in
enumerator-definition contexts, use static constexpr bool
variables.

Change-Id: I13a676d9be687679ef41f7b003e50116c4cd533c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-05-19 21:45:57 +00:00
Marc Mutz
7c070ac959 Sweep Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 -> Q_DECLARE_SHARED
This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as
Q_DECLARE_SHARED.

Let's hope we'll collectively get better at detecting missing
Q_DECLARE_SHARED so we won't need a
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future.

Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-19 23:45:54 +02:00
Andy Shaw
857722ed8f Android: Only have one valid QMimeData object kept around
Once the clipboard data is queried then we can clean up the previous
QMimeData object created. So rather than keeping on to it and cleaning
up when the clipboard is created we can delete it at that point. This
means it is not necessary to make it a QObject subclass, so we can save
in that respect too.

Pick-to: 5.15
Change-Id: I152ca6ea5c713abe25f75ca2016759c0e3152bfb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-19 21:40:35 +00:00
Andy Shaw
77e978001b Android: Clear the m_selectedFile variable when showing again
Since the helper is being reused then the m_selectedFile variable should
be cleared, otherwise it ends up appending the new result to the old
one.

Change-Id: I72c24409dc91f91bad55a7da2772605f03fb4623
Pick-to: 5.15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-19 23:40:24 +02:00
Robert Loehning
4c9acd103b Fuzzing: Add fuzz target for QImage::loadFromData
Pick-to: 5.15
Change-Id: Ie67eb9be80fe42d463c566c728c73c9c92c2081b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2020-05-19 23:18:16 +02:00
Alexandru Croitor
9da90fab67 CMake: Use provided OUTPUT_DIRECTORY for manual tests and benchmarks
If an OUTPUT_DIRECTORY option is provided, it should be used instead
of discarding it.

Change-Id: Ie53b56616f16589f7c05ff9378d7ba2e2ba34726
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-19 19:09:00 +02:00
Jan Arve Sæther
5b3a86a87b a11y: Fix bug in the accessibility cache
We could sometimes cache a partially constructed object if the accessibility
interface for that was created during construction time of the object. This
usually ended up in that the interface for e.g. QMenuBar was stored in the
cache as a QAccessibleWidget, regardless of if the a11y factory supported it.
Since it was already in the cache, it remained the same for the entire lifetime of the
application, causing e.g. QMenuBar not have the correct accessibility behavior.

Task-number: QTBUG-83993
Change-Id: I72b2d5a93f6b397fd3666d45951109e3e5aff754
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-05-19 13:33:02 +02:00
Joerg Bornemann
3dc3c0e2b6 CMake: Append to QT_CONFIG in the qt_lib_XXX.pri files
The module pri files are supposed to add their public features to the
global QT_CONFIG variable.

Change-Id: I9a1719f897747a1d89011b1f1231c05a23539def
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-19 13:29:57 +02:00