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
qqmldmobjectdata.cpp
Go to the documentation of this file.
1
// Copyright (C) 2023 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
4
5
#
include
<
private
/
qqmldmobjectdata_p
.
h
>
6
7
QT_BEGIN_NAMESPACE
8
9
QQmlDMObjectData::QQmlDMObjectData(
const
QQmlRefPointer<QQmlDelegateModelItemMetaType> &metaType,
10
VDMObjectDelegateDataType *dataType,
11
int
index,
int
row,
int
column,
12
QObject *object)
13
: QQmlDelegateModelItem(metaType, dataType, index, row, column)
14
, m_modelData(object)
15
{
16
new
QQmlDMObjectDataMetaObject(
this
, dataType);
17
}
18
19
QQmlRefPointer<QQmlContextData> QQmlDMObjectData::initProxy()
20
{
21
QQmlRefPointer<QQmlContextData> ctxt = QQmlContextData::createChild(contextData());
22
QQDMIncubationTask *it = incubationTask();
23
it->proxiedObject = m_modelData;
24
it->proxyContext = ctxt;
25
ctxt->setContextObject(
this
);
26
// We don't own the proxied object. We need to clear it if it goes away.
27
QObject::connect(m_modelData, &QObject::destroyed,
28
this
, &QQmlDelegateModelItem::childContextObjectDestroyed);
29
return
ctxt;
30
}
31
32
QT_END_NAMESPACE
qtdeclarative
src
qmlmodels
qqmldmobjectdata.cpp
Generated on
for Qt by
1.18.0