qt5base-lts/tests/auto/corelib/kernel
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
..
qapplicationstatic Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qcoreapplication Fix return value of qGlobalPostedEventsCount() 2022-05-18 17:54:15 +02:00
qdeadlinetimer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qelapsedtimer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qeventdispatcher Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qeventloop Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qjnienvironment Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qjniobject Fold methods for object return type into generic methods 2022-05-17 00:34:06 +02:00
qjnitypes Return specific types for frequently used Java objects 2022-05-17 00:34:06 +02:00
qmath Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetacontainer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetaenum Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetamethod Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetaobject Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetaobjectbuilder Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetaproperty Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetatype Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmimedata Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qobject QMetaType: disable conversion from smart pointer<const QObject> 2022-05-21 11:43:59 +02:00
qpointer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qproperty Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsharedmemory Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsignalblocker Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsignalmapper Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsocketnotifier Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsystemsemaphore Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtimer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtranslator Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qvariant Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwineventnotifier Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
CMakeLists.txt Generate JNI signature strings at compile time 2022-05-05 07:29:25 +02:00