qt6-bb10/tests/auto/corelib
Giuseppe D'Angelo c613dd4765 QMetaType: disable conversion from smart pointer<const QObject>
QMetaType can register a converter from a smart pointer class to
QObject *. The code tries to do so even if the smart pointer is
actually holding a pointer to a _const_ QObject
(e.g. shared_ptr<const QObject>), causing a compile error:

  ../src/qt5/qtbase/build/include/QtCore/../../../src/corelib/kernel/qmetatype.h:1208:32: error: invalid conversion from ‘const QObject*’ to ‘QObject*’ [-fpermissive]
   1208 |             return p.operator->();
        |                    ~~~~~~~~~~~~^~
        |                                |
        |                                const QObject*

Disable the conversion if indeed the source is const qualified.

Change-Id: I9e9bc5992f74131e5cfd6ece9b83d4f26d370e92
Fixes: QTBUG-103741
Pick-to: 6.2 6.3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-21 11:43:59 +02:00
..
animation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
global qglobal.h: #include <stdbool.h> in C mode 2022-05-18 09:14:18 -07:00
io Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
itemmodels Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
kernel QMetaType: disable conversion from smart pointer<const QObject> 2022-05-21 11:43:59 +02:00
mimetypes Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
platform Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
plugin Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
serialization Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
text Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
thread Remove manual declarations of qGlobalPostedEventsCount() 2022-05-18 17:54:15 +02:00
time Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tools Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00