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
qqmlmodelindexvaluetype.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
6
8
9/*!
10 \internal
11*/
12QString QQmlModelIndexValueType::propertiesString(const QModelIndex &idx)
13{
14 if (!idx.isValid())
15 return QLatin1String("()");
16 return QString(QLatin1String("(%1,%2,0x%3,%4(0x%5))"))
17 .arg(idx.row()).arg(idx.column()).arg(idx.internalId(), 0, 16)
18 .arg(QLatin1String(idx.model()->metaObject()->className())).arg(quintptr(idx.model()), 0, 16);
19}
20
21/*!
22 \internal
23*/
24QString QQmlItemSelectionRangeValueType::toString() const
25{
26 return QString(QLatin1String("QItemSelectionRange(%1,%2)"))
27 .arg(reinterpret_cast<const QQmlPersistentModelIndexValueType *>(&v.topLeft())->toString())
28 .arg(reinterpret_cast<const QQmlPersistentModelIndexValueType *>(&v.bottomRight())->toString());
29}
30
31QT_END_NAMESPACE
32
33#include "moc_qqmlmodelindexvaluetype_p.cpp"