Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qnativeinterface_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QNATIVEINTERFACE_P_H
6
#
define
QNATIVEINTERFACE_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
20
#
include
<
QtCore
/
qloggingcategory
.
h
>
21
22
QT_BEGIN_NAMESPACE
23
24
QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(lcNativeInterface, Q_CORE_EXPORT)
25
26
// Provides a definition for the interface destructor
27
#
define
QT_DEFINE_NATIVE_INTERFACE_2
(
Namespace
,
InterfaceClass
)
28
QT_PREPEND_NAMESPACE
(
Namespace
)
::
InterfaceClass
::
~
InterfaceClass
(
)
=
default
29
30
#
define
QT_DEFINE_NATIVE_INTERFACE
(
...
)
31
QT_OVERLOADED_MACRO
(
QT_DEFINE_NATIVE_INTERFACE
,
QNativeInterface
,
__VA_ARGS__
)
32
#
define
QT_DEFINE_PRIVATE_NATIVE_INTERFACE
(
...
)
33
QT_OVERLOADED_MACRO
(
QT_DEFINE_NATIVE_INTERFACE
,
QNativeInterface
::
Private
,
__VA_ARGS__
)
34
35
#
define
QT_NATIVE_INTERFACE_RETURN_IF
(
NativeInterface
,
baseType
)
36
{
37
using
QNativeInterface
::
Private
::
TypeInfo
;
38
qCDebug
(
lcNativeInterface
,
"Comparing requested interface name %s with available %s"
,
39
name
,
TypeInfo
<
NativeInterface
>
::
name
(
)
)
;
40
if
(
qstrcmp
(
name
,
TypeInfo
<
NativeInterface
>
::
name
(
)
)
==
0
)
{
41
qCDebug
(
lcNativeInterface
,
42
"Match for interface %s. Comparing revisions (requested %d / available %d)"
,
43
name
,
revision
,
TypeInfo
<
NativeInterface
>
::
revision
(
)
)
;
44
if
(
revision
==
TypeInfo
<
NativeInterface
>
::
revision
(
)
)
{
45
qCDebug
(
lcNativeInterface
,
"Full match. Returning dynamic cast of %p"
,
baseType
)
;
46
return
dynamic_cast
<
NativeInterface
*
>
(
baseType
)
;
47
}
else
{
48
qCWarning
(
lcNativeInterface
,
49
"Native interface revision mismatch (requested %d / available %d) for "
50
"interface %s"
,
51
revision
,
TypeInfo
<
NativeInterface
>
::
revision
(
)
,
name
)
;
52
return
nullptr
;
53
}
54
}
else
{
55
qCDebug
(
lcNativeInterface
,
"No match for requested interface name %s"
,
name
)
;
56
}
57
}
58
59
QT_END_NAMESPACE
60
61
#
endif
// QNATIVEINTERFACE_P_H
QByteArrayView
Definition
qbytearrayview.h:87
QNativeInterface::Private::hasTypeInfo
bool constexpr hasTypeInfo()
Definition
qnativeinterface.h:72
QNativeInterface
Definition
qnativeinterface.h:51
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtPrivate
Definition
qalloc.h:29
QtPrivate::lengthHelperPointer
constexpr qsizetype lengthHelperPointer(const Char *data) noexcept
Definition
qbytearrayview.h:71
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qToByteArrayViewIgnoringNull
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
Definition
qbytearrayview.h:455
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
__has_builtin
#define __has_builtin(x)
Definition
qcompilerdetection.h:444
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
qt_int_sqrt
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt(unsigned int n)
\inmodule QtCore \title Global Qt Declarations
Definition
qglobal.cpp:100
QT_DECLARE_NATIVE_INTERFACE
#define QT_DECLARE_NATIVE_INTERFACE(...)
Definition
qnativeinterface.h:48
QT_DECLARE_NATIVE_INTERFACE_3
#define QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, Revision, BaseType)
Definition
qnativeinterface.h:17
QT_DEFINE_NATIVE_INTERFACE
#define QT_DEFINE_NATIVE_INTERFACE(...)
Definition
qnativeinterface_p.h:30
QInternal_CallBackTable
Definition
qglobal.cpp:128
QInternal_CallBackTable::callbacks
QList< QList< qInternalCallback > > callbacks
Definition
qglobal.cpp:129
QNativeInterface::Private::NativeInterface
Definition
qnativeinterface.h:125
QNativeInterface::Private::TypeInfo
Definition
qnativeinterface.h:79
QNativeInterface::Private::TypeInfo::name
static constexpr char const * name()
Definition
qnativeinterface.h:113
QNativeInterface::Private::TypeInfo::isCompatibleHelper
static constexpr bool isCompatibleHelper()
Definition
qnativeinterface.h:88
QNativeInterface::Private::TypeInfo::haveTypeInfo
static constexpr bool haveTypeInfo
Definition
qnativeinterface.h:83
QNativeInterface::Private::TypeInfo::isCompatibleWith
static constexpr bool isCompatibleWith
Definition
qnativeinterface.h:100
QNativeInterface::Private::TypeInfo::revision
static constexpr int revision()
Definition
qnativeinterface.h:105
QNativeInterface::Private::has_type_info
Definition
qnativeinterface.h:56
QtPrivate::IsCompatibleByteArrayPointerHelper< Byte * >
Definition
qbytearrayview.h:37
QtPrivate::IsCompatibleByteArrayPointerHelper
Definition
qbytearrayview.h:34
QtPrivate::IsCompatibleByteArrayPointer
Definition
qbytearrayview.h:40
QtPrivate::IsCompatibleByteTypeHelper< char >
Definition
qbytearrayview.h:24
QtPrivate::IsCompatibleByteTypeHelper< signed char >
Definition
qbytearrayview.h:25
QtPrivate::IsCompatibleByteTypeHelper< std::byte >
Definition
qbytearrayview.h:27
QtPrivate::IsCompatibleByteTypeHelper< unsigned char >
Definition
qbytearrayview.h:26
QtPrivate::IsCompatibleByteTypeHelper
Definition
qbytearrayview.h:23
QtPrivate::IsCompatibleByteType
Definition
qbytearrayview.h:31
QtPrivate::IsContainerCompatibleWithQByteArrayView
Definition
qbytearrayview.h:43
qtbase
src
corelib
global
qnativeinterface_p.h
Generated on
for Qt by
1.18.0