Commit Graph

51352 Commits

Author SHA1 Message Date
Joerg Bornemann
74310cb36f Android: Choose latest version when autodetecting the NDK
Before, we relied on the deprecated "ndk-bundle" subdirectory being
present in the SDK root. Now, we choose the NDK with the latest version
in the SDK's ndk subdirectory.

Pick-to: 6.1
Fixes: QTBUG-87579
Change-Id: I37a9e03184f4518b4074d55375af08209591de94
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-04-23 16:50:55 +02:00
Joerg Bornemann
ff7f32f26b Android: Do not auto-detect NDK if ANDROID_NDK_ROOT is set
When ANDROID_NDK_ROOT is explicitly set by the user, there's no point in
detecting the NDK. The detection had no effect, because the already set
ANDROID_NDK_ROOT variable would not be overwritten by our set call.

Fix the condition of the check: There is no CMAKE_ANDROID_NDK_ROOT
variable.

Pick-to: 6.1
Change-Id: I8f0d4f2a1a67445f67a79c7d2d0932099828b05e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-23 16:50:55 +02:00
Alexandru Croitor
393f45de90 CMake: Allow enabling Apple app extension API in other repos
It's needed in qtconnectivity, but currently the
qt_disable_apple_app_extension_api_only function is defined in
QtInternalTargets.cmake which is loaded only in qtbase.

Move the function to cmake/QtTargetHelpers.cmake.

Amends e189126f1a

Pick-to: 6.1
Change-Id: Ia2470e48a91385239394368780f5bbb223000113
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-23 16:50:55 +02:00
Edward Welbourne
7c65935810 Make zone-name part of date-time parsing a little faster
QDateTimeParser::findTimeZoneName()'s invalidZoneNameCharacter() check
was using QLatin1String::contains(QChar), which converts the Latin-1
string to UTF-16 on each call, despite having pre-checked that the
QChar is ASCII. So use memchr() instead.

Change-Id: I011e2b4ba3be20711fc5005f62e4f9f6a392dd16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-23 16:50:54 +02:00
Andreas Buhr
c36f18b449 Improve error message in bindable property test
Change-Id: I96a9f36657b49814b540c0b909c4642422d49b35
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2021-04-23 16:50:54 +02:00
Friedemann Kleint
2393a40ccd Rewrite the fetchmore example
- Start in root folder so that large directories (/bin/, Windows)
  are easily reachable
- Remove the line edit and navigate by double clicking instead
  since this is more in line with expectations
- Use a QPlainTextEdit for logging
- Make the log message more informative
- Add icons

Change-Id: Ia3cd7fc143efef80772923291f0b711913aa47be
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-23 12:43:28 +00:00
Jarek Kobus
43d6778ce5 Fix a build when QT_DISABLE_DEPRECATED_BEFORE is set to 6.1.0
Amends: ff8d757e22

Task-number: QTBUG-93033
Pick-to: 6.1 6.1.0
Change-Id: I67b7bda0f63fdb3c4e1864e38c872b96df90a8ae
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-04-23 14:43:28 +02:00
Allan Sandfeld Jensen
ffb5635c1a Do not access internal allThreads data unlocked
Pick-to: 6.1 6.0 5.15
Change-Id: I54eb67571fff07ffdbf9d2b77c96bb85e3fae5e0
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-23 14:43:28 +02:00
Assam Boudjelthia
f4e23bf3de Fix QJniObject templates implementations
Define the template calls in the header to allow for better type
handling and checking with constexpr and avoid overuse of macros.
Depending on the type provided in the QJniObject's call, the
signatures and the correct JNI function variant is used.
If a type is not supported a static_assert throws a compiler error.

Pick-to: 6.1 6.1.0
Change-Id: I8a4d3ce85e1ff76ef385633f2a68511fffd12e55
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-04-23 15:43:28 +03:00
Assam Boudjelthia
2666f3e37d Fix build error when using -qtnamespace flag
Error: qtbase/src/corelib/io/qstandardpaths_android.cpp:49:17: error: no
namespace named 'QNativeInterface'; did you mean
'XXXXX::QNativeInterface'?

Pick-to: 6.1
Change-Id: I0f9fbf1879f72683d31ee0e8603b9bb26c31ae3c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-23 14:31:04 +03:00
Martin Storsjö
236ae73ed8 Lowercase system includes and lib names for Windows, fix cross compiling
When cross compiling from a case sensitive file system, casing
matters, and mingw headers and import libraries consistently
use lowercase.

This was uncovered by d385158d5213ef568b7629e2aa4a818016bbffac;
prior to that, the schannel TLS plugin didn't end up built (at
least when cross compiling).

Fix other similar cases that can be found by grepping the repo.

Change-Id: Ia696e17b7aaa979d7b7f5b0801383f338a8b585b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-04-23 14:31:04 +03:00
Cristian Adam
0a1256a52d CMake: Allow usage of QtStandaloneTestTemplateProject as package component
Currently in order to compile a Qt6 test standalone one needs to use
the qt-cmake-standalone-test script which will load the
Qt6BuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt project
with the current test source directory to create a complete CMake project.

This commit will allow a test to have these lines at top:

cmake_minimum_required(VERSION 3.16)

if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
    project(a_qt_test LANGUAGES C CXX ASM)
    find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST)
endif()

and be standalone and work with any IDE capable of loading CMake projects.

Fixes: QTCREATORBUG-25389
Pick-to: 6.1
Change-Id: If3f878b7e560a8bfbb604a8f1aa30b7962742e66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-23 13:31:04 +02:00
Andy Shaw
66acee69a1 SQLite: Handle tables and fields with a dot in the name correctly
Fixes: QTBUG-91885
Pick-to: 6.1 6.0 5.15
Change-Id: Iba76bb50266dd4fb5f50e4ea1549d1d2bb6e3431
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-23 10:46:58 +02:00
Volker Hilsheimer
83eca9a087 Mark obsolete QMessageBox members as deprecated
Those overloads have been documented as obsolete, but never been deprecated.
Add the deprecation macros to trigger warnings as of Qt 6.2.

The overloads taking a single StandardButton should not be deprecated until
Qt 7, as otherwise porting from old to new API will require an unnecessary
cast to StandardButtons for calls with only a single enum value.

The unit test explicitly tests the deprecated members, so disable warnings
there.

Fixes: QTBUG-92483
Change-Id: I283ddce4681eafda2378607f999946e56bbb777e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-04-23 08:52:01 +02:00
Volker Hilsheimer
00988adcf9 Port example away from deprecated QTextCharFormat API
Change-Id: I1d62f14f9e64f14809bdced4e5d906979034cbdc
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-04-23 08:52:01 +02:00
Fan PengCheng
4dc7102c84 Avoid adding null-objects to the icon cache
When we can't get the icon for the first time, we would use the data
in the cache later, and we will never get the new icon when the system
theme is updated while the application is running.

Pick-to: 6.1
Change-Id: I839ad9983918561a1dc6bc842f85477bba53f64a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-23 03:49:28 +00:00
Thiago Macieira
3458dd2d47 QDuplicateTracker: store the current seed in the hasher
It's allowed to change asynchronously by another thread.

Pick-to: 6.1 6.0 5.15
Change-Id: I6cdea00671e8479b9c50fffd167836a08a42cc1d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-04-22 22:55:12 +00:00
Timur Pocheptsov
d385158d52 Move plugin code from QtNetwork to qtbase/plugins
All TLS (and non-TLS) backends that QSsl classes rely
on are now in plugins/tls (as openssl, securetransport,
schannel and certonly plugins).

For now, I have to disable some tests that were using OpenSSL
calls - this to be refactored/re-thought. These include:
qsslsocket auto-test (test-case where we work with private keys),
qsslkey auto-test (similar to qsslsocket - test-case working with
keys using OpenSSL calls).
qasn1element moved to plugins too, so its auto-test have to
be re-thought.
Since now we can have more than one working TLS-backend on a given
platform, the presence of OpenSSL also means I force this backend
as active before running tests, to make sure features implemented
only in OpenSSL-backend are tested.
OCSP auto test is disabled for now, since it heavily relies on
OpenSSL symbols (to be refactored).

[ChangeLog][QtNetwork][QSslSocket] QSslSocket by default prefers 'openssl' backend
if it is available.

[ChangeLog][QtNetwork][QSslSocket] TLS-backends are not mutually exclusive anymore,
depending on a platform, more than one TLS backend can be built. E.g., configuring
Qt with -openssl does not prevent SecureTransport or Schannel plugin from being
built.

Fixes: QTBUG-91928
Change-Id: I4c05e32f10179066bee3a518bdfdd6c4b15320c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-04-22 22:51:54 +02:00
Jonas Karlsson
6b1a7341fe Fix infinite loop in qmake option parsing
If calling 'qmake -qtconf file' an infinite loop occurs.

Bug introduced in 661b586a69

Pick-to: 6.1 6.1.0 6.0
Change-Id: I3ccc067570308227b605d700b41b299800aa872a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-22 16:31:06 +00:00
Fabian Kosmale
948261d70c qpropertytesthelper: Check that the types match
If you have a property myprop of type float, testReadWritePropertyBasics
would happily accept
testReadWritePropertyBasics(myObject, 1, 2, "myProp")
The test would then fail when setting bindings, as we would try to
install a binding of type int on a float property, which gets rejected
at runtime.
To prevent unexpected failures, verify that the types match before doing
any further checks.

Change-Id: I3893563fce0e11f9e20afa7c6a1e1fe0385382ab
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-04-22 16:48:46 +02:00
Kai Köhne
bf65abc4ab qdoc: Name section 'Getting started with qmake'
Other manuals have a 'Getting started' section too. Better to qualify
it further, so that searching in the Index of Qt Creator Help mode or
Qt Assistant allows to differentiate between the different products.

Pick-to: 6.1
Change-Id: I7cfdba3c3567bdf49d3fe34307576f88c9f20126
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-22 14:48:46 +00:00
Fabian Kosmale
cdabe1d64c QObjectBindableProperty: Allow signals taking a value
If the signal takes a value, we pass the current value of the property
to it.
As we now use eager evaluation, accessing the current value is now
possible.

Change-Id: I5e6947a6575bfa8ca5143f56620c645d4750a686
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-22 16:15:41 +02:00
Fabian Kosmale
d558ebf79b Add QObjectBindableProperyt::notify
This mirrors the functionality of QObjectCompatProperty::notify, and can
be useful to delay notifications until a class invariant has been
restored.

Change-Id: I1c16a0b1537a1b53d144c8abe48e546553edf877
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-22 16:15:41 +02:00
Alexandru Croitor
6969496e00 CMake: Fix auto-linking of static plugins for non-QML in-tree tests
Certain repositories like qtsvg, qtimageformats and qtvirtualkyboard
build plugins associated with Qt modules from other repositories
(qtsvg's QSvgPlugin associated to qtbase's QtGui).

When configuring in-tree tests in the same build folder as the
repository, the test executables would not automatically link to these
plugins.

Fix this by recording the existence of such plugins in a separate
property of the associated Qt module and only link them when both the
test executable and plugin are from the same project (their
PROJECT_NAME coincides).
This is in addition to linking the plugins associated with the
module where both are built in the same repository.

The logic is a bit tricky and ensures that plugins are not
accidentally initialized twice, so that in-tree tests work for both
top-level and per-repo builds.

As a drive-by, added a TODO explaining why in-tree tests that need to
link to static QML plugins won't work (somewhat unrelated to this
change).

Amends 734d2cdbc4ff6db6b3df8fffbb23dbbb565c076b
Amends b1fcdad9c9b9ad2bddd00f7301c8dd1159d523c2

Pick-to: 6.1
Task-number: QTBUG-87580
Change-Id: I3e1ff8166864f92dea931ec2ea34b6f56b4eec60
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-22 16:15:41 +02:00
Tapio Oksa
a40a512dec [Android] Remove signal and slot mechanism to listen states in editor's
Task-number: QTBUG-58013
Change-Id: Ib589f1b69e2e82026d27fbc7519d10e18ae21f59
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-04-22 10:40:59 +00:00
Fabian Kosmale
86bb14b2b9 qobject_p.h: Do not use plain emit
It breaks tst_nokeywords in declarative.

Change-Id: If3856f2fc657f142ed8e7c1da48fca0dba9a58fd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-04-22 12:40:59 +02:00
Samuel Gaist
bcbbbdb2d6 Fix case sensitivity handling QSFPM
This patch fixes the breaking of case sensitivity handling. The removal
of QRegExp killed the wrong code paths which leads to inconsistencies
when changing the regular expression throuh methods like
setFilterWildCard or setFilterFixedString. Changing the case sensitivity
also nukes the original options that were set on the regular expression
if it was set through setFilterRegularExpression.

[ChangeLog][QtCore][QSortFilterProxyModel] Case sensitivity as well as
regular expression options handling have been fixed. The original value
is properly kept when using setFilterWildCard and setFilterFixedString.
The regular expression options are now also properly kept when changing
the case senstitivity through setFilterCaseSensitivity.

Fixes: QTBUG-92260
Pick-to: 6.1
Pick-to: 6.0
Change-Id: Ifb4732306f0c7d79ad0b18d3f5437c4523bb40e5
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-04-22 08:21:41 +02:00
Ilya Fedin
9db7cc79a2 Don't own unique name for QDBusTrayIcon
Flatpak doesn't allow to own random name with PID. Even after adding
such a permission into manifest, all flatpaked apps have PID 2, so only
one Qt application at a time can have tray icon.

Even though unique name is a part of the spec, no tray hosts really
check it and SNI implementations without unique name run just fine
inside and outside of Flatpak.

This fixes the inability of Qt applications to have tray icon in Flatpak
outside of KDE.

Pick-to: 6.0 6.1 5.15
Change-Id: Ieea6dc335b7a74537a51929f6e70ca68c84228fb
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-04-21 22:21:36 +00:00
Eirik Aavitsland
3a1be7dfcb Don't use qreal as a loop counter
Fix static analyzer warning

Change-Id: I5c1a0c63e66b7c2511b4801bbe399681de998850
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-04-21 23:47:16 +02:00
Allan Sandfeld Jensen
3b8031059a Fix missing CPU feature feedback
Add empty string first like we have for x86.
This fixes offset checks, and reported missing features.

Pick-to: 6.1
Change-Id: I09f6be05641d5ed9ae5d91fa72f678fef60bdbe7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-21 22:57:04 +02:00
Niclas Rosenvik
fadd87ed15 Add Solaris support in cmake build
Add SOLARIS cmake platform definition.
Add settings for QT_DEFAULT_MKSPEC so that qplatformdefs.h can be found.
Solaris has its gssapi symbols in libgss.
Solaris supports @ORIGIN.

Solaris ld does not support --dynamic-list needed for reduce relocations.
Make solaris fail the reduce relocation test.

getauxval is specific to GNU libc and some other libc implementations on
Linux but sys/auxv.h is not. The bootstrap uses sys/aux.h as the only
indication for getauxval. This breaks builds on Solaris, so only make
sys/auxv.h an indicator for getauxval on linux or glibc based systems.

Solaris uses X11 so add it to the X11_SUPPORTED list.

Solaris network libraries for sockets etc are in socket and nsl.
ifreq does not have a member ifr_ifindex on Solaris, it uses
ifr_index. Add test to check if ifr_index is a member of ifreq.
The first struct in the in_addr union on solaris is defined as four
uint8_t, therefore four arguments are needed for its initializer list.

Change-Id: Ieed4c1bbac8559a7ae1db9c4e1e91f609f150270
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-21 20:57:04 +00:00
Giuseppe D'Angelo
284d4e7125 QLayout: mark unsetContentsMargins as the RESET function
contentsMargins is a Q_PROPERTY on a QLayout. Qt 6.1 introduced
QLayout::unsetContentsMargins() to reset the contents margins to the
"default" ones (that the user can't know); that's the textbook
description of a RESET function for the property.

Add some tests also for unsetContentsMargins.

[ChangeLog][QtWidgets][QLayout] The unsetContentsMargins() function now
acts as the RESET function for the contentsMargins property.

Change-Id: I463d88363c11f4a15ad3d6af71401d8698de1d41
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-21 22:13:11 +02:00
Ivan Solovev
1a65a4faf5 QObject: port to new property system
Extended QObjectPrivate::ExtraData to store a pointer
to its parent, and reimplemented qGetBindingStorage()
function for QObjectPrivate::ExtraData.
This allows to use Q_OBJECT_COMPAT_PROPERTY macro
for a property, stored in QObjectPrivate::ExtraData
and solves all the problems with calling a custom
setter.

Task-number: QTBUG-85520
Change-Id: I40e01c29430846359ef9160fa1ae97c702be9a18
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-04-21 15:34:28 +02:00
Giuseppe D'Angelo
696f5ffc64 QEdidParser: build only on XCB/EGLFS
No other platform needs it, so avoid building and shipping unused code.

Change-Id: I23b68b58eb0523459014df915ad8516c22adbcc1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:29:34 +02:00
Giuseppe D'Angelo
9d28886451 Edid vendor table generator (3/N): regenerate the table
Use an updated output from the script.

Change-Id: I85c4706c637bd5ceda6667257e48c16943637f9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:29:11 +02:00
Giuseppe D'Angelo
00ee664f2f Edid vendor table generator (2/N): use idiomatic C++
In C++ we can give names to classes, so just use that, without
C-isms (typedef struct).

Change-Id: I27239d8d5c28864b3f4f7bd4013cc47c045b4b04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:28:54 +02:00
Giuseppe D'Angelo
7763b397e3 Edid vendor table generator (1/N): fix copyright message
The table has been moved to QtGui, adjust the generated "location"
in the (C) comment.

Change-Id: I536fe21ab59085c0d8d89aa638b50876fe3bf1cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:28:47 +02:00
Alexandru Croitor
be1ee03a0f CMake: Fix auto-linking of static plugins in standalone tests
The change introduced in 98e8180e56
fixes reconfiguration issues for repositories that provide plugins
associated with modules from a different repository
(QSvgPlugin -> QtGui -> qtbase).

It does so by only loading the public Plugin CMake packages of
dependent repositories.

For executables / tests that are built as part of the current
repository, plugins are linked via a different simplified mechanism in
qt_add_internal_plugin and qt_internal_add_plugin in order to prevent
exporting link cycles between plugins and Qt modules.

This works for the majority of in-tree tests, but unfortunately breaks
static standalone tests.

For example in qtbase neither mechanism will link plugins to the
standalone tests:

 - qtbase has no repo dependencies, so the first mechanism (loading of
   public plugin packages) is skipped because we assume we are merely
   reconfiguring the main build of qtbase and we don't want to
   accidentally create duplicate plugin targets

 - because a standalone test configuration does not call
   qt_internal_add_plugin, no association is done between qt plugin
   and module and thus all tests (qt_internal_add_test ->
   qt_internal_add_executable) don't get the simplified plugin
   linking

Fix this by allowing loading of the public CMake plugin packages when
doing standalone tests. It should be safe to do so because we don't
build any plugins in this case, only tests.

Amends 98e8180e56

Pick-to: 6.1
Task-number: QTBUG-87580
Change-Id: I690a0366c73a24e7f49c65ed13cd70362c273d81
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-21 15:21:08 +02:00
Alexandru Croitor
2e2ef31d41 CMake: Fix build of QJpegPlugin in static Windows build with PCH
Fails with

 C:\Dev\qt\src\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error
 C2371: 'boolean': redefinition; different basic types
 C:\Program Files (x86)\Windows
 Kits\10\include\10.0.18362.0\shared\rpcndr.h(193): note: see
 declaration of 'boolean'

Don't use the precompiled header for the plugin source file.

Amends f641a0dbcf

Pick-to: 6.1
Task-number: QTBUG-88093
Change-Id: I6a57f791139d866622f7406fec45c11be6b86418
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-21 15:21:05 +02:00
Robert Löhning
41af29238c QDateTime: Avoid compiler warning about issue impossible at runtime
Change-Id: I6e5f76582c4caff31c56bfb4badfcc318f299f51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-21 15:05:09 +02:00
Andrei Golubev
3edba4b3d5 Update QList benchmark tests
Removed 5.15 specific QVector code, which is unlikely usable now when
we are at 6.1+ timeline (that was really only a nice-to-have during
5.15 -> 6.0 transition)

Added "remove first" benchmark to track the fast (or not so fast)
removal path

Updated mid insertion and mid emplace to actually trigger both paths
(growing at the beginning and at the end), before it was really using
just one side, which is not quite the "mid" way it feels. Also changed
mid insertion to actually use the insert algorithm. Seems like
insert(i, t) calls emplace under the hood at least from the visual
introspection

Change-Id: I01b82cfa0ae38d481ea7362947f3607d757bf5d0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-21 15:01:13 +02:00
Eirik Aavitsland
cd5a60089a Avoid combining enum values from different enum types
Fixes static analyzer warnings.

Task-number: QTBUG-91911
Change-Id: I55599d53bb98ada74ceb73d5668fcc18813c3ec4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-21 13:01:13 +00:00
Friedemann Kleint
1b1844afef Documentation: Fix broken links to QIODeviceBase::OpenMode
Previously, QIODeviceBase was not visible in the documentation
and the links from QIODevice::open() were broken.
Fix by fully qualifying the arguments.

Pick-to: 6.1 6.0
Change-Id: I43960ac2ff436251cc3bfad862d82f937b9bd4b1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-21 15:01:13 +02:00
Allan Sandfeld Jensen
ed82e1304d Cleanup qsimd ARM code
Switch to using getauxval.

Change-Id: I1a55cf24e3cacbbca1f57ad6f74a80df80fe60cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-21 15:01:13 +02:00
Allan Sandfeld Jensen
8179d7edf6 Add runtime aes/crypto check for ARM
Yocto apparantly enables it hard at compile time.

Change-Id: I1d4c7402eacc714859c61f469ebed85682d48b51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-21 15:01:13 +02:00
Kai Köhne
5d0085049e MSVC: Fix size_to to int warning in qhash.cpp
Pick-to: 6.1
Change-Id: I5da2ae57b0f626bd46b71bab28af668bd1fbc7de
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-21 09:27:48 +02:00
Eirik Aavitsland
4345056630 Remove xcb-native-painting setting from the configure summary
No need to spam the summary with this unsupported feature.

Pick-to: 6.1
Change-Id: Ie644a7077762d818fd62a22a8b6d3db025f92c81
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-20 22:47:32 +02:00
Eirik Aavitsland
05eff54d66 Fix build when xcb_glx_plugin config is disabled
After 7266bd459e QGLXIntegration and
QGLXContext are not defined if xcb_glx_plugin is disabled. That will
happen e.g. when gles is requested instead of desktop GL.

Protect the usage of those symbols in the xcb plugin accordingly.

Change-Id: I4bea60787fd3175450de05a8e522ef9c8b438ee7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-04-20 22:46:54 +02:00
Thiago Macieira
8bae441d90 QUtf8StringView: ensure binary compatibility throughout 6.x
We can't depend on whether the user compiles with -std=c++17 or
-std=c++20. So select what we can depend on and make that permanent.

Prior to this change:

 $ cat /tmp/test.cpp
 #include <QtCore/QUtf8StringView>
 void f(QUtf8StringView) {}
 $ qcd include
 $ g++ -S -o - -I. /tmp/test.cpp | grep globl | c++filt
         .globl  f(QBasicUtf8StringView<false>)
 $ g++ -fPIC -std=c++20 -S -o - -I. /tmp/test.cpp | grep globl | c++filt
         .globl  f(QBasicUtf8StringView<true>)

After this change, they're both "false". QUtf8StringView should have
been a concrete class that derived from QBsicUtf8StringView<whichever>
and inherited all its constructors. We'd cause ODR violations in C++20,
but nothing worse than what we usually do for BC reasons.

That solution is too late for Qt 6.x. Let's revisit in 7.0.

Change-Id: I6bcbe88c072a438b8b4efffd166e77199ecb39e3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit c7deb3400faa1d9389137fe63ffbffade8203850)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-04-20 19:33:00 +00:00
Allan Sandfeld Jensen
b1f956106c Fix tst_qicon for fractional dpr
Add rounding one place, and skip addFile for now since
the assumption about rounding dpr up no longer applies.

Pick-to: 6.1
Change-Id: I0a84dfabb218acf42cb3816ba50ef899c8762523
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-04-20 21:33:00 +02:00