Commit Graph

47166 Commits

Author SHA1 Message Date
Karsten Heimrich
a8028a02df Port the QXmlStream API from QStringRef to QStringView
This gives some source incompatibilities, most of them can be
handled by using auto instead of QStringRef explicitly.

[ChangeLog][Important API changes] QXmlStream now uses QStringView
insteead of QStringRef in it's API. Using auto forvariables returning
a QStringRef in Qt 5 should lead to code that can be used against both
Qt versions.

Fixes: QTBUG-84317
Change-Id: I6df3a9507276f5d16d044a6bdbe0e4810cf99440
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-19 19:48:03 +02:00
Fabian Kosmale
a2cec17407 QMetaType: specialize typenameHelper for std::pair
The string representation of std::pair<T1,T2> is now always
"std::pair<T1,T2>". This is in line with how we translate QPair,
avoiding typename mismatches that would previoulsy occur, because the
full name of pair on libc++ was "std::__1::pair".

Fixes: QTBUG-84924
Change-Id: Ia6c044a7327d69e4b4f4a31496c6b2408d85ebb9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 19:17:46 +02:00
Allan Sandfeld Jensen
2df41e2c48 Remove binary compat sources for qbytearray and qstring
No longer needed in Qt6.

Change-Id: I29567e175e07cc3658f0619acfd604abf64f6459
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 19:04:34 +02:00
Alex Trotsenko
cced8c9005 Make QAbstractSocket::abort() behavior unambiguous
After calling this function, the user expects that the connection is
terminated, I/O device is closed and the socket is ready for a new
attempt. But, if the socket was disconnected before the call, close()
is not called and I/O device remains opened.

Because QAbstractSocket::close() and QIODevice::close() can handle
reentering, we can call close() unconditionally, which makes
the behavior obvious.

Change-Id: I90a9cbb1a1fe8f866b55ef0bd68d286b34e853f5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 20:01:45 +03:00
Cristian Adam
12e4b63d28 CMake Build: Fix libdrm detection and compilation on QNX
On QNX 7.1 x86drm.h is located under <...>/usr/include/libdrm, unlike
linux where it's present under /usr/include.

find_path would not find it on QNX, and instead get /usr/include from
host, which resulted in a failure to compile.

Task-number: QTBUG-83202
Change-Id: I03d6c2d4dfbe91bb70df0a322e84890bd7c8548a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 18:43:37 +02:00
Alexandru Croitor
41800c3c31 CMake: Add /OPT:REF flag when building Qt on Windows
In qmake it's done for all qmake projects, in CMake we lean on the
safe side and apply it to building Qt itself. User CMake projects can
then choose to add it themselves.

Task-number: QTBUG-85992
Change-Id: I51919f947d43ffd9925e3d2837dcad17e480367d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-08-19 18:26:00 +02:00
Alexandru Croitor
cb1600145b CMake: Adjust compiler flag optimizations to qmake mkspec ones
There are inconsistencies in the default optimization flags added by
CMake across configurations like Release and RelWithDebInfo.
In particular Release uses -O3, whereas RelWithDebInfo uses -O2,
as well as usage of /INCREMENTAL in release configs with MSVC, etc.

To make sure that the Qt 6 binaries built with CMake are consistent
across configs, as well as consistent with the flags we used when
building Qt 5 with qmake, add a horrible search and replace mechanism
to replaces the CMake flags with what our mkspecs indicate to use.

Ideally this would be done by providing custom CMake toolchain files
for each platform we support, and we might revisit that later if the
need really arises.

To implement the replacing, we first need the flags that should be
added. Port the QMAKE_CFLAGS_OPTIMIZE variables to CMake, which is
done in QtCompilerOptimization.cmake.

Then a new function called
qt_internal_set_up_config_optimizations_like_in_qmake will look for
any kind of optimization flags set in the
CMAKE_<LANG>_FLAGS_<CONFIG> style variables, remove them, and add
the appropriate flags that qmake mkspecs provide.

On some platforms (like Windows MSVC) the function also alters the
linker CMAKE_${TYPE}_LINKER_FLAGS_<CONFIG> style variables.

The mechanism allows opting out of this replacing by
setting the QT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS value.

It also allows opting into removal of flags for custom configs by
providing QT_ADDITIONAL_OPTIMIZATION_FLAG_CONFIGS. It's only removal,
because we wouldn't know what kind of config it is, and thus what
flags to add.

The currently modified configs are: Release, RelWithDebInfo,
MinSizeRel, Debug aka the usual default CMake provided ones.

The mechanism is only applied to C-like languages.
ASM is not handled to be on the safe side due to not knowing what kind
of compiler flags the platform assembler might take.
It's also important to skip RC on MSVC platforms.

Task-number: QTBUG-85992
Change-Id: I3712d5cd5a34fceab54f56a6fa46b4e678952362
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-08-19 18:25:59 +02:00
Kai Koehne
a1cc2fbbda Update qmake before building src
This (hopefully) fixes an issue where syncqt cannot write Qt
header files (Permission denied) on Windows.

Fixes: QTBUG-86121
Change-Id: I69f0bc136b16ab8b26e53e102c9ddd21112a6b2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-19 18:25:51 +02:00
Laszlo Agocs
2da2e24bbc rhi: d3d11: Enable setting xxxColor as an alpha src/dst blend factor
Fixes: QTBUG-86111
Pick-to: 5.15
Change-Id: Iabcf1708ea65e9f05f39caf9df9b45c25ac5dbb8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-08-19 18:23:52 +02:00
Jarek Kobus
7773f7f90e Fix the doc example
The intention is to return list containing two items, not just one.

Change-Id: I96f3ce939f2ef6db6bdac5d9165bb7814ebfa91a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-19 18:23:01 +02:00
Andrei Golubev
9260950552 Introduce GrowsBackwards case operations
Added operation overloads based on GrowsBackwards flag to array data ops

"New" operations can be considered as mirrored to original special cases
where near-begin (free)space is used instead of near-end space

The newly added functions are not used anywhere in this commit. Yet there
is enough code to consider a separate review for the operations along with
tag dispatch approach used

Task-number: QTBUG-84320
Change-Id: Ie57d97fcc6beeaf5cce6820b38702e376c431c0e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 15:03:05 +02:00
Morten Johan Sørvig
ff52d95e29 Use the factor() function for getting scale factors
Make the code less dependent on (changing) high-dpi
internals.

Change-Id: Ifc7cb4aab1c1c70016ca86639edf5c9630999f9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-08-19 15:01:46 +02:00
Morten Johan Sørvig
733b653844 Update QHighDpiScaling on DPI change
Make sure Qt reacts correctly to DPI changes while the
application is running, also when going from “standard-dpi”
to “high-dpi” (like Windows 100% to 200%).

Call QHighDpiScaling::upateHighDpiScaling() on DPI
change and update the m_usePixelDensity flag from there.

Fixes: QTBUG-85384
Pick-to: 5.15
Change-Id: I8ca83e4eea76cc8ba701a18e1f8c535b9953918f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-08-19 15:01:45 +02:00
Andy Shaw
ade59ea316 Cocoa: Translate the buttons used for the native font and color dialogs
Use the QPlatformDialogHelper standard buttons to get the translated
button text as then this will already have been translated for those
loading a translation.

Pick-to: 5.15 5.12
Fixes: QTBUG-85725
Change-Id: Ia42d93aeb6e1b5c0528564a6c960a35f6710c8eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-19 15:01:45 +02:00
Morten Johan Sørvig
e93ec716bf High-DPI: Use correct DPI for QT_USE_PHYSICAL_DPI
Setting the QT_USE_PHYSICAL_DPI environment variable
will make Qt use physical DPI when determining the
screen scale factor, instead of logical DPI.

However, the code was using QScreen::physicalDotsPerInch(),
Whose return value is itself scaled by the device
pixel ratio. (See QTBUG-62649 for further discussion).

Use QPlatformScreen API instead and calculate the DPI
based on geometry() and physicalSize().

Pick-to: 5.15
Change-Id: Ifa29065c447b0d3431e0f14aacb5aafce61051c2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-08-19 15:01:45 +02:00
Andy Shaw
c3f74bdc3f Don't crop the icon when it is aligned to the left
When we use double the icon spacing then the area for the pushbutton is
not long enough, so in order to account for the gap inbetween then just
use half of the icon spacing when positioning the text as it only has
spacing on one side of the icon to it.

Change-Id: Ib3fe0037835b67efda0fc274421f976ccc98eb06
Pick-to: 5.15
Fixes: QTBUG-85723
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-08-19 12:46:10 +02:00
Cristian Adam
7e10dcb1d4 CMake Build: Add include guards for FindPPS.cmake and FindSlog2.cmake
The CMake configure process fails without include guards for these
two find modules on QNX.

Task-number: QTBUG-83202
Change-Id: I3cc589f98bc3b6b22c401421927ee6dab2663fb7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:10 +02:00
Cristian Adam
1b802c41eb CMake Build: Disable pkg-config for QNX
QNX doesn't come with pkg-config support.

Task-number: QTBUG-83202
Change-Id: I2ac0c014a071b83ef9a2d8114bae0e9ff9b3b422
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:10 +02:00
Cristian Adam
535c6de9c4 CMake Build: Do not link to pthread for QNX for cxx11_future detection
Similar to Android QNX doesn't have pthread as a sepparate library.

Task-number: QTBUG-83202
Change-Id: I8e55d4b6d2b4e2162c264f897019d88c15319ebb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:10 +02:00
Cristian Adam
22eb544ebf CMake Build: Add socket as a dependency for QtNetwork on QNX
QtNetwork requires the socket library as a public dependency. Similar
to Windows's ws2_32 library.

Task-number: QTBUG-83202
Change-Id: I92bb48fddc2cbea07700cde65b4737500b9820f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:10 +02:00
Cristian Adam
ddf8b2770c tst_qplainttextedit: Do not use paste() method with no clipboard
On QNX the test fails to build because there is no clipboard feature
and the code is using the paste() method which doesn't exist.

Task-number: QTBUG-83202
Change-Id: Ie070ec8850b528e122e954074a1a0a3c78a14248
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:10 +02:00
Jarek Kobus
765f503b1e QtConcurrent: Introduce runWithPromise()
The differences to run() method:
1. The passed function should have additional
   argument QPromise<T> &, declared as a first argument.
2. The return value of the function must be void.
   Result reporting should be done through
   passed QPromise<T> &promise argument.
3. By default, runWithPromise() doesn't support functors
   with overloaded operator()().
   In case of overloaded functors the user
   needs to explicitly specify the result type
   as a template parameter passed to runWithPromise,
   like:

   struct Functor {
       void operator()(QPromise<int> &) { }
       void operator()(QPromise<double> &) { }
   };

   Functor f;

   runWithPromise<double>(f); // this will select the 2nd overload

Task-number: QTBUG-84702
Change-Id: Ie40d466938d316fc46eb7690e6ae0ce1c6c6d649
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-19 12:46:10 +02:00
Kai Koehne
0243951e0a MSVC: Fix C4996 warnings when building Qt
Task-number: QTBUG-85227
Pick-to: 5.15
Change-Id: I22ca672d993d77164c91939d1b8fad0c0332b57a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-08-19 12:46:09 +02:00
Kai Koehne
1022944a35 Document qmake variable ANDROID_TARGET_ARCH
ANDROID_ABI is only available in CMake. In qmake, the variable is called
ANDROID_TARGET_ARCH.

Fixes: QTBUG-85542
Change-Id: I0f3f7320b08a4fe6448dd40c294254c644cfb3ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-19 12:46:09 +02:00
Kai Koehne
bfd4b958b5 CMake Port: Remove outdated information in README.md
Change-Id: Iefc1e13f5882ca69a2583f2454d00d9dfb42640d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 12:46:09 +02:00
Kai Koehne
29bd0b781a Windows: Avoid syncqt needlessly re-generating headers
Normalize newlines so that headers on Windows are not
always treated as outdated.

This amends 108fb2f197.

Task-number: QTBUG-86121
Change-Id: I46ddb3c5b42852bff75fd56ca224c555ac0bae94
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-19 12:46:09 +02:00
Joerg Bornemann
5f729da74a CMake: Implement configure -qreal <type>
The configure argument -qreal <type> maps to the CMake argument
-DQT_COORD_TYPE=<type>.

Fixes: QTBUG-83325
Change-Id: I94970f31ccfb241b1dd4f1d9b6cef25d6684dc05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 08:28:50 +02:00
Tor Arne Vestbø
3911be6160 Handle simulator platforms when parsing LC_BUILD_VERSION load command
Task-number: QTBUG-85764
Pick-to: 5.15
Pick-to: 5.12
Change-Id: Ie46bee0937908e2dfedfa3532394dde015abf891
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-19 04:06:54 +00:00
Giuseppe D'Angelo
8191a19df4 QMultiMap: fix regression in find(Key, T)
1) Implementing the const version in terms of the non-const
version exposes to accidental detaches. Avoid that.

2) The non-const version has to detach, just like find(Key),
or doing a comparison like find(Key, T) != end() might report
a wrong result.

3) Properly check if the value was found by checking find_if's
return value (against its second parameter, the end of the
iterated range). If the value was NOT found, then return
the map's end() (again because clients of find() will check
against end()).

Change-Id: I03533e89f1e7a52ad888d159d78f38002765953c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-08-19 01:45:25 +02:00
Giuseppe D'Angelo
2ba1d540e6 QMultiMap: fix remove(Key, T) when key/value belong to the map
Just like any other container, it's legitimate for the user to
pass key/values belonging to the same container.
Q(Multi)Map::remove(Key) are already safe (either they call
erase() directly on std::(multi)map, where it does the right thing,
or they skip elements while detaching).
However, QMultiMap::remove(Key, T) wasn't safe in this regard
(the implementation is hand rolled), so take copies before start
erasing.

Change-Id: I87767d608b83216a6ff264fb6c8f145fdb5934f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-19 01:45:19 +02:00
Allan Sandfeld Jensen
041f655c01 Use [[nodiscard]] with clang in C++17 mode
It is only broken in C++11/c++14 mode.

We do need to fix the order of visibility-attributes and this
C++ attribute.

Change-Id: I41e4367f1aaa9241fec4e336c39e58b798336b2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-18 22:32:20 +02:00
Timur Pocheptsov
579a11590d QSsl: introduce qtls_utils_p.h with simple RAII helpers
Now that I need this stuff both in OpenSSL and woldSSL code, makes sense
to introduce such helpers as a separate change (instead of duplicating
the code in wolfSSL patch).

Change-Id: I9ce600ebe709d103209372ea4c2bdb6fa6b6ce3a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-18 20:24:44 +02:00
Joerg Bornemann
ca2f13bad6 CMake: Purge remains of the -cmake-makefiles configure argument
This amends 3ac054d6a8.

Change-Id: Ia6f1e4d967160628144478f9baecbcd3ae74dd32
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-18 20:24:44 +02:00
Alexandru Croitor
18cb90cd31 Android: Copy required gradle files in non-prefix shadow builds
This fixes running 'make apk' in a qmake android project,
when using a shadow non-prefix build.

An implementation detail is that COPIES can't take both files and
directories as values, so we split them into two steps.

Task-number: QTBUG-85399
Change-Id: I7373d6b7aede6e33096cb9718c679fa5e5dc1703
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-18 20:24:43 +02:00
Mason McParlane
57b928a1a5 Replace WIN32 with CMAKE_HOST_WIN32
The qt5_make_output_file routine joins paths together improperly on
Windows when cross-compiling to a Unix target (Android). This change
ensures the paths are set properly based on host machine instead
of target.

Fixes: QTBUG-86037
Pick-to: 5.15
Change-Id: I411b4f80296e989cd4fdf19799b731131defb2ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-18 18:24:43 +00:00
Andrei Golubev
4bf8e82d41 Add QArrayDataPointer::freeSpace*() functions
Added functions that tell how much free space is available at the
beginning and at the end of the storage

Updated preconditions of operations to use freeSpace* functions

Also, changed casts uint(this->size) to size_t(this->size)

Task-number: QTBUG-84320
Change-Id: Iad94c1060a00f62068da9d1327e332a00d4f4109
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-18 12:55:38 +02:00
Andrei Golubev
0bd647fa4f Reorder operations to align with exception model in qarraydataops.h
Fixed order of certain operations to better handle situations when
exceptions occur

Change-Id: Ia2075c37b4b7653067dfa6a82252cbb12b96708f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-18 12:55:38 +02:00
Andrei Golubev
56f1208f9e Separate exception safety primitives from operations
Refactored certain bits of qarraydataops.h: picked exception-related
building blocks and put them into one place, (somewhat) documented
the usage, added tests

Personally, the existing code seemed rather complicated to analyze
(and do mental experiments for corner cases), especially when staring
at the whole thing for a while or "returning back" from some other work
and I still have my doubts that everything works correctly. Testing the
building blocks that are used should:
a) increase trust into existing code (provided the usage is correct)
b) give more use cases of how to use the building blocks, which in turn
   would allow to compare and contrast tests vs implementation

Task-number: QTBUG-84320
Change-Id: I313a1d1817577507fe07a5b9b7d2c90b0969b490
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-18 12:55:38 +02:00
Andrei Golubev
01a03a02f9 Refactor array data operations
Replaced copyAppend implementations with insert(this->end()) where
possible. This forced an update of the preconditions in insert

Unified moveAppend between generic and movable operations

Change-Id: I388c14436e32152ebb969bdd94753ed5452c1b7c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-18 12:55:38 +02:00
Edward Welbourne
2584998c66 Follow through on ### Qt6 comments in qglobal.h
Left the translation NOOP for later, pending advice on how to fix
QIODevice, which doesn't compile without them.

Task-number: QTBUG-85700
Change-Id: Icc423ecabb43714d98b5d9b0f9a96c5bb6ef1d78
Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-18 12:55:38 +02:00
Andrei Golubev
5247af96e3 Refine precoditions and logic of array operations
Updated insert() methods:
* Refined Q_ASSERT() checks
* Fixed implementation issues (some of which resulted in
  actual crashes)
* Allowed to insert at the end. This is safe as far as I can
  tell and actually would allow to simplify considerable chunks
  of code (mainly, copyAppend versions to just return
  insert at the end)

Updated tests accordingly

Change-Id: I0ba33ae5034ce8d5ff95b753894e95d71ba00257
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-18 12:55:38 +02:00
Andrei Golubev
48911869cb Extend array operations tests with extra cases
Extended existing tests with QArrayData's allocation options

Added extra tests on array operations covering append, insert,
emplace, erase and truncate. "Raw" QArrayDataPointer is used instead of
test-specific SimpleVector to check the behavior without some custom
logic in-between

The change targets future updates to array operations in the light of
prepend optimization: as the array operations would become more complex,
these tests should give a much better coverage (specifically due to
likely non-trivial implementation details and optimizations)

Task-number: QTBUG-84320
Change-Id: I6581e2cb48f81b82ee5052d1dcea3da2819df47a
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-18 12:55:38 +02:00
Joerg Bornemann
f4f4557835 Remove Qt 5.1 binary-compatibility warning
There's no way that Qt 6 will be binary-compatible with Qt 5.1.

Change-Id: Ic1abfbdc8dc497dcb24494a8f3e2d96bcf27ef83
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-18 12:55:38 +02:00
Joerg Bornemann
93c1307a66 CMake: Re-generate src/network/configure.cmake
Change-Id: I408ac23156505901194e9aa6f151bac889e432ff
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-18 12:55:38 +02:00
Martin Storsjö
f263385471 QCache: Fix the usage of std::is_nothrow_assignable_v
The std::is_nothrow_assignable_v template takes two template
parameters. Current clang nightly errors out on the previous code,
while earlier versions, and GCC, fail to diagnose the missing
template parameter.

Change-Id: I8ae7d5b9a9e89c5579e5526fb29d4da5cd1ab859
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-18 11:40:26 +03:00
Alexandru Croitor
f8af82e3b3 CMake: Fix usage of ccache when no executable was found
Change-Id: Ia9a44234cb074fa5ba2b1dc9ca22a676d1b2d4ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-18 10:40:26 +02:00
Paul Lemire
6a2c89c043 rhi: sanityCheckGraphicsPipeline handle no vertex attributes
It is a valid use case to have a vertex shader with no
vertex attributes. Using gl_VertexID or gl_InstanceID
is enough to generate vertex data out of thin air.

Change-Id: If7689914624a84723923fd2d7aef355bda592e24
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-08-18 07:58:50 +02:00
Sona Kurazyan
af5e8c2e97 Use qsizetype for size in QJsonArray and QJsonObject
Change-Id: I126b7e817f076486910777bb4e3354487ad670cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-18 04:06:04 +02:00
Tor Arne Vestbø
1fc7ca091b macOS: Remove support for surface-backed views
Our deployment target is 10.14, which enables layer-backing by default,
and our layer-backing support nowadays is stable enough that we don't
need to maintain any of the old code paths for compatibility.

The wantsBestResolutionOpenGLSurface property on NSView is only relevant
for surface-backed views, so we no longer need to deal with it.

Change-Id: I8aef4ac99371113d463ac35eee648a8a2fd1ea72
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-08-18 00:35:21 +02:00
Volker Hilsheimer
d1111632e2 Introduce QEvent::isInputEvent
This makes it easier to reliably maintain input-event related states
in widgets, in particluar the state of keyboard modifiers. Instead of
testing for all possible event types, code can just test the flag before
safely static_cast'ing to QInputEvent to access the modifiers.

Simplify the code in QAbstractItemView accordingly.

Task-number: QTBUG-73829
Change-Id: Idc7c08e2f3f1e8844f5c6693c195153038ee6490
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-08-17 21:54:34 +02:00