| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlproperty_p.h |
| Source code | Switch to Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | /**************************************************************************** | - |
| 2 | ** | - |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | - |
| 4 | ** Contact: https://www.qt.io/licensing/ | - |
| 5 | ** | - |
| 6 | ** This file is part of the QtQml module of the Qt Toolkit. | - |
| 7 | ** | - |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
| 9 | ** Commercial License Usage | - |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
| 11 | ** accordance with the commercial license agreement provided with the | - |
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | - |
| 16 | ** | - |
| 17 | ** GNU Lesser General Public License Usage | - |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
| 19 | ** General Public License version 3 as published by the Free Software | - |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - |
| 21 | ** packaging of this file. Please review the following information to | - |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - |
| 24 | ** | - |
| 25 | ** GNU General Public License Usage | - |
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - |
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - |
| 31 | ** included in the packaging of this file. Please review the following | - |
| 32 | ** information to ensure the GNU General Public License requirements will | - |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - |
| 35 | ** | - |
| 36 | ** $QT_END_LICENSE$ | - |
| 37 | ** | - |
| 38 | ****************************************************************************/ | - |
| 39 | - | |
| 40 | #ifndef QQMLPROPERTY_P_H | - |
| 41 | #define QQMLPROPERTY_P_H | - |
| 42 | - | |
| 43 | // | - |
| 44 | // W A R N I N G | - |
| 45 | // ------------- | - |
| 46 | // | - |
| 47 | // This file is not part of the Qt API. It exists purely as an | - |
| 48 | // implementation detail. This header file may change from version to | - |
| 49 | // version without notice, or even be removed. | - |
| 50 | // | - |
| 51 | // We mean it. | - |
| 52 | // | - |
| 53 | - | |
| 54 | #include "qqmlproperty.h" | - |
| 55 | #include "qqmlengine.h" | - |
| 56 | - | |
| 57 | #include <private/qobject_p.h> | - |
| 58 | #include <private/qtqmlglobal_p.h> | - |
| 59 | #include <private/qqmlpropertycache_p.h> | - |
| 60 | #include <private/qqmlboundsignalexpressionpointer_p.h> | - |
| 61 | - | |
| 62 | QT_BEGIN_NAMESPACE | - |
| 63 | - | |
| 64 | class QQmlContext; | - |
| 65 | class QQmlEnginePrivate; | - |
| 66 | class QQmlJavaScriptExpression; | - |
| 67 | - | |
| 68 | class Q_QML_PRIVATE_EXPORT QQmlPropertyPrivate : public QQmlRefCount | - |
| 69 | { | - |
| 70 | public: | - |
| 71 | QQmlContextData *context; | - |
| 72 | QPointer<QQmlEngine> engine; | - |
| 73 | QPointer<QObject> object; | - |
| 74 | - | |
| 75 | QQmlPropertyData core; | - |
| 76 | QQmlPropertyData valueTypeData; | - |
| 77 | - | |
| 78 | bool isNameCached:1; | - |
| 79 | QString nameCache; | - |
| 80 | - | |
| 81 | QQmlPropertyPrivate(); | - |
| 82 | - | |
| 83 | QQmlPropertyIndex encodedIndex() const | - |
| 84 | { return encodedIndex(core, valueTypeData); } executed 1082 times by 18 tests: return encodedIndex(core, valueTypeData);Executed by:
| 1082 |
| 85 | static QQmlPropertyIndex encodedIndex(const QQmlPropertyData &core, const QQmlPropertyData &valueTypeData) | - |
| 86 | { return QQmlPropertyIndex(core.coreIndex(), valueTypeData.coreIndex()); } executed 2068 times by 26 tests: return QQmlPropertyIndex(core.coreIndex(), valueTypeData.coreIndex());Executed by:
| 2068 |
| 87 | - | |
| 88 | inline QQmlContextData *effectiveContext() const; | - |
| 89 | - | |
| 90 | void initProperty(QObject *obj, const QString &name); | - |
| 91 | void initDefault(QObject *obj); | - |
| 92 | - | |
| 93 | bool isValueType() const; | - |
| 94 | int propertyType() const; | - |
| 95 | QQmlProperty::Type type() const; | - |
| 96 | QQmlProperty::PropertyTypeCategory propertyTypeCategory() const; | - |
| 97 | - | |
| 98 | QVariant readValueProperty(); | - |
| 99 | bool writeValueProperty(const QVariant &, QQmlPropertyData::WriteFlags); | - |
| 100 | - | |
| 101 | static QQmlMetaObject rawMetaObjectForType(QQmlEnginePrivate *, int); | - |
| 102 | static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, | - |
| 103 | const QVariant &value, int flags); | - |
| 104 | static bool writeValueProperty(QObject *, | - |
| 105 | const QQmlPropertyData &, const QQmlPropertyData &valueTypeData, | - |
| 106 | const QVariant &, QQmlContextData *, | - |
| 107 | QQmlPropertyData::WriteFlags flags = nullptr); | - |
| 108 | static bool write(QObject *, const QQmlPropertyData &, const QVariant &, | - |
| 109 | QQmlContextData *, QQmlPropertyData::WriteFlags flags = nullptr); | - |
| 110 | static void findAliasTarget(QObject *, QQmlPropertyIndex, QObject **, QQmlPropertyIndex *); | - |
| 111 | - | |
| 112 | enum BindingFlag { | - |
| 113 | None = 0, | - |
| 114 | DontEnable = 0x1 | - |
| 115 | }; | - |
| 116 | Q_DECLARE_FLAGS(BindingFlags, BindingFlag) | - |
| 117 | - | |
| 118 | static void setBinding(QQmlAbstractBinding *binding, BindingFlags flags = None, | - |
| 119 | QQmlPropertyData::WriteFlags writeFlags = QQmlPropertyData::DontRemoveBinding); | - |
| 120 | - | |
| 121 | static void removeBinding(const QQmlProperty &that); | - |
| 122 | static void removeBinding(QObject *o, QQmlPropertyIndex index); | - |
| 123 | static void removeBinding(QQmlAbstractBinding *b); | - |
| 124 | static QQmlAbstractBinding *binding(QObject *, QQmlPropertyIndex index); | - |
| 125 | - | |
| 126 | static QQmlProperty restore(QObject *, const QQmlPropertyData &, const QQmlPropertyData *, QQmlContextData *); | - |
| 127 | - | |
| 128 | int signalIndex() const; | - |
| 129 | - | |
| 130 | static inline QQmlPropertyPrivate *get(const QQmlProperty &p) { return p.d; } executed 676 times by 21 tests: return p.d;Executed by:
| 676 |
| 131 | - | |
| 132 | // "Public" (to QML) methods | - |
| 133 | static QQmlAbstractBinding *binding(const QQmlProperty &that); | - |
| 134 | static void setBinding(const QQmlProperty &that, QQmlAbstractBinding *); | - |
| 135 | static QQmlBoundSignalExpression *signalExpression(const QQmlProperty &that); | - |
| 136 | static void setSignalExpression(const QQmlProperty &that, QQmlBoundSignalExpression *); | - |
| 137 | static void takeSignalExpression(const QQmlProperty &that, QQmlBoundSignalExpression *); | - |
| 138 | static bool write(const QQmlProperty &that, const QVariant &, QQmlPropertyData::WriteFlags); | - |
| 139 | static QQmlPropertyIndex propertyIndex(const QQmlProperty &that); | - |
| 140 | static QMetaMethod findSignalByName(const QMetaObject *mo, const QByteArray &); | - |
| 141 | static bool connect(const QObject *sender, int signal_index, | - |
| 142 | const QObject *receiver, int method_index, | - |
| 143 | int type = 0, int *types = nullptr); | - |
| 144 | static void flushSignal(const QObject *sender, int signal_index); | - |
| 145 | - | |
| 146 | static QVariant resolvedUrlSequence(const QVariant &value, QQmlContextData *context); | - |
| 147 | static QQmlProperty create(QObject *target, const QString &propertyName, QQmlContextData *context); | - |
| 148 | - | |
| 149 | }; | - |
| 150 | - | |
| 151 | Q_DECLARE_OPERATORS_FOR_FLAGS(QQmlPropertyPrivate::BindingFlags) | - |
| 152 | - | |
| 153 | QT_END_NAMESPACE | - |
| 154 | - | |
| 155 | #endif // QQMLPROPERTY_P_H | - |
| Source code | Switch to Preprocessed file |