Commit Graph

49956 Commits

Author SHA1 Message Date
Joerg Bornemann
b0add5bf2f QtEntryPoint: Fix linking Release against RelWithDebInfo with MSVC
To be able to link a Release user project against a RelWithDebInfo Qt we
set several IMPORTED_*_RELEASE properties in
the *AdditionalTargetInfo.cmake file of each Qt module.

The EntryPoint module however is a bit special as it is an
INTERFACE_LIBRARY linking publicly against a static
library (EntryPointimplementation). Its *AdditionalTargetInfo.cmake file
was almost empty, because qt_internal_export_additional_targets_file was
called before EntryPointImplementation was set up. Also,
qt_internal_add_module, which calls
qt_internal_export_additional_targets_file, does not know that we want
to export the EntryPointImplementation target.

We fix this by telling qt_internal_add_module(EntryPoint) to not
generate the *AdditionalTargetInfo.cmake file and call
qt_internal_export_additional_targets_file later to take the targets
EntryPoint and EntryPointImplementation into consideration.

qt_internal_add_module learned the option NO_ADDITIONAL_TARGET_INFO to
turn off the generation of *AdditionalTargetInfo.cmake files.

Pick-to: 6.0
Fixes: QTBUG-90039
Change-Id: I68ec7125b538a57567035e7adb8dac3b213f95e6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-18 13:21:15 +01:00
Laszlo Agocs
9f7088fd7f rhi: Stop hardcoding the Vulkan backend's desired instance extensions
Instead, have a static function in QRhiVulkanInitParams then Qt Quick
and anyone else who creates a QVulkanInstance that is then used in
combination with QRhi can query.

Change-Id: I046e0d84541fc00f5487a7527c97be262221527f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-18 13:21:15 +01:00
Laszlo Agocs
036021b0d0 Add qvkgen header template to its own file
...instead of referencing the removed qtbase/header.LGPL.

Amends 9ac8b9c92e

Fixes: QTBUG-90329
Change-Id: Ic46e0adeef51f7bfcf445185c0ab5431df39bce6
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-18 13:21:15 +01:00
Laszlo Agocs
7d378bd780 vulkan: Add instance-level version getter
...as described in the Vulkan >= 1.1 spec. One can now call
supportedApiVersion() (before create(), similarly to the other
supported* functions) to determine the available Vulkan
(instance-level) version.

Fixes: QTBUG-90333
Change-Id: Ibe8482402b7f07e4abc48c88252ff0365e4e2faa
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-18 13:21:15 +01:00
Laszlo Agocs
9573441236 eglfs: Use drmClose in drm/EGLDevice backend
Pick-to: 6.0 5.15
Fixes: QTBUG-90350
Change-Id: I29a71e4abc2df7b777a895792bc5385a89223895
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-18 13:21:15 +01:00
Eirik Aavitsland
167bcafcb6 Fix lancelot GL painting test for GLES
RGB10 internal texture format is not supported on GLES, use RGB10_A2
instead.

Pick-to: 6.0
Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-01-18 07:42:31 +01:00
Craig Scott
b59f77aab4 FindLibb2: Don't rely solely on pkg-config
Task-number: QTBUG-86283
Change-Id: Ie455d7cfc6e6f9ae8297f8bc0daf2816ccce91b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-18 15:42:52 +11:00
Craig Scott
f283f06216 Make -pkg-config configure option actually work
The QtBuildInternals config package file gets processed before feature
evaluation occurs. That means INPUT_pkg_config may be defined, but the
corresponding FEATURE_pkg_config variable won't have been set/updated
yet. Do this check locally because the availability of a number of
features is conditional on whether pkg-config is available.

Change-Id: I6030eb380ee0c630ffbe5db5eed397a46227c7f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-18 15:42:48 +11:00
Andrei Golubev
b101f84f86 Add "Q_UNUSED" to (3rdparty) strtod.cc for a 32 bit code path
Accidentally stepped on this thing. Cannot build Qt Core on 32-bit
Ubuntu 16 without this patch.

Fixes: QTBUG-90354
Pick-to: 6.0 5.15
Change-Id: Iab5b2a317ee18b537b416eff008db29932fc043b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-17 22:27:46 +01:00
Giuseppe D'Angelo
d09a0e485d QMatrix4x4: mark it as Q_PRIMITIVE_TYPE
My guess: it was relocatable because before 6.0/5.15 we didn't
call constructors for Q_PRIMITIVE_TYPEs.

Change-Id: Ibc9e23e41d0c4b9718fc7036d9a647cfdcfa7d47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-17 19:25:53 +01:00
Christian Ehrlicher
09696e3325 QHeaderView: fix moving sections with mouse in RTL mode
Moving sections in RTL mode did not work correctly - in contrast to LTR
mode the secion must be moved much further to the left or right to
actually move it.
Found while implementing an indicator for QTBUG-673

Task-number: QTBUG-673
Change-Id: I5a82d3cdb39415a408b2884d0ee302e0547e884f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-17 13:57:50 +01:00
Allan Sandfeld Jensen
cfd935fe6c Fix XCB launch key mapping
They have been reported wrong since Qt 4, and not fixed for behavior
compatibility, fixing it for Qt 6.

[ChangeLog][X11] XF86LaunchXX keys have been remapped, so the Qt names
and X11 names match, instead of being 2 off.

Pick-to: 6.0
Fixes: QTBUG-25261
Change-Id: Ie3a8676439ae3e93a78218c9e7f4443565e84356
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2021-01-15 22:28:21 +00:00
Allan Sandfeld Jensen
2cf2f99ab1 Get rid of blend_color_rgb16
The generic functions are better optimized anyway, and it this old
method appears to have old bugs.

Fixes: QTBUG-20681
Change-Id: I60e4cc5f6cd90c851e90106ac9badfc6c249cd9f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-15 19:45:04 +01:00
Christian Ehrlicher
c23e8cb582 QSettings: Add support for QMetaType::Float
When writing out a float value, the output string is encoded as QVariant
for no reason. Looks like an oversight when QMetaType::Float was added a
long time ago.

Fixes: QTBUG-21156
Change-Id: I7f5d31e15892d700c1b1e5e731b7733ce3a15730
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-15 18:51:15 +01:00
Friedemann Kleint
539553a572 QTestlib/JUnit XML: Log most messages to standard output instead of error output
Add an enumeration for system-out and alog element
for it. Redirect the messages types that are not warnings/errors
to this element. For compatibility, write it out only
if it is not empty. Rename enumerations and members accordingly.

[ChangeLog][QtTestLib] In JUnit XML, output that is
not a warning/error is now logged under <system-out>
instead of <system-err>.

Fixes: QTBUG-86540
Change-Id: I55598eafa7dafa486ac5a8221029c332ff47413b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-15 18:05:40 +01:00
Friedemann Kleint
7f5d41e286 Windows: Fix dialog moving up after closing/reshowing
A resize event delivered after closing the platform window
was causing the stored frame margins to be cleared.
Bail out of QWidgetWindow::updateMargins() if the
platform window is null.

Pick-to: 5.15
Fixes: QTBUG-79147
Change-Id: Iebbc90c3cccafa209cd720baedf45affb3f3c2b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-01-15 18:05:19 +01:00
Jarek Kobus
98a89fb711 Hardcode a special case of using qOverload for slots without arguments
Pick-to: 6.0
Fixes: QTBUG-90308
Change-Id: I35cd45679ded626654dd0e7e3eea8a7bb14c1d56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-15 17:39:46 +01:00
Morten Johan Sørvig
9cd3ff2bde macOS: Mark QFileDialog::DontConfirmOverwrite as unsupported
The native NSSavePanel does not have an option corresponding
to DontConfirmOverwrite. Qt has a workaround where
the save-file-name is temporarily given a prefix in
order do bypass the overwrite check, however this has
stopped working on recent versions of macOS. (Confirmed
on macOS 11)

Users who want to use DontConfirmOverwrite should use
Qt’s file dialog instead.

Fixes: QTBUG-39791
Pick-to: 5.15 6.0
Change-Id: Id3b9e6de72c2afc9526c96f1d9fdbce78db92aeb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-15 15:19:24 +00:00
Edward Welbourne
b2a3389cfe Extend qIsInf() and friends to handle integral types sensibly
[ChangeLog][QtCore] qIsInf(), qIsNaN() and qIsFinite() now, like
std::isinf() and friends, accept integral types (returning false,
false and true, respectively) as well as floating-point ones.

Change-Id: I1e2b7f033f0e8166c0b21e31a62b3e6d37b9344a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 16:00:40 +01:00
Friedemann Kleint
2f8428d332 Brush up QTestlib/generate_expected_output.py
- Generate the expected files in the source tree,
  removing the need to copy them over
- Add proper option parsing, add options for formats
  and to skip the callgrind test, which locks up
- Determine the script location by __file__
- Determine the Qt version by reading the .cmake.conf file
- Introduce f-strings
- Print the usage when invoked in the wrong directory

Task-number: QTBUG-86540
Change-Id: Idabb50a14db60127374b7a1271951dbbbc85d131
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-15 15:37:18 +01:00
Alexey Edelev
8d76903b97 Fix missed feature evaluation errors in report
Add an optional argument to store the report command while feature
evaluation-only stage. This is necessary, because according to the
actual feature evaluation process, evaluation happens only once and it's
impossible to record any command during the evaluation-only stage.

Fixes: QTBUG-90319
Change-Id: I215fbe0a28a2661cd2d97d253b2e2c787d295cbd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2021-01-15 15:25:18 +01:00
Sona Kurazyan
154573929a Fix setting active window as application's focus widget
When setting the application's focus widget we search for the next
child widget that can hold the focus and call its setFocus() method,
which also updates focus widgets of all its parent wigets.

In case if the focus widget is the active window itself, we only set it
as the application's focus widget, but we don't update the focus widget
of the active window itself. Because of this the focusWidget() method
always results nullptr for the active window. This prevents from setting
the focus back to active window after the focus has changed (for example
after a context menu is closed, as in the bugreport).

Transfer the focus to active window by calling the setFocus() method, as
it is done in case of transferring the focus to any other widget.

Pick-to: 6.0 5.15
Fixes: QTBUG-85846
Change-Id: I91ebf182fd5bb7d451a1186e2f3e38c8d48acc4e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 15:22:18 +01:00
Sona Kurazyan
20e364e00c tst_qdom: clean-up the code enabled only before Qt 6
Change-Id: Ifcf863ccb2094661b43bd5ccf8387960447ddd8e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-01-15 15:22:08 +01:00
Laszlo Agocs
b5ce973b29 Document QOpenGLWidget limitations without an alpha channel
Pick-to: 6.0 5.15
Task-number: QTBUG-85869
Change-Id: I20fb70a451fc1ed93089ed699539fa12ac38fe73
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-15 15:21:28 +01:00
Laszlo Agocs
2aa7ad5e67 qvkgen: Skip command elements with alias
Otherwise we end up with generating broken qvulkanfunctions cpp and h
files.

For example, encountering the following command element should lead to
taking no action, this is not something we want to emit a corresponding
wrapper function for:
  <command name="vkResetQueryPoolEXT" alias="vkResetQueryPool"/>

This is required to be able to upgrade the bundled vk.xml to something
newer.

Fixes: QTBUG-90330
Task-number: QTBUG-90219
Change-Id: Ie6e3a8794207e30a172820eb055238bf52a0c0b9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-15 15:21:15 +01:00
Allan Sandfeld Jensen
ade24763c7 Fix convertToRGBA64PM for Grayscale16
The input has been fetch into a set of uint32s, so no longer a
string of ushorts.

Pick-to: 6.0 5.15
Fixes: QTBUG-90246
Change-Id: Id52a6824317b0744310008cc2ce2f726539b4c8c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-15 15:17:19 +01:00
Ivan Solovev
e86e9d0725 CMake: add CoreLocation framework for macOS
Task-number: QTBUG-89854
Change-Id: Icd52a6dd0ae36ae91599ab9a583e6920f2d2ba4c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-15 15:16:28 +01:00
Kai Köhne
ccce1a4e90 RHI: Use QT_BEGIN_LICENSE:LGPL header
Task-number: QTBUG-90321
Pick-to: 6.0
Change-Id: If3b0841f3e9139bb1911c6a5d03a16daf8c1b3d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-01-15 14:14:32 +00:00
Paul Wicking
efa5a69972 Doc: Clarify setLibraryPaths behavior
Fixes: QTBUG-89130
Pick-to: 6.0 5.15
Change-Id: Id8460fd00dcfdcca174d523f8d97baef1a764f6f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-01-15 15:14:31 +01:00
Craig Scott
257edbfa53 Prevent compiler and linker flags from growing every cmake run
Functions in QtFlagHandlingHelpers.cmake try to update the CMake cache
variables for compiler and linker flags. These were using the current
value of those variables and writing the modified ones back to the
cache every time CMake ran. If a toolchain file sets or modifies any of
these variables, that updated value is used and written back into the
cache instead of the original cache variable's value. The next time
CMake executes, the toolchain file re-applies the same change and the
variable grows longer each time with flags repeated. With Ninja, this
causes a complete rebuild every time CMake is re-run. The Android NDK
toolchain file is one example where this behavior is triggered (the
fault is shared, one could argue that the NDK should only be setting
..._INIT variables, but that's out of our control).

Another related bug in the previous implementation was that the flags
used to build after the first CMake execution could be different to
those used for all builds after the second and later CMake runs. This
is because the CMake cache was being updated, but not always the
calling scope of the functions that modified them. If a toolchain file
set any of the compiler or linker flag variables as non-cache
variables, then updating the cache variable would have no effect on
the calling scope. The non-cache variable would continue to take
precedence for that scope for that run. The next time CMake executes
though, the updated cache variable would now have been used by the
toolchain file and the change *will* be part of the non-cache
variable's value.

The above are examples of why you should try to avoid updating these
cache variables from project code. We could leave the cache alone and
always update only non-cache variables, but then a developer looking
at the cache may wonder why the values they see there don't match the
values being used in builds. Or worse, they think the cache values
are being used and don't realize the builds are using something
different. Ultimately, we have to choose which downside we are happy
to live with. The changes here preserve the previous intent of
updating the cache, but it's still a bit fragile.

Fixes: QTBUG-89821
Task-number: QTBUG-85992
Task-number: QTBUG-86866
Change-Id: I8a16753e159bde338e6d2e5dd2ce91fc8ac5c39d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-15 22:26:41 +11:00
Laszlo Agocs
77350b7a71 Update vkmemalloc to 2.3.0
Task-number: QTBUG-90219
Change-Id: I382f59edbc869fd4f3557411264f290e9fd5dee5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-15 12:26:41 +01:00
Qiang Li
3f3d5e6716 Fix the tips still show when cursor move to another action
In this case, the previous action's tip is still displayed
when the cursor moves from one action with tip to another action
without tip.

Fixes: QTBUG-89082
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I0a00595dc3d716725678487be9cbb363c4d3b392
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 12:26:41 +01:00
Joerg Bornemann
baff03d3d4 Doc: Document the qt_no_entrypoint target property
Fixes: QTBUG-90031
Change-Id: Ib3e7e9d966ee64f97fdd3df48b3fa5325d19cc6c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-15 12:26:41 +01:00
Friedemann Kleint
f3251bcb87 QTabBar/Windows: Fix close button icons being too small on high-res screens
Add 32x32 versions. Move the icon creation to a helper function.

Fixes: QTBUG-88230
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I6dda2084e0122234eacea17ac191a19f6855f466
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-01-15 12:26:40 +01:00
ChunLin Wang
dafd26acbe Fix QApplication::font returns the font unstable according to the object
If a default font was not registered for the widget's class, it returns the default font of its nearest registered superclass.

Fixes: QTBUG-89910
Pick-to: 5.15 6.0
Change-Id: I6e6b2c6a0044462f84db9f76a03be0c6cfaaae8e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 14:38:35 +08:00
Ralf Habacker
ab2c61e638 If available, use a version-specific qt<major-version>.conf
To enable the current Qt version to use a qt.conf that is independent
from the previous version, a file named 'qt<major-version>.conf' is
searched for first. If this file does not exist, a file with the
name 'qt.conf' is searched for.

Task-number: QTBUG-88635
Change-Id: If75b63f72a7bdbdf1de7729ea4ecb00810b58d12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-14 23:30:47 +01:00
Andy Shaw
4d3d981144 Interbase: Don't error out if closing an already closed cursor
Pick-to: 6.0 5.15
Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-14 19:53:16 +00:00
Ivan Solovev
00505ed2b5 Widgets: fix setTabOrder for QAbstractSpinBox-like widgets
setTabOrder was not considering the case, when a child widget has
its focus proxy set to its parent widget. This happens, for example,
for the QLineEdit that is nested inside the QAbstractSpinBox.
For such cases the lastFocusChild was calculated incorrectly, and, as
a result, such child widgets were not correctly positioned in the
focus chain. This could lead to an error while backtabbing.

Here is a brief example. Suppose we have 3 widgets arranged like this:

auto spinBoxOne = new QDoubleSpinBox;
auto spinBoxTwo = new QDoubleSpinBox;
auto button = new QPushButton;

Then the default widget focus order is:
- spinBoxOne
- lineedit (from spinBoxOne)
- spinBoxTwo
- lineedit (from spinBoxTwo)
- button

Before this commit setting the explicit tab order changed the focus
order in the following way:

QWidget::setTabOrder(spinBoxOne, spinBoxTwo);
QWidget::setTabOrder(spinBoxTwo, button);

- spinBoxOne
- spinBoxTwo
- button
- lineedit (from spinBoxOne)
- lineedit (from spinBoxTwo)

In this case, backtabbing from spinBoxOne actually leads us to
lineedit (from spinBoxTwo), which refers to spinBoxTwo.
And so we're stuck in a loop.

This commit fixes the issue by handling such special case, and
preserving correct focus order.

Note: the actual unit-test in this patch uses QLineEdit instead of
QPushButton, because one can't tab to buttons on macOS by default.
However the general idea is the same.

Pick-to: 6.0 5.15
Fixes: QTBUG-81097
Change-Id: I5d16da7733a4d63f809cab28b8ca9e116b87cffa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-14 20:09:43 +01:00
Shawn Rutledge
aeeac48cbd AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinates
QGuiApplicationPrivate::processMouseEvent() sends a
QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not
accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled.
A QPA TouchEvent always contains native touch points, which is why
it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to
translate the QMouseEvent's device-independent position back to the
raw position that it would have had if it came from a real touchscreen.
Therefore we must give that function touchpoints that are actually in
native coordinates.

It may be that some of this transformation could be avoided entirely,
but here we prove that the existing way works correctly, by adding
coordinate checking to the tst_QWindow::mouseToTouchTranslation() test.

Pick-to: 6.0
Task-number: QTBUG-86165
Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-14 19:09:28 +00:00
Christian Ehrlicher
e9ccdf4d84 QPushButton/fusion style: don't ignore QIcon::On icon
The fusion style did ignore the QIcon::On icon because it reset State_On
to avoid the visual shift of a pressed button.
But it's not needed to reset this flag - the shift does not happen
because the fusion style does return 0 as offset for
PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will
happen.

Fixes: QTBUG-86736
Fixes: QTBUG-82110
Change-Id: Ie2aaddb14bc67874f5a9a23d9f04d7a08c6d070f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-01-14 19:09:13 +00:00
Joerg Bornemann
20a1791157 Lower the CMake minimum required version for single-config builds
Ubuntu 20.04 is a supported platform and comes with CMake 3.16. The
current state of the Qt build works fine with this CMake version, mainly
because the default build on Linux is single-config.

For multi-config builds we have higher version requirements as
documented in cmake/README.md.

This lowers the barrier for users using single-config builds who don't
want or cannot upgrade to CMake >= 3.18.

For Ninja Multi-Config builds, which were introduced by CMake 3.17, we
yield a warning that 3.18.3 is the lowest supported version.

Pick-to: 6.0
Change-Id: Ia918b9f2b494508e86301ffc0e138d3ad4dbaf86
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-14 17:00:55 +01:00
Morten Johan Sørvig
a2db96e253 Skip tst_qhighdpi when offscreen is not built
Android and Wasm do not build the offscreen platform
plugin (see src/plugins/platforms/CMakeLists.txt).

Skip building the tst_qhighdpi test as well in this
case. Remove the BLACKLIST entry.

Task-number: QTBUG-88505
Change-Id: I172198c8c24759b14f73ad07260c449fc6ab893f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-14 14:21:45 +01:00
Allan Sandfeld Jensen
92ed274475 Add API for creating QColorSpace with multiple color-transfer tables
One table per color channel, as is possible from many inputs.

Change-Id: I9fc723c68f222a228dd2b1458207b028422913bf
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-14 11:05:22 +01:00
Alexander Volkov
cefef116ef Disable copying of QUrlResourceProvider to avoid slicing
Amends 376e3bd8ec

Change-Id: Ib7b0de900c009f3bdb3f699a218444aafbe2eabe
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-14 13:01:57 +03:00
Mårten Nordheim
d2e2d0d3a6 QCache: when overwriting, store the new cost instead of the delta
The delta was clearly intended to be used on the total (and still is)
but it also wound up getting stored in the cache, which wouldn't be a
big problem unless the object was removed, in which case we could
incidentally 'free up more space' than intended.

Pick-to: 6.0
Change-Id: Ib2b0f072d30da6d16a93dce60e4c5f6080c109fc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-14 10:00:01 +00:00
Lu Zhen
cb4f853cb0 Add some error handling for the inotify file system watcher
In the readFromInotify() function, add a check whether
the ioctl function is successful or not. In the case of
failure, continuing to execute the following code would cause
errors in the read function because there is no data in the buffer.

Change-Id: Id53037e9e48c97c9eb75835048143875275b6370
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-14 09:47:07 +00:00
Andy Shaw
c2657f9762 QODBC: Preserve the whole value when using HighPrecision
Some ODBC drivers do not properly handle SQL_NO_DATA and therefore
decimal values returned with HighPrecision are cut off because the
decimal point is not taken into account.

Fixes: QTBUG-73286
Pick-to: 6.0 5.15 5.12
Change-Id: I905c947b4d0266a3245d5735300300ca00f77480
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-14 07:02:43 +00:00
Christian Ehrlicher
1bcfada9f0 QStyle: add name() to return the name of the style
Currently there is no way to get the name of the current style to e.g.
create a QProxyStyle for a specific widget only.
Therefore add QStyle::name() so QProxyStyle(const QString &) can be
called without hard-coding the style name.
Remove an unused doc snippet as drive-by.

Fixes: QTBUG-8004
Change-Id: I466c5e870a5392b238365bdc930f6a2ecee50cdb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-01-14 05:43:14 +00:00
Allan Sandfeld Jensen
47c6b5b91e Fix VNC format conversion
Pass the right from depth to the conversion function, and
set the right format before creating the compositor image
for RGB16 support.

Pick-to: 6.0 5.15
Fixes: QTBUG-85621
Change-Id: I76f46a3c2d8f1d2b040b790035dbdb0a960ff1a7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-13 22:22:29 +01:00
Jan Arve Sæther
583668005d a11y: Do not cache classes that don't have a factory plugin
For Qt Widgets we thought it was a good idea to also store in the cache
if a class didn't have a factory plugin. This worked fine there, since
the number of QWidget classnames is quite limited (so the factory plugin
cache will soon reach a limit)

In QML however, classes are often suffixed with e.g. Button_QMLTYPE_123,
Button_QMLTYPE_124 etc.
This number suffix is just increased continuously. This could lead to that
the factory plugin cache will grow ad infinitum, which will cause
"memory leaks" in addition to a performance penalty.

Pick-to: 6.0
Pick-to: 5.15
Fixes: QTBUG-75106
Change-Id: I9ba189f989f0b90ab62a2c54a2e9230236a998d8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-13 19:33:08 +00:00