Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qiterable_impl.h
Go to the documentation of this file.
1
// Copyright (C) 2020 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
QITERABLE_IMPL_H
6
#
define
QITERABLE_IMPL_H
7
8
#
include
<
QtCore
/
qglobal
.
h
>
9
#
include
<
QtCore
/
qvariant
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
namespace
QtIterablePrivate
{
14
15
template
<
typename
Callback>
16
static
QVariant
retrieveElement
(QMetaType type, Callback callback)
17
{
18
QVariant v(type);
19
void
*dataPtr;
20
if
(type == QMetaType::fromType<QVariant>())
21
dataPtr = &v;
22
else
23
dataPtr = v.data();
24
callback(dataPtr);
25
return
v;
26
}
27
28
}
// namespace QtIterablePrivate
29
30
QT_END_NAMESPACE
31
32
#
endif
// QITERABLE_IMPL_H
QtIterablePrivate
Definition
qiterable_impl.h:13
QtIterablePrivate::retrieveElement
static QVariant retrieveElement(QMetaType type, Callback callback)
Definition
qiterable_impl.h:16
qtbase
src
corelib
kernel
qiterable_impl.h
Generated on
for Qt by
1.16.1