Commit Graph

41540 Commits

Author SHA1 Message Date
Sona Kurazyan
ffac899576 Fix the size calculation of QHeaderView when stylesheet is used
When calculating the header section size based on its contents when a
stylesheet is used, the size hints from the stylesheet are used. In case
if the stylesheet specifies only one of the sizes, the other is set to
-1. Because of this the actual content size is ignored.

The solution is to calculate the size based on the application style, in
case if it's not specified in the stylesheet.

Fixes: QTBUG-75615
Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-14 10:17:07 +02:00
Frederik Gladhorn
ba328d2c7b Bump version
Change-Id: Ib35c8cdf300926001e08d234bc8cc3a08af4985b
2019-10-14 09:44:06 +02:00
Lorn Potter
139246faa3 wasm: fix arch detect on windows with WASM_OBJECT_FILES
Fixes: QTBUG-79146
Change-Id: I00188013b98687f34582aeb7b29b6d7439334536
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-14 17:40:41 +10:00
Tor Arne Vestbø
b03e75670b CoreText: Preserve font descriptors when resolving fallback families
From macOS 10.15 and iOS 13 forward it's not possible to create font
descriptors for system fonts such as .AppleSystemUIFont based on the
family name.

This means we have to preserve the font descriptors we get from CoreText
for fallback fonts, so that we can populate them along with the family name.

Task-number: QTBUG-78821
Task-number: QTBUG-77467
Change-Id: Ifce01da65f90afb7dc2bc3005c3c5870b9c116de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-14 07:28:01 +00:00
Tor Arne Vestbø
253ce59c12 CoreText: Use StyleHint as fallback when family is not found
Change-Id: I11fb6cafe9d41c38eac6ca0695c89f30f998f257
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-14 09:04:29 +02:00
Thiago Macieira
6426a38d82 Partially revert "qfloat16: suppress the tables if FP16 is supported by the CPU"
This reverts the x86 F16 part of commit
9649c41ed9. Unfortunately, it is perfectly
valid to compile coe without F16C an link to a QtCore that was compiled
with it. That's the case in Clear Linux where there's
/usr/lib64/libQt5Core.so.5 and /usr/lib4/haswell/libQt5Core.so.5.

Change-Id: I907a43cd9a714da288a2fffd15baacace8331403
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-10-13 21:21:10 -07:00
Francisco Boni
da12c06b99 Fix build with ICC under IPO on Windows
qmake.conf(25) incorrectly sets QMAKE_CFLAGS_DISABLE_LTCG to -Qno-ipo.
The correct form to disable IPO on Windows with ICC 18.x and 19.x should
be: -Qipo-. The implication is that the CONFIG feature in simd.prf (31)
modulating the compilation of specific ISA optimized sources now
successfully disables IPO on intel_icl when needed.

Fixes: QTBUG-78976
Change-Id: Id691f69b909d2bbba77402ff4f0b17b3b07ad6f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-13 15:08:43 -03:00
Sona Kurazyan
66a9c4b0b2 Remove usages of deprecated APIs of QDesktopWidget
- Replaced the usages of the following deprecated APIs:
  * QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
  * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
  * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)

- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.

- Fixed the tests to build conditionally, only when these APIs are
enabled.

Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-13 13:08:42 +02:00
Joerg Bornemann
a90899df43 Default to #!/bin/bash in wrapper scripts on macOS
This gives the user the opportunity to employ BASH_ENV to circumvent
macOS System Integrity Protection and set variables like
DYLD_FRAMEWORK_PATH.

Fixes: QTBUG-57204
Change-Id: Icd99d903a3be76fabd509e204ea61a254a96609c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-12 09:57:28 +02:00
Samuli Piippo
55427858e3 QStandardPaths: Correct handling for XDG_RUNTIME_DIR
Always try to create the runtime directory and never change
the permissions of an existing directory. Conform to the
XDG Base Directory Specification:

"If, when attempting to write a file, the destination directory
is non-existent an attempt should be made to create it with
permission 0700. If the destination directory exists already
the permissions should not be changed."

Fixes: QTBUG-68338
Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-12 08:57:35 +03:00
Allan Sandfeld Jensen
a0f145baab Fix vertical advance for printing on macOS
The Y coordinate needed to be reversed to produce expected results.

Fixes: QTBUG-69803
Change-Id: If349912cd078d17ce69d207c2ed35cf781c1a14d
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
2019-10-11 20:56:43 +02:00
Leena Miettinen
2e12825b0b Doc: Describe initTestCase_data() function and QFETCH_GLOBAL macro
Fixes: QTBUG-24342
Change-Id: I8f8f3726c5d31e34af9bfe054572c08fc07e01e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-11 16:53:23 +02:00
Nico Vertriest
365f70be6e Doc: Correct snippet about customizing QMenuBar
Task-number: QTBUG-79129
Change-Id: I1f8da3b429ab8543ca1f0b7079d0f50bbeea8eb5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-11 16:53:23 +02:00
Andre de la Rocha
31012df705 Fix QGraphicsScene::update() performance
A previous fix has caused a performance degradation while adding a
check for avoiding adding duplicated rectangles to the update list.
This patch fixes it by using a std::set instead of a QList, avoiding
duplication while using an O(log N) operation, instead of the O(N)
used before.

Fixes: QTBUG-77952
Change-Id: Ifa9fbf110e0bad60ee02a42d91281981fd98ceab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-11 16:53:23 +02:00
Milian Wolff
014d7ac654 Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversions
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.

This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.

Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-11 16:53:23 +02:00
Johan Klokkhammer Helsing
6abbecf942 evdevtouch: Fix touch device count not being updated
When this was refactored in 3bc10fb9bb to use unique pointers, a move was
added before the connection, so it would essentially always try to connect a
nullptr.

Change-Id: Iab7fce88bc73afd78e6b63ffaef7358f3f4ce7e3
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2019-10-11 16:32:52 +02:00
Volker Hilsheimer
1748dc3e2d QGroupBox: always disable children in a checkable, unchecked groupbox
The childEvent handler sets the enabled property of children as they are
added to the groupbox, but applications might later enable children and
check/uncheck the groupbox's checkbox in undefined order. In that case,
we would end up with enabled children inside a conceptually disabled
groupbox (the groupbox's checkbox represents the logical "disabled"
state), which breaks documented QWidget::enabled rules.

To make sure that all children are disabled as per the state of the
groupbox, we need to run that logic once the UI has been set up, and
before it becomes visible. This is what polishing is for, so listen
for that event in addition and handle it the same way as adding (which
duplicates things, but keeps existing code that might depend on things
being updated as they are added working).

Adds the case to the existing enabledChildPropagation test case.

[ChangeLog][QWidget][QGroupBox] Always disable children of a checkable,
unchecked group box before showing.

Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619
Fixes: QTBUG-25938
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-11 13:53:49 +02:00
Morten Johan Sørvig
81a7909693 Fusion Style: Use high-dpi pixmaps
Pass the QWindow as context to QIcon::pixmap(), which
enables it to return high-dpi pixmaps when needed.

Fixes: QTBUG-74100
Change-Id: I4556f0a98df8b6ba65376778379a03eb8c470d00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-11 13:51:55 +02:00
Rainer Keller
23d7320852 Protect global variable g_pointIdMap with mutexes
The evdev touch handler is thread based and calls
QWindowSystemInterface::handleTouchEvent. The global variable
in qwindowsysteminterface.cpp is used without being protected by mutexes
which causes data loss and crashes when multiple touch screens are used.

Fixes: QTBUG-63584
Change-Id: I8b5bb04cc517fab96ac428b2bd2bc128b2ca1a54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-11 12:51:23 +02:00
Eirik Aavitsland
c54083ff93 Fix QEasingCurve possible imprecision at endpoints
Both the spline curves and (most of) the predefines curves are defined
as having start value 0.0 and end value 1.0. The spline and In/OutBack
functions would sometimes not produce that result precisely, so code
could not reliably depend on expressions like (easedValue < 1.0)
becoming false. Fix by explicitly handling endpoints.

Fixes: QTBUG-76781
Fixes: QTBUG-72630
Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-11 12:29:27 +02:00
Tor Arne Vestbø
eaf4911db2 macOS: Optionally flush sub-layers via sub-image copies of the backingstore
When we're flushing the backingstore to sub-views with their own layers
we don't want to pay the cost of uploading the whole backingstore to the
GPU in the case where we're dealing with a discrete GPU.

To work around this we make a copy of the appropriate part of the surfcace.

This results in additional copies of the data, and will need further
investigation to limit these.

Task-number: QTBUG-77447
Change-Id: I318ae80e433dd7b0a55fd5a598b19f114d8bd28e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-11 12:28:58 +02:00
Tor Arne Vestbø
35713ef3ff macOS: Don't override event handler for kAEQuitApplication
The implementation of the default handler, [NSApp _handleAEQuit],
does a lot more than just terminating the application, including
sending NSWorkspaceWillPowerOffNotification if appropriate, and
deals appropriately with state restoration.

Change-Id: If725838fc0f40d09a0b8885eb3e7239499d8fea0
Fixes: QTBUG-18624
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-11 12:28:56 +02:00
Tor Arne Vestbø
e4e3be7501 macOS: Simplify reflection delegate handling in QCocoaApplicationDelegate
Sending a message to a nil object returns nil, so there's no reason to
check the delegate before calling respondsToSelector, and we can use
the implicit _cmd argument to pass along the selector for the method
we're in.

For applicationShouldTerminate, if there's a reflection delegate but
it doesn't answer to applicationShouldTerminate it makes no sense to
skip our own logic.

Change-Id: Iafcd883a5c8cec1b35d2f95238de55eff060d71f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-11 12:28:49 +02:00
Timur Pocheptsov
aa3540b7be QMacStyle - fix the background color for tool button
when it's in 'ON' state ("inverted" color in 'Dark' appearance).
Number are rather arbitrary and extracted with 'Digital Color Meter'
app to make it look similar to the native panel (to be honest,
this tool button on a toolbar not to be found in many native apps,
they use different buttons anyway).

Fixes: QTBUG-71526
Change-Id: Ie61e60b77f097f04550006612e4aab6f11bb954b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-11 11:59:41 +02:00
Edward Welbourne
60deb69034 Distinguish invalid datetimes from others
A default-constructed QDateTime is invalid, but compared equal to a
valid one referencing the start of 1970.  This lead to date properties
in QML being initialized invalid but not getting an onChange if the
first value they're set to is the start of 1970.

Fixing that then lead to some tests failing. Indeed, the original
equality check involved using toMSecsSinceEpoch(), whose value is
undefined unless the datetime is valid, without a prior check on its
validity: so ensure all uses of toMSecsSinceEpoch() are guarded with
isValid() checks.

Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column
(previously unused, after separating from toTime_t(), which uses this
column for "out of time_t's range") for validity of the datetime.

[ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as
equal and less than all valid ones. They could previously be found
equal to valid datetimes.

Fixes: QTBUG-79006
Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-11 11:59:41 +02:00
Frederik Gladhorn
afb82ef5be Merge 5.13 into 5.13.2
Change-Id: Id8852e90bfc5e4bd3e344435195992c5c7a0ab86
2019-10-11 09:54:09 +02:00
Christian Ehrlicher
4af00753fa Cleanup QtWidgets examples
Cleanup QtWidgets examples:
 - use nullptr (clang-tidy)
 - use member-initialization
 - adjust the style
 - fix includes

Change-Id: Ic5448606aacc525ea60b615a69227017aa2b821a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-11 06:32:30 +02:00
Volker Hilsheimer
65fcd8524d QAbstractScrollArea: when used as a popup, apply regular popup behavior
QWidget::mousePressEvent is documented to implement the closing of
popups if the widget is a popup. QAbstractScrollArea is one of the
QWidget subclasses that might be used as a popup as well, so instead of
just ignoring mousePressEvents, pass the event on to the QWidget
implementation for regular popup handling.

Change-Id: I05f77a334945f3c167f729f30bc022599230379b
Fixes: QTBUG-60885
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-10 19:08:09 +00:00
Shawn Rutledge
f1dd6addda Make QTextBlockFormat::MarkerType an enum class
This came up during API review.

Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-10-10 21:08:08 +02:00
Joerg Bornemann
472f5331ca Doc: Fix QMAKE_EXTRA_TARGETS snippet description
The snippet uses the Unix touch command, not qmake's touch function.

Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-10 14:43:15 +02:00
Joerg Bornemann
a6ece9e88a Fix relocatable prefix for hardware-specific Linux builds
Since Qt 5.3.0 we recommend that Linux distributions place a
SSE2-enabled copy of QtCore in a $PREFIX/lib/sse2 subdirectory (see Qt
5.3.0 changelog for details). Same for other hardware capabilities like
AVX2 and AVX512.

This use case was broken with the introduction of the 'relocatable'
feature, because the prefix is determined from the location of
libQt5Core.so and the relative path from libdir to prefix, which is
baked in at configure time.

We now try to locate the libdir below the prefix, and if that fails try
again in the upper directories.

Fixes: QTBUG-78948
Change-Id: Ieec6e1484974e19335cf08ae0df3ee5c0e316d28
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-10 13:26:37 +02:00
Liang Qi
386768298c Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-10-10 13:26:37 +02:00
Friedemann Kleint
ae7b218982 Windows QPA: Improve reliability of clipboard retrieval
Clipboard retrieval sometimes fails due to the other application
having the clipboard locked. Retry opening the clipboard.
The choice of parameters is empirical, they have been observed
to prevent failures for MS Office applications at least.

Fixes: QTBUG-53979
Change-Id: Icbcaee149f0d377f33b222cdafbb2a21a7f1cf9d
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-10 13:26:37 +02:00
Friedemann Kleint
f7cb11d6f1 QWidget: Answer question raised in fixme comment
Add a comment for fixme comment added in
f1268d137e.

Change-Id: I08cd104442b13925be2aa5a48e64e391c9903099
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-10 13:26:37 +02:00
Volker Hilsheimer
3dbc7596a3 Drag'n'Drop: fix crash when widgets are destroyed during event handling
Widgets might be destroyed when handling a dragMoveEvent, in which case
the following code will operate on dangling pointers or null pointers.
Use a QPointer to watch for the original event receiver to disappear,
and add the necessary checks for the objects we deliver events to being
null.

Change-Id: I4ca2f182540ae21113f4bea4e5c569e983cc58bf
Fixes: QTBUG-78907
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-10-10 11:02:34 +00:00
Timur Pocheptsov
9845c06d1f DTLS auto-test(s) - fix a buggy logic with pending datagrams
Fixes: QTBUG-79128
Change-Id: Ifebd5b056541b7732b15b5cf063ad22ab754a64c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-10 11:28:24 +02:00
Eirik Aavitsland
d2ae838a7c Item views: fix regression causing unexpected widget overlapping
A certain geometry adjustment was (practically) introduced in Qt 5.11,
and caused very surprising behavior, where item widgets will often
overwrite neighbouring cells. This has resulted in a number of bug
reports. Since the adjustment has such serious side effects, and does
not seem to be relevant any longer for the issue for which it was
intended, remove it here.

More details: From early Qt 4 times, QStyledItemDelegate would do some
automatic expansion of the geometry of editor widgets - but only if
the layout was RightToLeft. Hence, the effect of it was rarely
seen. QTBUG-37433 did, for Qt 5.10, and complained about it. However,
the resulting code change did not remove the adjustment, but instead
extended it to apply to the normal LeftToRight layout also. Hence,
more users experienced it, and reported it as a regression.

Also, now in Qt 5.13, it seems Qt has changed in other ways, and the
geometry adjustment no longer seems to help (or indeed make any
difference to) the original case in QTBUG-37433.

Fixes: QTBUG-78495
Fixes: QTBUG-76011
Fixes: QTBUG-68476
Change-Id: I4a4e873969eb1d89843f98fc63d90371207515d1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-10 10:54:31 +02:00
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Thiago Macieira
4f88e0bbd1 Fix build: disable the HWRNG in bootstrapped mode
qmake build fails:
qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)':
/home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)'

Fixes: QTBUG-78937
Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-10 05:00:25 +00:00
Shawn Rutledge
18aa8390ce Add qt.qpa.input.events logging to evdevtouch
The xcb platform plugin uses this category for detailed input event
logging, so we might as well be consistent in evdevtouch.  When hardware
supports pressure sensing, it's likely to need extra debugging.

Task-number: QTBUG-77142
Change-Id: I7682bb5d49e669054523f9cf556715e511bcd572
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-10 06:10:29 +02:00
Robert Loehning
d6734e8ab7 Fuzzing: Don't copy input data to QByteArray
Change-Id: I603413805dca46a85709c2ab6ff573687849572e
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-10-09 17:16:09 +02:00
Timur Pocheptsov
5e7365573e Remove a new-line
that was accidentally introduced this week.

Change-Id: I0731c7c64e51b40f230b42694603056d89a05712
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
b62b80706e rhi: Autotest for rendering a triangle into a window
Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
df0b1836b5 rhi: Autotest rendering with uniform buffer
Change-Id: I4251f31494680c78e90a08a2b471cb1af08ecd81
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
b2de7f8583 rhi: Autotest rendering a textured quad
Task-number: QTBUG-78971
Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
8f44da1f55 rhi: Enable the qrhi autotest on WinRT
There is no onscreen support for WinRT in the D3D11 backend yet.
However, offscreen operations (rendering into a texture) should work.
One catch is that there is no D3DCompile available for deployed WinRT
apps. So ship the intermediate format (DXBC output from fxc) in the
.qsb files.

Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
59604405c9 rhi: Fix non-base level copy and readback wrt source size
When the source size is not explicitly specified, we take the entire
subresource. However, just using the texture's size is wrong: when the
source level in a copy or readback is not 0, the size for the corresponding
mip level has to be used instead.

This fixes occasional crashes with Metal in the autotest.

Change-Id: I99f689feef93ec86dffdc9e82d6bfdaf5c1eb041
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
dd105fab8d rhi: Autotest rendering a triangle
Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.

Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
9baf69c765 rhi: gl: Add a feature flag for reading back non-zero mip levels
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.

Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
32924110ce rhi: gl: Switch GetBufferSubData emulation to MapBufferRange
Use only APIs that are in GLES 3.0.

glMapBuffer() is an old OES extension, stop bothering with that.
Not the least because ANGLE claims supporting it and then fails the
map. (not that we care much about ANGLE, but, for instance, the qrhi
autotest is run with ANGLE configurations as well in the CI, so have
to still take care of it for the duration of Qt 5.x)

Change-Id: I29140402cedffe0430f920ee0c061673257c3aa1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00