Commit Graph

44592 Commits

Author SHA1 Message Date
Alexandru Croitor
3c7c60e322 cmake: Regenerate projects
Change-Id: I0cd4f34b0df0227789805f30f474ff6aa275078f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-16 17:58:00 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Leander Beernaert
1b7008a3d7 CMake: Fix Windows VM Test Runs
Simplify the handling of simd specific sources. The previous
implementation was causing simd instructions to bleed into the main
library.

The tests were failing because the avx instruction were leaking into
Qt6Gui due to the previous problem. This in turn caused any test which
required Qt6Gui code run to crash since it is not possible to run avx
instruction in the VMs.

This patch also disables PCH for the simd sources as they result in
warnings related related to using PCH header not compiled for the
architecture in question. The latter can cause the build to fail in
conjunction with warnings as errors.

Change-Id: I1be98f2f5e967f33793d6a2e6134a24ef1709566
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-16 17:30:38 +01:00
Fabian Kosmale
e464e1eb8e Introduce always constexpr variants of qCountTrailingZeroBits
qt_builtin_ctz is unfortunately not constexpr on MSVC, so the whole
function cannot be used in constexpr contexts, unless v is exactly 0. As we
don't have std::is_costant_evaluated until C++20, we need to introduce a new
helper function, which always works in constexpr contexts.

Change-Id: I36290acb61e430d6bdb3da112a9b2263be4b9fbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-16 08:21:49 +01:00
Lars Knoll
cb8eb0f86c Get rid of QRegExp usage in the cocoa plugin
Change-Id: I9789e1637a17809082458e946fa7c49ab9269537
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-15 15:06:40 +01:00
Lars Knoll
fed4d6d78d Fix QNetworkAccessCache after QHash stability semantics change
The data structure relies on stable nodes in QHash, something that
is not guaranteed in Qt 6 anymore.

Change-Id: I9077ed404ee922893099f5eaae76d2dcea414090
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-15 15:05:26 +01:00
Lars Knoll
e87768a880 Use qsizetype for size related methods in QVarlengthArray
Change-Id: Ib94b9a4e6e17da21f592e71a36fd1b97d42dfe62
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-14 10:36:56 +01:00
Lars Knoll
f9a154e07f Use qsizetype for size related methods in QMap
This allows QMap to hold more than 2^31 entries on 64 bit systeems.

Change-Id: Ia6abd3441f9bc0c7e1a01b78726b5c32209542fa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-14 10:36:51 +01:00
Lars Knoll
d013aa16ef Extend QContiguousCache to use qsizetype for size and indices
Allow for more than 2^31 items and large offsets.

Change-Id: I42f7bf20ce0e4af43dbb2e2083abf0e232e68282
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-14 10:36:47 +01:00
Lars Knoll
bf7debf658 Add move semantics to QContiguousCache
Provide move semantics for QContiguousCache. Do further cleanup of the
code and avoid special casing for complex typeinfo where it won't
make a difference anyway.

Change-Id: I9bd261aec21be7a050e04f5b3a1f0b8e1d94c064
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-14 10:36:42 +01:00
Lars Knoll
f75160774a Cleanup code in QContiguousCache
Remove the union being used to hold the d-pointer, as accessing both
members of the union on the same data is technically undefined behavior.

Change-Id: Ia5a063d97538222575a47e9462c0675acdf32aef
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-14 10:36:37 +01:00
Alexandru Croitor
a02ec931b6 CMake: Pass --verbose flag to ninja
To allow seeing the exact compiler flags when build in Coin.
We do the same for qmake builds.

Change-Id: I8c43f35b95d722d914aaeaa8860720a3a0578737
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-13 19:14:59 +01:00
Alexandru Croitor
6e286247e8 CMake: Don't make a private module depend 1kk times on the public one
The exported INTERFACE_LINK_LIBRARIES property now looks a lot more
sane.

Change-Id: I093fcb242607023dd0b103298562b299cb803028
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-13 19:14:55 +01:00
Giuseppe D'Angelo
2537d04785 QRegularExpression: inline some compatibility calls
The functions take QStringView now. The ones taking QString can
be implemented inline (BC break). Drive-by change, use
qToStringViewIgnoringNull.

Change-Id: Ia3089c574446418e5ab93e08e21869ef19fbfbfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-13 15:23:56 +01:00
Giuseppe D'Angelo
75514103e2 Remove an outdated comment
QRandomGenerator is now used to seed QHash, so the comment
is wrong.

Change-Id: Ic50fe95ea4169b55290cc758f5aebfbb0a3ea085
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-13 15:23:56 +01:00
Tor Arne Vestbø
3a2fa3fec5 cmake: Add default Info.plist for macOS with some important keys
The default Info.plist shipped with CMake lacks an NSPrincipalClass
entry, which is crucial for making macOS apps run in full resolution
on retina screens.

We make sure the file is only picked up on macOS, not iOS and friends,
since those platforms require another principal class. If needed we can
extract the value out as a CMake variable and use the same file for all
Apple platforms. Doing so would assume all keys are single-platform
only, so if that's not the case we need platform-specific files.

We should probably extract the package type out as a variable too,
so that the file can be used for both apps, plugins, and frameworks,
but doing so requires setting up that variable somewhere based on
the target type, which CMake doesn't allow in an easy way.

The file itself is based on the file CMake ships, combined with
keys inherited from Qt's existing plist templates for qmake, and
adjusted to match what Xcode generates by default these days.

Change-Id: I3f5109e5fff63cdbd109a99d4008948d4bd2102b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-13 15:23:56 +01:00
Morten Johan Sørvig
951d490750 High-DPI: Enable AA_UseHighDpiPixmaps by default
The effect of this is that QIcon::pixmap() will/may
return a pixmap larger than the requested size (with
an appropriate devicePixelRatio set), suitable for
high-dpi displays.

Many use cases, such as painting the image with QPainter,
will be unaffected by this change. User code which e.g.
iterate over image pixels may have to be updated.

Change-Id: I63e867cc1e3f2a0b5cad92e1ffab4fe4de33ae19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-13 16:23:56 +02:00
Tor Arne Vestbø
17be43c58e cmake: Disable GL deprecations on Apple platforms
Change-Id: I87b98ae68d996868cefaaf578722ac24be745145
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 17:05:10 +01:00
Leander Beernaert
a5ec9bea63 CMake: pro2cmake handle ${QT_SOURCE_TREE} for include statements
Replace ${QT_SOURCE_TREE} with top level project directory when
encountered in include statements.

This is required to parse tests/auto/testlib/selftests/test/test.pro.

Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 16:30:46 +01:00
Alexandru Croitor
d4018dac8b CMake: Reformat the python scripts using black
Change-Id: I1e2eba46eb7c9dfefd267be91790be7898634c3a
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:53 +01:00
Alexandru Croitor
60a93a15b1 CMake: Fix incorrect argument in QtBuildInternalsAndroid
Uncovered while building qtdeclarative.

Change-Id: If1a36f2640a3a5d765e7ca74b0ba1d39ef2a18f0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:46 +01:00
Alexandru Croitor
a1867333d4 CMake: Install the QtBuildInternalsAndroid.cmake fille
It's needed when building qtdeclarative.

Needs to be copy_or_install to support non-prefix builds as well.

Change-Id: Ied59f6a1f8403be3721a0ad46f5a3b2f569028ca
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:42 +01:00
Alexandru Croitor
8facb31fde CMake: Regenerate tests projects
Change-Id: I559bf2c82d83fac9bd3c52a331d99e1e83bc3f87
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:39 +01:00
Alexandru Croitor
aa77fbca69 CMake: Don't build tests and examples by default on Android and iOS
Change-Id: Ia31733e2cadfb52d11426c40f3543bedc48342c4
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:35 +01:00
Alexandru Croitor
5804473578 CMake: Propagate minimum required C++ standard to consumers of Qt
Aka the version of C++ that needs to be supported when compiling
applications that use Qt headers (C++17 at the moment).

Change-Id: I64dec297e8329f31b1d9864f216a95782049ed06
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:32 +01:00
Alexandru Croitor
d2419b0d8c CMake: pro2cmake: Handle LIBS_SUFFIX define correctly
Matches the LIBS_SUFFIX define we use in Android conditions
and replaces it with a sane amount of escaped characters.

Change-Id: I7d870f992c70b105dd80b6fa94f87d3fa5644006
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:29 +01:00
Alexandru Croitor
14546d1816 rcc: Teach rcc the --no-zstd option
It is needed when cross-building Qt using CMake, where the zstd
feature might have different values between the host and target,
in which case the build system tells rcc not to use zstd when
the feature is disabled.

Amends d20c980576

Change-Id: I9dc55b59b1be5272b79aa5f1e2daf2b516a157d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-12 11:41:26 +01:00
Tor Arne Vestbø
39ad96033c Fix spelling mistakes
Change-Id: I389727ce9b8d3ef2a54156b682ef5aeccb39ebd2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-11 17:51:15 +01:00
Qt Forward Merge Bot
3d315860cd Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-11 15:39:56 +01:00
Qt Forward Merge Bot
865afac250 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
2020-03-11 15:34:21 +01:00
Tor Arne Vestbø
cd80f347cf Update instructions for developer builds with CMake
Change-Id: I101a4b12bae393fa188bb2633cc2d74170adbb4c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-11 15:31:40 +01:00
Leander Beernaert
c4763e397d CMake: Fix mkspec install commands
If there is a file present in the globbed mkspecs_subdirs file list we
run into an invalid argument error for the install(DIRECTORY) command.

Change-Id: I0fe61a8f0a863854f55cf62a87417bcaec1d2c29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-11 14:47:04 +01:00
Leander Beernaert
3c85440b16 CMake: Build standalone tests out of source in Coin
Due to a bug in upstream CMake regarding relative paths being encoded
into the build.ninja file when performing in source builds, we need to
build the tests in a standalone directory outside of the source
directory.

Failing to do so will cause the source directory for the test to be
incorrect which can cause tests to fails and never read the
BLACKLIST.txt file. See the mentioned issue for details.

Task-number: QTBUG-82820
Change-Id: Ie5c178a92369d6b9decff625bd9641e53088a9fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-11 13:46:51 +00:00
Vitaly Fanaskov
c977e74afd QtConcurrent::run: accept more then five function's arguments
[ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run
has the following signatures: run(Function &&f, Args &&...args) and
run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member
pointer, the first argument of args should be an object for which that
member is defined (or a reference, or a pointer to it). See the
documentation for more details.

Fixes: QTBUG-82383
Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-03-11 14:46:25 +01:00
Topi Reinio
52de905d0e Doc: Fix documentation for class qfloat16
This class has documented member functions, but only the related
\headerfile was documented. The class documentation itself was
omitted with the \dontdocument command.

Replace the \headerfile with a \class command, and move the global
functions to be related to the class itself. Keep the title as a
\keyword to avoid breaking any external links. The new class page
will inherit the .html file name of the header page, so we're safe
in that regard as well.

Fixes: QTBUG-82800
Change-Id: Id51539b45e0642d91b304a37f95461ca3d6c9841
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-10 17:51:56 +00:00
Simon Hausmann
01bacdf7ab Fix typo
Change-Id: I4923efb537c1d1b5778bf97955dbf247eaa6220a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-10 18:50:01 +01:00
Laszlo Agocs
67edae9a08 QVulkanWindow: Fix setQueueCreateInfoModifier signature
...per API review.

Change-Id: I4a5a1cc895eac32f21f8a830507b841318509992
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-03-10 17:06:07 +01:00
Cristian Adam
d4207cb1a9 Mimetypes: Build fix for Android builds on Windows
Due to Android's multi-abi the build will fail due to concurrent
access:

cmd /c C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\generate.bat C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\packages\freedesktop.org.xml > .rcc\qmimeprovider_database.cpp
The process cannot access the file because it is being used by another process.

Change-Id: I647e0a6d8aa03cf116b08a1dce6e61e8882661f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 17:05:37 +01:00
Simon Hausmann
4109d6e166 Small typo fix
Change-Id: Ie26dce967af59f140ebf03debe06aba19bd6a8e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-03-10 16:38:23 +01:00
Fabian Kosmale
ade4e5265a Remove template leftover
Amends 33cd680ddb, which removed the
Qt5CompatiblityHook class. However, the template line above it was not
removed, and now applied to isBuiltinType. As that function should not
be a template, we remove it now.

Change-Id: If8e276daebce5480b59d9c21b049818f9a46ec98
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-03-10 16:37:49 +01:00
Mitch Curtis
45695444ed Fix warning in qmetaobjectbuilder.cpp
src\corelib\kernel\qmetaobjectbuilder.cpp(1489): warning C4267: '+=':
conversion from 'size_t' to 'int', possible loss of data

Change-Id: I9cf9bdcb62b796eb8d3f3c633640b648cb11b39f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-03-10 15:17:24 +01:00
Eskil Abrahamsen Blomfeldt
761197e9d2 Fix distribution of font properties in QTextFormat
The area reserved for font properties was too small for
the properties we needed, and as a result font properties
were added outside of the area and special-cased (in the case
of FontLetterSpacingType) or ignored (in the case of
FontStretch) by conditions that check if the property is
within the designated area.

We reorganize the enum values now that we can, and allocate
some more space for the font properties area.

Fixes: QTBUG-65345
Change-Id: I8121ff7f72102d8022c6a6d2f8ed9c35dcdbb321
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-10 10:58:03 +01:00
Laszlo Agocs
3dd13d4075 rhi: d3d11: Honor resource/sampler slot limits
Show a warning but allow applications to survive by not attempting
to call VS/PS/CSSetWhatever() with an invalid number of resources.

Relevant for samplers in particular, where the limit is 16. Qt Quick 3D
exhibits problems with this when using custom materials combined with
shadow mapping, and while this is not a solution to the problem there,
at least the problem is now clearly indicated instead of crashing.

Task-number: QTBUG-82719
Change-Id: I83914b7648001fa421ed1cf07a7b7444e0ef8fc0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-03-10 09:38:03 +01:00
Mårten Nordheim
19a76200ea QDataStream: keep brace delimiters inside #if-scopes
Because it looks odd.

Change-Id: Ic272ae7b1b5a3e0a70884caa683ccbdd3a61ff6a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-03-10 09:29:12 +01:00
Mårten Nordheim
d340cc1512 Schannel: Fix readBufferMaxSize impl with incomplete data optimization
Following the incomplete data guesstimation optimization the
tst_QSslSocket::readBufferMaxSize test would fail due to it waiting for
16K, but the readBufferMaxSize was 10 bytes.

Amends 559b563d71

Change-Id: I5d17fac24e73c1305161aff744710b4c5b0b457a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-10 09:28:56 +01:00
Mårten Nordheim
d52a553754 Bearer management deprecation cleanup
For QNAM:
Deprecate the to-be-unused enum and mark the property deprecated in docs

For bearermanagement:
Add a warning on the bearermanagement documentation page that it is
deprecated.

Change-Id: I2cbe12ddec444d9f704601f07f3a7c9b70dc4f3c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-10 09:07:18 +01:00
Friedemann Kleint
9aa2932701 Polish the Mandelbrot Example
Fix warnings about float constants and comparison.
Use member or constructor initialization.
Introduce some const for clarity.
Use Qt_CONFIG.

Task-number: QTBUG-81254
Change-Id: I71a6ebfba397c0f8e1dd2e61167233c8e5c137af
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-10 08:15:15 +01:00
Alexandru Croitor
1ef8470c80 CMake: Update the README regarding the minimum cmake version required
The minimum required CMake version to build Qt on any platform is
3.16.0 at the moment. That's the first version that ships the
implementation-specific AutogenInfo.json files, which we parse
to implement the Qt moc --collect-json functionality.

Change-Id: I6160cd74fa228aa330f4c1e512ffb766afc5f8a3
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 07:33:37 +01:00
Alexandru Croitor
f46c11989a CMake: pro2cmake: Fix opengles condition substitution
Missing parenthesis caused wrong condiiton simplification in scopes.

Change-Id: Ia2a1a97f4da36b185631a2a3c7855ae01595b0f7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 07:33:27 +01:00