Commit Graph

55278 Commits

Author SHA1 Message Date
Piotr Srebrny
8761078629 Remove unused variable which causes compiler error
Pick-to: 6.2 6.3
Change-Id: I87348370d10d2047e8fa861d7675bc0cd3db080b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-02-21 18:02:48 +00:00
Kai Köhne
f9880e5c8f Do not warn about qtnamespacemacros.h header in syncqt
Fixes syncqt warning:

  -- Running syncqt for module: 'QtCore'
  QtCore: WARNING: C:/Users/qt/work/qt/qtbase/src/corelib/global/qtnamespacemacros.h does not include QT_BEGIN_NAMESPACE

Change-Id: I8ad8b0b7faf8bc1643103cafcd12cd2990980a0b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-21 15:34:31 +01:00
Michal Klocek
b82061688d Add missing zconf.h
Zlib headers includes also configuration header, this should be also
installed.

This commit amends be2745e478

Fixes: QTBUG-101065
Change-Id: Ide8a59258469fa793966f636ee54f18211ed8fd6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-21 14:52:35 +01:00
Mårten Nordheim
b1d8fb3279 3rdparty: Update double-conversion
The old patch is removed but another was needed to fix a warning from
MSVC about truncation which is taken from
e634f265db5d296bd7a780f9813d6b8573f5bd90 in the master branch.

Since there is no other changes to the double-conversion directory
between 3.2.0 and that change we are essentially using that commit
directly.

Pick-to: 6.3
Fixes: QTBUG-100988
Change-Id: Ia69f39f61ef989907fdf097f897bece0b3af7194
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-02-21 14:52:35 +01:00
Alexandru Croitor
04f49e6881 CMake: Clean up qt_deploy_qt_conf for 6.3
Ensure both versioned and versionless functions
are available.
Document that the first argument should be an absolute path
and check that in the code.
Move the low-level warning to the top, after the TP message.
Use a few more options in the doc snippet.
Mention what the default values are.

Pick-to: 6.3
Fixes: QTBUG-100922
Change-Id: I0d852733e51750f4c8f15721b707cb1d27dfee9a
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-21 14:07:52 +01:00
Alexandru Croitor
2305656a4e CMake: Clean up qt_generate_deploy_app_script for 6.3
Mention in the docs that qt_generate_deploy_app_script does not
currently support cross-build scenarios.

Use the value of QT_DEPLOY_BIN_DIR instead of CMAKE_INSTALL_PREFIX
in the qt_deploy_runtime_dependencies call done by
qt6_generate_deploy_app_script. This matches what we say to do in the
documentation of qt_deploy_runtime_dependencies.

Pick-to: 6.3
Task-number: QTBUG-98545
Fixes: QTBUG-100921
Change-Id: Ie9bfddeaf503d3efe7a73b2e4148bbf0601d693e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-21 14:07:51 +01:00
Joerg Bornemann
95457ba8e7 qmake: Enforce linker response files for WebAssembly on Windows
Set QMAKE_REPONSEFILE_THRESHOLD to 1 in the WebAssembly mkspec to
enforce the usage of linker response files.  This fixes "The command
line is too long." errors when linking user projects that depend on many
libraries, for example projects using QtQuickControls2.

Pick-to: 6.2 6.3
Fixes: QTBUG-100559
Change-Id: I2f03f0756c9f171bc7382940fa0f8079bdb75a00
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-21 12:37:19 +01:00
Joerg Bornemann
1d3b190425 qmake: Fix overlong command lines for static Qt builds on Windows
Linker response files for the MinGW and Unix makefile generators are
controlled by the variable QMAKE_LINK_OBJECT_MAX.  This variable holds a
number.  If the number of object files passed to the linker exceeds this
number, a linker response file containing object file paths is created.

This heuristic is extremely imprecise.  It doesn't take into account the
length of object file names nor the length of $$OBJECTS_DIR.

Also, when using a static Qt, a big part of the linker command line are
libraries.  A relatively small example can fail to link with "The
command line is too long" on Windows, even with the object files being
in a response file.

The MinGW makefile generator already reads the variable
QMAKE_RESPONSEFILE_THRESHOLD for compiler response files.  Re-use this
variable for the linker response file of the Unix and MinGW makefile
generators.

If QMAKE_RESPONSEFILE_THRESHOLD is set, use it to determine whether to
create a response file.  QMAKE_LINK_OBJECT_MAX is then ignored.  The
response file contains objects and libraries.

If QMAKE_RESPONSEFILE_THRESHOLD is not set, use QMAKE_LINK_OBJECT_MAX to
determine whether to create a response file.  The response file contains
only object files.

QMAKE_LINK_OBJECT_SCRIPT is used in both cases to specify a common base
name of all linker response files.

Pick-to: 6.2 6.3
Task-number: QTBUG-100559
Change-Id: I3c78354fa5ebb1a86438ec804679e0ee776c3f49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-02-21 12:37:19 +01:00
Thiago Macieira
5731b83445 tst_qlogging (tst_qmessagehandler): use one line for output and expected
Makes it easier to interpret the output from the test, because of
embedded newlines.

Pick-to: 6.3
Change-Id: Ic15405335d804bdea761fffd16d4f141e09537f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-02-20 23:32:26 -08:00
Thiago Macieira
43a171a7d6 tst_qlogging (tst_qmessagehandler): use QProcessEnvironment
Simplifies the code. And removes the unnecessary quote around the
pattern that was there, for some reason.

Pick-to: 6.3
Change-Id: Ic15405335d804bdea761fffd16d4f135edf6993b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-02-20 23:32:20 -08:00
Thiago Macieira
4be85491e0 QHash: split the x86 AES hash into three separate functions
Instead of performing decisions inside the single aeshash() function, we
have three implementations instead. Those decisions are permanent for
each CPU, so the branch predictor should be pretty good, but hashing is
somewhat performance-sensitive.

We're only adding three of the four possible combinations of AVX512VL
and VAES. Excluded from the implementation are the CPUs that support
AVX512 but not VAES, which are the Skylake-based ones. Those are mostly
found in server CPUs (Intel Xeon Scalable line) as well as top-end
workstations (Intel Core i9), but never made into general desktop and
laptop parts. For those, the performance will remain what it was in Qt
6.3.

VAES is supported in Intel architectures codenamed Sunny Cove and
Gracemont and their successors. That means it's supported in both the E
and P cores of the Intel Alder Lake (12th Generation Core), as well as
future Atom lines. But neither Atoms nor hybrid CPUS have AVX512 (at
least when the E cores are active).

AVX512+VAES is supported for Ice Lake (10th Generation Core), Tiger Lake
(11th) as well as later generation with AVX512 support enabled. Like in
qstring.cpp, we restricted ourselves to 256-bit operations, which don't
cause performance impact and because the 512-bit VAESENC operates on the
fused Ports 0 and 1, so it has the exact same throughput as two 256-bit
VAESENC.

Change-Id: I6fcda969a9e9427198bffffd16cece9c37dbdbd3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-20 16:53:31 -08:00
Thiago Macieira
b313a5ec32 QHash: invert the case that is excluded: use VAES and AVX512VL
It's not worth having both cases, since they run at the same time. The
difference is which CPUs they run for: the non-VAES AVX512 code can run
on the Skylake-based AVX512 CPUs, which aren't a usual target for Qt
(servers and workstations), while the AVX512 and VAES case includes the
Ice Lake and Tiger Lake desktop and laptop CPUs.

This is not a good trade-off, but is an stepping stone for the next
commit.

Change-Id: I6fcda969a9e9427198bffffd16cecbe76e03c884
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-20 16:53:29 -08:00
Thiago Macieira
da1720485e QHash: add support for VAES and AVX512VL
The strategy is explained in the aeshash() function. I've chosen to
exclude the case of simultaneous VAES and AVX512VL support for len <= 32
case. Instead, the aeshash128_lt32_avx256() does not attempt to use
VAES, because we wouldn't be getting sufficient benefit at the cost of
code expansion (AESENC can dispatch 2 per cycle). See simulation at
https://analysis.godbolt.org/z/8Y54PMWGj.

The code is slightly convoluted with unexpected indentation so most of
the important lines in the algorithm aren't changed by this commit.

Change-Id: I6fcda969a9e9427198bffffd16ceca30f5e924b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 16:53:27 -08:00
Thiago Macieira
e5373a043d CMake: remove obsolete #FIXME
Also confused Qt Creator.

Pick-to: 6.2 6.3
Change-Id: Ic15405335d804bdea761fffd16d4f209df4311a8
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-20 16:52:50 -08:00
Lorn Potter
5a7b836ca7 wasm: make input callback returns consistent
Change-Id: I43d9db1723d85eef69cfa2e51da4a6a640e8b3c5
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-02-20 22:28:24 +00:00
Mårten Nordheim
db5b8bbea3 Http2: Fix redirect-handling
The redirect handling for http2 was a little simple. E.g. not handling
relative URLs.
Fix this using the redirect response parsing function which the http1
protocol handler already uses.

Fixes: QTBUG-100651
Pick-to: 6.3 6.2 5.15
Change-Id: Ic0cec4cacc92707e7a7fde1f4665f80995a6057e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-02-20 22:47:25 +01:00
Marc Mutz
ef6c4dfb1c QStringConverter/Encoder/Decoder: make move noexcept
The State state data member had non-noexcept move-SMFs, which were
inherited by the move-SMFs of QStringConverter, QStringEncoder and
QStringDecoder.

To fix, because it is called in the move-assignment operator, we need
to mark State::clear() as noexcept, and, since that can perform an
indirect call through clearFn, require the clearFn to be noexcept,
too.

The only users of clearFn were in Qt5Compat; a separate fix should
have been merged there by the time this lands.

Change-Id: Ibe8147970886526b6a479960050e108607b63874
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 20:57:46 +01:00
Marc Mutz
29b18a0179 QSettings: overload value() instead of using a default argument
... of non-trivial type, which needs to be constructed every time the
function is called, no matter whether the user supplies one or not.

Effects on Linux AMD64 O2 C++20 tst_qsettings builds, as an example
heavy-duty QSettings::value() user:

GCC 11.2 libstdc++ (TEXT -= 4.6%):

     text    data     bss     dec     hex filename
   662317   10952    2824  676093   a50fd tst_qsettings-00-baseline
   631849   10960    2824  645633   9da01 tst_qsettings-01-qvariant

Clang 10.0.0 libc++ (TEXT -= 2.8%)

     text    data     bss     dec     hex filename
   808448   10616    2832  821896   c8a88 tst_qsettings-00-baseline
   785890   10624    2832  799346   c3272 tst_qsettings-01-qvariant

Pick-to: 6.3
Task-number: QTBUG-98117
Change-Id: I7366f063e3ec34c040fd35ffd274e8ed5a722132
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-20 16:22:50 +01:00
Alexander Neumann
d49f5752a5 Fix QMetaType::typeName returning wrong result for clang-cl
Pick-to: 6.2 6.3
Change-Id: I94fa1d56d98b8caae514b37fbf6432985195d827
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 10:33:33 +00:00
Volker Hilsheimer
2d935dc7f9 Document change to style sheet selectors for enum properties
The change is presumably an unintentional side effect of QVariant and
QMetaType system changes in Qt 6, but it arguably is a good change.

Document it in the porting guide, while evaluating whether (and figure
out how) we want to support integer values as well.

Pick-to: 6.3 6.2
Task-number: QTBUG-99642
Change-Id: Id1589c594bcdc2afe5c4fd0e47a158cd5e03e52f
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2022-02-20 11:21:58 +01:00
Marc Mutz
d1c1b30f20 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:06:29 +00:00
Marc Mutz
2edae10fb4 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:04:59 +00:00
Marc Mutz
ba05a53746 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:03:38 +00:00
Marc Mutz
4ec7265991 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:02:27 +00:00
Marc Mutz
22eeb36f90 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:01:26 +00:00
Marc Mutz
9fa71c246d QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 01:00:35 +00:00
Marc Mutz
abedccb94b QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 00:59:55 +00:00
Marc Mutz
57f0baa58d QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 00:59:24 +00:00
Marc Mutz
d163cb8287 QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 00:59:03 +00:00
Marc Mutz
955106c4fb QStringConverter: make name matching locale-independent
The existing name lookup code used C's toupper() function for
case-insensitive comparison. However, that function's result depends
on the current locale.

Since the matcher is supposed to match the likes of "iso-8859-1" and
"latin-1", matching may fail in locales, such as Turkish, where
toupper(i) is İ (or i, if the former isn't representable in the current
charset), but toupper(I) remains I, causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Pick-to: 6.3 6.2
Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-20 00:58:52 +00:00
Thiago Macieira
b2298b7e94 qsimd_p.h: let the generator script generate the ARCH target strings
__attribute__((target("arch=xxxx"))) does not work because the compilers
(GCC at least) don't test the CPU features that they are targeting, so
we keep getting "inline failed" compiler errors.

GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90129

Upstream patch: https://github.com/opendcdiag/opendcdiag/pull/59

Change-Id: I6fcda969a9e9427198bffffd16cea09fda4406d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:21 -08:00
Thiago Macieira
8b78439980 qsimd_p.h: add x86-64-v4
Change-Id: Ib42b3adc93bf4d43bd55fffd16c1106092205f0d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:18 -08:00
Thiago Macieira
ad65bbe4c0 qsimd_p.h: disallow building with just -mavx2 instead of full x86-64-v3
It's probably a user mistake that they didn't know what they really
wanted. Since no processor that supports AVX2 fails to support the rest
of x86-64-v3, we should enable all of that so we can make use of its
features. Notably, we may want to use FMA at some point in QtGui, and
the compiler will likely use BMI, BMI2, and LZCNT on its own (see
qnumeric.h).

Compiling with -mavx2 will produce GCC these errors:

 qsimd_p.h:266:8: error: #error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
 qsimd_p.h:263:49: error: ‘__BMI__’ was not declared in this scope
 qsimd_p.h:263:59: error: ‘__BMI2__’ was not declared in this scope
 qsimd_p.h:263:70: error: ‘__F16C__’ was not declared in this scope
 qsimd_p.h:263:81: error: ‘__FMA__’ was not declared in this scope
 qsimd_p.h:263:91: error: ‘__LZCNT__’ was not declared in this scope; did you mea

Change-Id: Ib42b3adc93bf4d43bd55fffd16c10f8b6a775f3f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:16 -08:00
Thiago Macieira
5f7e02efb8 qsimd_p.h: Restore compatibility with C code
The qCpuHasFeature() macro doesn't work in C mode in x86 because it
tries to use enums only available in C++ mode, but the qCpuFeatures()
function does. You can write:

  if ((qCompilerCpuFeatures & cpu_feature_avx2) ||
      (qCpuFeatures() & cpu_feature_avx2))

In C code and this will compile.

Change-Id: Ic15405335d804bdea761fffd16d50dc4f17f572e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:15 -08:00
Thiago Macieira
ff63a38bb8 qsimd_p.h: group the two HWRNG-related functions
Change-Id: Ic15405335d804bdea761fffd16d50c62ebdf6c0d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:13 -08:00
Thiago Macieira
ec39010390 qsimd_p.h: move macros up
Change-Id: Ic15405335d804bdea761fffd16d50c5a18275b23
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:11 -08:00
Thiago Macieira
3cccacd624 qglobal_p.h: move QT_SUPPORTS_INIT_PRIORITY to outside the C++ section
Change-Id: Ic15405335d804bdea761fffd16d50d9c5fc5e237
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:09 -08:00
Thiago Macieira
20575393f4 qtnamespacemacros.h: make Q_MANGLE_NAMESPACE() available in C mode
Pretty sure that's what the macro was for anyway.

Change-Id: Ic15405335d804bdea761fffd16d50d94b95192db
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:08 -08:00
Andreas Buhr
1ee1e4f6ac QAbstractItemModel: make naming of arguments consistent
The signals rowsAboutToBeMoved/rowsMoved have the same arguments,
but use different argument names. This patch aligns the naming,
making it consistent. Same for columnsAboutToBeMoved/columnsMoved.

Change-Id: I1cefe54319e569b8d57f6579ae9d5c3e33b66dc2
Reviewed-by: David Faure <david.faure@kdab.com>
2022-02-19 16:32:57 +01:00
Marc Mutz
0ef4e6d4bf Use QtMiscUtils::toAsciiLower() around the code
... instead of self-rolled versions in at least three TUs.

QByteArray's asciiLower() cannot be completely removed, yet, because
it's used for indirect calls.

Change-Id: Icf4e7605184f0a1157967c78cbd7632b283c4a9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-19 07:29:37 +01:00
Marc Mutz
0f52ec8d52 QByteArray: Extract Function QtMiscUtils::caseCompareAscii()
Change-Id: Id9c385f4df4f33792738cd134fabb9cc03cab809
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-19 02:09:35 +01:00
Michal Klocek
be2745e478 Install 3rdparty headers for static builds
For static builds we need 3rdparty headers to be installed.
Leaf modules like qtwebengine needs 3rdparty libs and header for
zlib, freetype, harfbuzz, png, jpeg. Without those the Chromium bundled
versions are used, however it might end up badly if qt has already
bundled one.

Introduce new header only modules with additional arguments for
qt_internal_add_module:

 * EXTERNAL_HEADERS to pick exactly which headers are public
 * EXTERNAL_HEADERS_DIR to include whole directory preserving the
   files directory structure

Fix qtsync so it keep directory structure for all non-qt modules when
syncing headers and do not generate warnings for headers files.

Task-number: QTBUG-87154
Task-number: QTBUG-88614
Change-Id: If1c27bf8608791cd4e0a21839d6316a445a96e9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-19 01:52:32 +01:00
Allan Sandfeld Jensen
6944b4df7b Revert "Correct haswell function target for clang"
This reverts commit 1cc0494f7d.

Reason for revert: Not a fix, but a break

Pick-to: 6.3 6.2
Change-Id: Ie41d8870dbd52f87059f6bad2335e272409c3046
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-19 00:52:32 +00:00
Thiago Macieira
6323ccfa73 qsimd: Remove QT_COMPILER_SUPPORTS_SIMD_ALWAYS
All[*] compilers support it, always. The last to not support it was GCC
4.8, which we don't support in Qt 6.

[*] Anecdotally, clang-cl doesn't but clang-cl isn't supported and that
would be an upstream problem: clang-cl developers must find a solution
that either matches Clang or cl.exe.

Change-Id: I54f205f6b7314351b078fffd16d0a5ed5b7afae5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-18 15:46:41 -08:00
Thiago Macieira
181d7ea053 QJsonValueRef: add non-const operator[]
These can't be done before Qt 7, unlike their CBOR counterparts, for
binary-compatibility reasons: in 6.x, QJson{Const,}ValueRef must hold a
pointer to an extant QJsonArray or QJsonObject. So this is implemented
for Qt 7 / bootstrap only for now.

Unfortunately, they can't be tested either.

Change-Id: I54f205f6b7314351b078fffd16d067d735c4fe2b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-02-18 15:46:41 -08:00
Thiago Macieira
b852584556 qsimd: update the generator script from OpenDCDiag
I'd been making changes to that and improving it for the past 2 years
without bringing it back into Qt.

The list of features is mostly the same, except:
- removed TSX features
- removed features specific to Xeon Phi processors
- added CET and AVX512FP16 features
- added the bit for hybrid CPU detection

See matching update at https://github.com/opendcdiag/opendcdiag/pull/49

Change-Id: I6fcda969a9e9427198bffffd16ce860b5a38aece
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-18 15:46:41 -08:00
Friedemann Kleint
05428d9b97 Polish tst_QAbstractSpinBox
Introduce modern C++, use static methods, nullptr, auto.

Pick-to: 6.3
Change-Id: I9025c94c063045329ae1a25b387cb2135d588b22
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-18 22:32:18 +01:00
Marc Mutz
0e60e4bf19 QDesktopServices: make QOpenUrlHandlerRegistry a non-QObject
It seems to have been a QObject solely for its single slot.

But since Qt 5, slots need no longer be defined on QObjects, so we can
remove the inheritance from QObject now. We still need a QObject as
the context object in connect(), but that can be just be an aggregated
naked QObject.

Saves 26 relocations, ~1.5KiB in TEXT and ~0.3KiB in DATA on optimized
GCC 11.2 Linux AMD64 C++20 builds.

Pick-to: 6.3 6.2
Change-Id: Ic45a8e892ec2bd5de5de8fbd32ec7a167c501803
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-18 20:29:37 +01:00
Friedemann Kleint
1af068332b Fix test to pass with QT_FORCE_ASSERTS
Add QT_FORCE_ASSERTS to condition with standard comment.

Pick-to: 6.3 6.2
Change-Id: If493c7cdea8164f010228a755915a211c1cf1b39
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-18 18:55:38 +01:00
Volker Hilsheimer
72e1fc7c0b Simplify failure detection logic in QEventDispatcher test
The test always fails when either the Xcb or UNIX, one of the Windows
event dispatchers is used. So only test for the event dispatcher name,
which then covers all platforms, including QNX and INTEGRITY (which
use the UNIX event dispatcher).

Pick-to: 6.3 6.2
Change-Id: I2e315831b53f823c5496ad0319319df78f064cc1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
2022-02-18 18:55:38 +01:00