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