| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qmetaobjectbuilder.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||
| 7 | namespace QtPrivate { | - | ||||||||||||||||||||||||||||||
| 8 | __attribute__((visibility("default"))) bool isBuiltinType(const QByteArray &type) | - | ||||||||||||||||||||||||||||||
| 9 | { | - | ||||||||||||||||||||||||||||||
| 10 | int id = QMetaType::type(type); | - | ||||||||||||||||||||||||||||||
| 11 | if (!id && !type.isEmpty() && type != "void") | - | ||||||||||||||||||||||||||||||
| 12 | return false; | - | ||||||||||||||||||||||||||||||
| 13 | return (id < QMetaType::User); | - | ||||||||||||||||||||||||||||||
| 14 | } | - | ||||||||||||||||||||||||||||||
| 15 | } | - | ||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||
| 18 | static inline __attribute__((__unused__)) const QMetaObjectPrivate *priv(const uint* data) | - | ||||||||||||||||||||||||||||||
| 19 | { return reinterpret_cast<const QMetaObjectPrivate*>(data); } | - | ||||||||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||||||||
| 21 | class QMetaMethodBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 22 | { | - | ||||||||||||||||||||||||||||||
| 23 | public: | - | ||||||||||||||||||||||||||||||
| 24 | QMetaMethodBuilderPrivate() {}QMetaMethodBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 25 | (QMetaMethod::MethodType _methodType, | - | ||||||||||||||||||||||||||||||
| 26 | const QByteArray& _signature, | - | ||||||||||||||||||||||||||||||
| 27 | const QByteArray& _returnType = QByteArray("void"), | - | ||||||||||||||||||||||||||||||
| 28 | QMetaMethod::Access _access = QMetaMethod::Public, | - | ||||||||||||||||||||||||||||||
| 29 | int _revision = 0) | - | ||||||||||||||||||||||||||||||
| 30 | : signature(QMetaObject::normalizedSignature(_signature.constData())), | - | ||||||||||||||||||||||||||||||
| 31 | returnType(QMetaObject::normalizedType(_returnType)), | - | ||||||||||||||||||||||||||||||
| 32 | attributes(((int)_access) | (((int)_methodType) << 2)), | - | ||||||||||||||||||||||||||||||
| 33 | revision(_revision) | - | ||||||||||||||||||||||||||||||
| 34 | { | - | ||||||||||||||||||||||||||||||
| 35 | ((!((_methodType == QMetaMethod::Constructor) == returnType.isNull())) ? qt_assert("(_methodType == QMetaMethod::Constructor) == returnType.isNull()",__FILE__,103109) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 36 | } | - | ||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||
| 38 | QByteArray signature; | - | ||||||||||||||||||||||||||||||
| 39 | QByteArray returnType; | - | ||||||||||||||||||||||||||||||
| 40 | QList<QByteArray> parameterNames; | - | ||||||||||||||||||||||||||||||
| 41 | QByteArray tag; | - | ||||||||||||||||||||||||||||||
| 42 | int attributes; | - | ||||||||||||||||||||||||||||||
| 43 | int revision; | - | ||||||||||||||||||||||||||||||
| 44 | - | |||||||||||||||||||||||||||||||
| 45 | QMetaMethod::MethodType methodType() const | - | ||||||||||||||||||||||||||||||
| 46 | { | - | ||||||||||||||||||||||||||||||
| 47 | return (QMetaMethod::MethodType)((attributes & MethodTypeMask) >> 2); | - | ||||||||||||||||||||||||||||||
| 48 | } | - | ||||||||||||||||||||||||||||||
| 49 | - | |||||||||||||||||||||||||||||||
| 50 | QMetaMethod::Access access() const | - | ||||||||||||||||||||||||||||||
| 51 | { | - | ||||||||||||||||||||||||||||||
| 52 | return (QMetaMethod::Access)(attributes & AccessMask); | - | ||||||||||||||||||||||||||||||
| 53 | } | - | ||||||||||||||||||||||||||||||
| 54 | - | |||||||||||||||||||||||||||||||
| 55 | void setAccess(QMetaMethod::Access value) | - | ||||||||||||||||||||||||||||||
| 56 | { | - | ||||||||||||||||||||||||||||||
| 57 | attributes = ((attributes & ~AccessMask) | (int)value); | - | ||||||||||||||||||||||||||||||
| 58 | } | - | ||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||
| 60 | QList<QByteArray> parameterTypes() const | - | ||||||||||||||||||||||||||||||
| 61 | { | - | ||||||||||||||||||||||||||||||
| 62 | return QMetaObjectPrivate::parameterTypeNamesFromSignature(signature); | - | ||||||||||||||||||||||||||||||
| 63 | } | - | ||||||||||||||||||||||||||||||
| 64 | - | |||||||||||||||||||||||||||||||
| 65 | int parameterCount() const | - | ||||||||||||||||||||||||||||||
| 66 | { | - | ||||||||||||||||||||||||||||||
| 67 | return parameterTypes().size(); | - | ||||||||||||||||||||||||||||||
| 68 | } | - | ||||||||||||||||||||||||||||||
| 69 | - | |||||||||||||||||||||||||||||||
| 70 | QByteArray name() const | - | ||||||||||||||||||||||||||||||
| 71 | { | - | ||||||||||||||||||||||||||||||
| 72 | return signature.left(qMax(signature.indexOf('('), 0)); | - | ||||||||||||||||||||||||||||||
| 73 | } | - | ||||||||||||||||||||||||||||||
| 74 | }; | - | ||||||||||||||||||||||||||||||
| 75 | template<> class QTypeInfo<QMetaMethodBuilderPrivate > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QMetaMethodBuilderPrivate)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QMetaMethodBuilderPrivate >::value, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QMetaMethodBuilderPrivate) }; static inline const char *name() { return "QMetaMethodBuilderPrivate"; } }; | - | ||||||||||||||||||||||||||||||
| 76 | - | |||||||||||||||||||||||||||||||
| 77 | class QMetaPropertyBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 78 | { | - | ||||||||||||||||||||||||||||||
| 79 | public: | - | ||||||||||||||||||||||||||||||
| 80 | QMetaPropertyBuilderPrivate() {}QMetaPropertyBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 81 | (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1, | - | ||||||||||||||||||||||||||||||
| 82 | int _revision = 0) | - | ||||||||||||||||||||||||||||||
| 83 | : name(_name), | - | ||||||||||||||||||||||||||||||
| 84 | type(QMetaObject::normalizedType(_type.constData())), | - | ||||||||||||||||||||||||||||||
| 85 | flags(Readable | Writable | Scriptable), notifySignal(-1), | - | ||||||||||||||||||||||||||||||
| 86 | revision(_revision) | - | ||||||||||||||||||||||||||||||
| 87 | { | - | ||||||||||||||||||||||||||||||
| 88 | if (notifierIdx >= 0) { | - | ||||||||||||||||||||||||||||||
| 89 | flags |= Notify; | - | ||||||||||||||||||||||||||||||
| 90 | notifySignal = notifierIdx; | - | ||||||||||||||||||||||||||||||
| 91 | } | - | ||||||||||||||||||||||||||||||
| 92 | } | - | ||||||||||||||||||||||||||||||
| 93 | - | |||||||||||||||||||||||||||||||
| 94 | QByteArray name; | - | ||||||||||||||||||||||||||||||
| 95 | QByteArray type; | - | ||||||||||||||||||||||||||||||
| 96 | int flags; | - | ||||||||||||||||||||||||||||||
| 97 | int notifySignal; | - | ||||||||||||||||||||||||||||||
| 98 | int revision; | - | ||||||||||||||||||||||||||||||
| 99 | - | |||||||||||||||||||||||||||||||
| 100 | bool flag(int f) const | - | ||||||||||||||||||||||||||||||
| 101 | { | - | ||||||||||||||||||||||||||||||
| 102 | return ((flags & f) != 0); | - | ||||||||||||||||||||||||||||||
| 103 | } | - | ||||||||||||||||||||||||||||||
| 104 | - | |||||||||||||||||||||||||||||||
| 105 | void setFlag(int f, bool value) | - | ||||||||||||||||||||||||||||||
| 106 | { | - | ||||||||||||||||||||||||||||||
| 107 | if (value) | - | ||||||||||||||||||||||||||||||
| 108 | flags |= f; | - | ||||||||||||||||||||||||||||||
| 109 | else | - | ||||||||||||||||||||||||||||||
| 110 | flags &= ~f; | - | ||||||||||||||||||||||||||||||
| 111 | } | - | ||||||||||||||||||||||||||||||
| 112 | }; | - | ||||||||||||||||||||||||||||||
| 113 | template<> class QTypeInfo<QMetaPropertyBuilderPrivate > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QMetaPropertyBuilderPrivate)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QMetaPropertyBuilderPrivate >::value, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QMetaPropertyBuilderPrivate) }; static inline const char *name() { return "QMetaPropertyBuilderPrivate"; } }; | - | ||||||||||||||||||||||||||||||
| 114 | - | |||||||||||||||||||||||||||||||
| 115 | class QMetaEnumBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 116 | { | - | ||||||||||||||||||||||||||||||
| 117 | public: | - | ||||||||||||||||||||||||||||||
| 118 | QMetaEnumBuilderPrivate() {}QMetaEnumBuilderPrivate(const QByteArray& _name) | - | ||||||||||||||||||||||||||||||
| 119 | : name(_name), isFlag(false) | - | ||||||||||||||||||||||||||||||
| 120 | { | - | ||||||||||||||||||||||||||||||
| 121 | } | - | ||||||||||||||||||||||||||||||
| 122 | - | |||||||||||||||||||||||||||||||
| 123 | QByteArray name; | - | ||||||||||||||||||||||||||||||
| 124 | bool isFlag; | - | ||||||||||||||||||||||||||||||
| 125 | QList<QByteArray> keys; | - | ||||||||||||||||||||||||||||||
| 126 | QVector<int> values; | - | ||||||||||||||||||||||||||||||
| 127 | }; | - | ||||||||||||||||||||||||||||||
| 128 | template<> class QTypeInfo<QMetaEnumBuilderPrivate > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QMetaEnumBuilderPrivate)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QMetaEnumBuilderPrivate >::value, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QMetaEnumBuilderPrivate) }; static inline const char *name() { return "QMetaEnumBuilderPrivate"; } }; | - | ||||||||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||||||||
| 130 | class QMetaObjectBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 131 | { | - | ||||||||||||||||||||||||||||||
| 132 | public: | - | ||||||||||||||||||||||||||||||
| 133 | QMetaObjectBuilderPrivate() | - | ||||||||||||||||||||||||||||||
| 134 | : flags(0) | - | ||||||||||||||||||||||||||||||
| 135 | { | - | ||||||||||||||||||||||||||||||
| 136 | superClass = &QObject::staticMetaObject; | - | ||||||||||||||||||||||||||||||
| 137 | staticMetacallFunction = 0; | - | ||||||||||||||||||||||||||||||
| 138 | } | - | ||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||
| 140 | bool hasRevisionedProperties() const; | - | ||||||||||||||||||||||||||||||
| 141 | bool hasRevisionedMethods() const; | - | ||||||||||||||||||||||||||||||
| 142 | - | |||||||||||||||||||||||||||||||
| 143 | QByteArray className; | - | ||||||||||||||||||||||||||||||
| 144 | const QMetaObject *superClass; | - | ||||||||||||||||||||||||||||||
| 145 | QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction; | - | ||||||||||||||||||||||||||||||
| 146 | QVectorstd::vector<QMetaMethodBuilderPrivate> methods; | - | ||||||||||||||||||||||||||||||
| 147 | QVectorstd::vector<QMetaMethodBuilderPrivate> constructors; | - | ||||||||||||||||||||||||||||||
| 148 | QVectorstd::vector<QMetaPropertyBuilderPrivate> properties; | - | ||||||||||||||||||||||||||||||
| 149 | QList<QByteArray> classInfoNames; | - | ||||||||||||||||||||||||||||||
| 150 | QList<QByteArray> classInfoValues; | - | ||||||||||||||||||||||||||||||
| 151 | QVectorstd::vector<QMetaEnumBuilderPrivate> enumerators; | - | ||||||||||||||||||||||||||||||
| 152 | QList<const QMetaObject *> relatedMetaObjects; | - | ||||||||||||||||||||||||||||||
| 153 | int flags; | - | ||||||||||||||||||||||||||||||
| 154 | }; | - | ||||||||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||||||||
| 156 | bool QMetaObjectBuilderPrivate::hasRevisionedProperties() const | - | ||||||||||||||||||||||||||||||
| 157 | { | - | ||||||||||||||||||||||||||||||
| 158 | for (int i = 0; i <const auto &property : properties.size(); ++i) { | - | ||||||||||||||||||||||||||||||
| 159 | if (propertiesproperty
| 8-42 | ||||||||||||||||||||||||||||||
| 160 | return executed 8 times by 1 test: true;return true;Executed by:
executed 8 times by 1 test: return true;Executed by:
| 8 | ||||||||||||||||||||||||||||||
| 161 | } executed 42 times by 1 test: end of blockExecuted by:
| 42 | ||||||||||||||||||||||||||||||
| 162 | return executed 28 times by 1 test: false;return false;Executed by:
executed 28 times by 1 test: return false;Executed by:
| 28 | ||||||||||||||||||||||||||||||
| 163 | } | - | ||||||||||||||||||||||||||||||
| 164 | - | |||||||||||||||||||||||||||||||
| 165 | bool QMetaObjectBuilderPrivate::hasRevisionedMethods() const | - | ||||||||||||||||||||||||||||||
| 166 | { | - | ||||||||||||||||||||||||||||||
| 167 | for (int i = 0; i <const auto &method : methods.size(); ++i) { | - | ||||||||||||||||||||||||||||||
| 168 | if (methodsmethod
| 8-170 | ||||||||||||||||||||||||||||||
| 169 | return executed 8 times by 1 test: true;return true;Executed by:
executed 8 times by 1 test: return true;Executed by:
| 8 | ||||||||||||||||||||||||||||||
| 170 | } executed 170 times by 1 test: end of blockExecuted by:
| 170 | ||||||||||||||||||||||||||||||
| 171 | return executed 28 times by 1 test: false;return false;Executed by:
executed 28 times by 1 test: return false;Executed by:
| 28 | ||||||||||||||||||||||||||||||
| 172 | } | - | ||||||||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||||||||
| 174 | - | |||||||||||||||||||||||||||||||
| 175 | - | |||||||||||||||||||||||||||||||
| 176 | - | |||||||||||||||||||||||||||||||
| 177 | QMetaObjectBuilder::QMetaObjectBuilder() | - | ||||||||||||||||||||||||||||||
| 178 | { | - | ||||||||||||||||||||||||||||||
| 179 | d = new QMetaObjectBuilderPrivate(); | - | ||||||||||||||||||||||||||||||
| 180 | } | - | ||||||||||||||||||||||||||||||
| 181 | QMetaObjectBuilder::QMetaObjectBuilder | - | ||||||||||||||||||||||||||||||
| 182 | (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) | - | ||||||||||||||||||||||||||||||
| 183 | { | - | ||||||||||||||||||||||||||||||
| 184 | d = new QMetaObjectBuilderPrivate(); | - | ||||||||||||||||||||||||||||||
| 185 | addMetaObject(prototype, members); | - | ||||||||||||||||||||||||||||||
| 186 | } | - | ||||||||||||||||||||||||||||||
| 187 | - | |||||||||||||||||||||||||||||||
| 188 | - | |||||||||||||||||||||||||||||||
| 189 | - | |||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||
| 191 | QMetaObjectBuilder::~QMetaObjectBuilder() | - | ||||||||||||||||||||||||||||||
| 192 | { | - | ||||||||||||||||||||||||||||||
| 193 | delete d; | - | ||||||||||||||||||||||||||||||
| 194 | } | - | ||||||||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||||||||
| 196 | - | |||||||||||||||||||||||||||||||
| 197 | - | |||||||||||||||||||||||||||||||
| 198 | - | |||||||||||||||||||||||||||||||
| 199 | - | |||||||||||||||||||||||||||||||
| 200 | - | |||||||||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||||||||
| 202 | QByteArray QMetaObjectBuilder::className() const | - | ||||||||||||||||||||||||||||||
| 203 | { | - | ||||||||||||||||||||||||||||||
| 204 | return d->className; | - | ||||||||||||||||||||||||||||||
| 205 | } | - | ||||||||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||||||||
| 207 | - | |||||||||||||||||||||||||||||||
| 208 | - | |||||||||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||||||||
| 210 | - | |||||||||||||||||||||||||||||||
| 211 | - | |||||||||||||||||||||||||||||||
| 212 | - | |||||||||||||||||||||||||||||||
| 213 | void QMetaObjectBuilder::setClassName(const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 214 | { | - | ||||||||||||||||||||||||||||||
| 215 | d->className = name; | - | ||||||||||||||||||||||||||||||
| 216 | } | - | ||||||||||||||||||||||||||||||
| 217 | const QMetaObject *QMetaObjectBuilder::superClass() const | - | ||||||||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||||||||
| 219 | return d->superClass; | - | ||||||||||||||||||||||||||||||
| 220 | } | - | ||||||||||||||||||||||||||||||
| 221 | void QMetaObjectBuilder::setSuperClass(const QMetaObject *meta) | - | ||||||||||||||||||||||||||||||
| 222 | { | - | ||||||||||||||||||||||||||||||
| 223 | ((!(meta)) ? qt_assert("meta",__FILE__,321325) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 224 | d->superClass = meta; | - | ||||||||||||||||||||||||||||||
| 225 | } | - | ||||||||||||||||||||||||||||||
| 226 | - | |||||||||||||||||||||||||||||||
| 227 | - | |||||||||||||||||||||||||||||||
| 228 | - | |||||||||||||||||||||||||||||||
| 229 | - | |||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||
| 231 | - | |||||||||||||||||||||||||||||||
| 232 | - | |||||||||||||||||||||||||||||||
| 233 | QMetaObjectBuilder::MetaObjectFlags QMetaObjectBuilder::flags() const | - | ||||||||||||||||||||||||||||||
| 234 | { | - | ||||||||||||||||||||||||||||||
| 235 | return (QMetaObjectBuilder::MetaObjectFlags)d->flags; | - | ||||||||||||||||||||||||||||||
| 236 | } | - | ||||||||||||||||||||||||||||||
| 237 | - | |||||||||||||||||||||||||||||||
| 238 | - | |||||||||||||||||||||||||||||||
| 239 | - | |||||||||||||||||||||||||||||||
| 240 | - | |||||||||||||||||||||||||||||||
| 241 | - | |||||||||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||||||||
| 244 | void QMetaObjectBuilder::setFlags(MetaObjectFlags flags) | - | ||||||||||||||||||||||||||||||
| 245 | { | - | ||||||||||||||||||||||||||||||
| 246 | d->flags = flags; | - | ||||||||||||||||||||||||||||||
| 247 | } | - | ||||||||||||||||||||||||||||||
| 248 | int QMetaObjectBuilder::methodCount() const | - | ||||||||||||||||||||||||||||||
| 249 | { | - | ||||||||||||||||||||||||||||||
| 250 | return executed 20 times by 1 test: int(d->methods.size();());return int(d->methods.size());Executed by:
executed 20 times by 1 test: return int(d->methods.size());Executed by:
| 20 | ||||||||||||||||||||||||||||||
| 251 | } | - | ||||||||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||||||||
| 253 | - | |||||||||||||||||||||||||||||||
| 254 | - | |||||||||||||||||||||||||||||||
| 255 | - | |||||||||||||||||||||||||||||||
| 256 | - | |||||||||||||||||||||||||||||||
| 257 | - | |||||||||||||||||||||||||||||||
| 258 | int QMetaObjectBuilder::constructorCount() const | - | ||||||||||||||||||||||||||||||
| 259 | { | - | ||||||||||||||||||||||||||||||
| 260 | return executed 18 times by 1 test: int(d->constructors.size();());return int(d->constructors.size());Executed by:
executed 18 times by 1 test: return int(d->constructors.size());Executed by:
| 18 | ||||||||||||||||||||||||||||||
| 261 | } | - | ||||||||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||||||||
| 263 | - | |||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||
| 265 | - | |||||||||||||||||||||||||||||||
| 266 | - | |||||||||||||||||||||||||||||||
| 267 | - | |||||||||||||||||||||||||||||||
| 268 | - | |||||||||||||||||||||||||||||||
| 269 | int QMetaObjectBuilder::propertyCount() const | - | ||||||||||||||||||||||||||||||
| 270 | { | - | ||||||||||||||||||||||||||||||
| 271 | return executed 17 times by 1 test: int(d->properties.size();());return int(d->properties.size());Executed by:
executed 17 times by 1 test: return int(d->properties.size());Executed by:
| 17 | ||||||||||||||||||||||||||||||
| 272 | } | - | ||||||||||||||||||||||||||||||
| 273 | int QMetaObjectBuilder::enumeratorCount() const | - | ||||||||||||||||||||||||||||||
| 274 | { | - | ||||||||||||||||||||||||||||||
| 275 | return executed 15 times by 1 test: int(d->enumerators.size();());return int(d->enumerators.size());Executed by:
executed 15 times by 1 test: return int(d->enumerators.size());Executed by:
| 15 | ||||||||||||||||||||||||||||||
| 276 | } | - | ||||||||||||||||||||||||||||||
| 277 | int QMetaObjectBuilder::classInfoCount() const | - | ||||||||||||||||||||||||||||||
| 278 | { | - | ||||||||||||||||||||||||||||||
| 279 | return d->classInfoNames.size(); | - | ||||||||||||||||||||||||||||||
| 280 | } | - | ||||||||||||||||||||||||||||||
| 281 | int QMetaObjectBuilder::relatedMetaObjectCount() const | - | ||||||||||||||||||||||||||||||
| 282 | { | - | ||||||||||||||||||||||||||||||
| 283 | return d->relatedMetaObjects.size(); | - | ||||||||||||||||||||||||||||||
| 284 | } | - | ||||||||||||||||||||||||||||||
| 285 | QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 286 | { | - | ||||||||||||||||||||||||||||||
| 287 | int index = int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 288 | d->methods.appendpush_back(QMetaMethodBuilderPrivate(QMetaMethod::Method, signature)); | - | ||||||||||||||||||||||||||||||
| 289 | return executed 24 times by 1 test: QMetaMethodBuilder(this, index);return QMetaMethodBuilder(this, index);Executed by:
executed 24 times by 1 test: return QMetaMethodBuilder(this, index);Executed by:
| 24 | ||||||||||||||||||||||||||||||
| 290 | } | - | ||||||||||||||||||||||||||||||
| 291 | QMetaMethodBuilder QMetaObjectBuilder::addMethod | - | ||||||||||||||||||||||||||||||
| 292 | (const QByteArray& signature, const QByteArray& returnType) | - | ||||||||||||||||||||||||||||||
| 293 | { | - | ||||||||||||||||||||||||||||||
| 294 | int index = int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 295 | d->methods.appendpush_back(QMetaMethodBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 296 | (QMetaMethod::Method, signature, returnType)); | - | ||||||||||||||||||||||||||||||
| 297 | return executed 1 time by 1 test: QMetaMethodBuilder(this, index);return QMetaMethodBuilder(this, index);Executed by:
executed 1 time by 1 test: return QMetaMethodBuilder(this, index);Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 298 | } | - | ||||||||||||||||||||||||||||||
| 299 | QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QMetaMethod& prototype) | - | ||||||||||||||||||||||||||||||
| 300 | { | - | ||||||||||||||||||||||||||||||
| 301 | QMetaMethodBuilder method; | - | ||||||||||||||||||||||||||||||
| 302 | if (prototype.methodType() == QMetaMethod::Method) | - | ||||||||||||||||||||||||||||||
| 303 | method = addMethod(prototype.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 304 | else if (prototype.methodType() == QMetaMethod::Signal) | - | ||||||||||||||||||||||||||||||
| 305 | method = addSignal(prototype.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 306 | else if (prototype.methodType() == QMetaMethod::Slot) | - | ||||||||||||||||||||||||||||||
| 307 | method = addSlot(prototype.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 308 | else if (prototype.methodType() == QMetaMethod::Constructor) | - | ||||||||||||||||||||||||||||||
| 309 | method = addConstructor(prototype.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 310 | method.setReturnType(prototype.typeName()); | - | ||||||||||||||||||||||||||||||
| 311 | method.setParameterNames(prototype.parameterNames()); | - | ||||||||||||||||||||||||||||||
| 312 | method.setTag(prototype.tag()); | - | ||||||||||||||||||||||||||||||
| 313 | method.setAccess(prototype.access()); | - | ||||||||||||||||||||||||||||||
| 314 | method.setAttributes(prototype.attributes()); | - | ||||||||||||||||||||||||||||||
| 315 | method.setRevision(prototype.revision()); | - | ||||||||||||||||||||||||||||||
| 316 | return method; | - | ||||||||||||||||||||||||||||||
| 317 | } | - | ||||||||||||||||||||||||||||||
| 318 | QMetaMethodBuilder QMetaObjectBuilder::addSlot(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 319 | { | - | ||||||||||||||||||||||||||||||
| 320 | int index = int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 321 | d->methods.appendpush_back(QMetaMethodBuilderPrivate(QMetaMethod::Slot, signature)); | - | ||||||||||||||||||||||||||||||
| 322 | return executed 60 times by 1 test: QMetaMethodBuilder(this, index);return QMetaMethodBuilder(this, index);Executed by:
executed 60 times by 1 test: return QMetaMethodBuilder(this, index);Executed by:
| 60 | ||||||||||||||||||||||||||||||
| 323 | } | - | ||||||||||||||||||||||||||||||
| 324 | QMetaMethodBuilder QMetaObjectBuilder::addSignal(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 325 | { | - | ||||||||||||||||||||||||||||||
| 326 | int index = int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 327 | d->methods.appendpush_back(QMetaMethodBuilderPrivate | - | ||||||||||||||||||||||||||||||
| 328 | (QMetaMethod::Signal, signature, QByteArray("void"), QMetaMethod::Public)); | - | ||||||||||||||||||||||||||||||
| 329 | return executed 28 times by 1 test: QMetaMethodBuilder(this, index);return QMetaMethodBuilder(this, index);Executed by:
executed 28 times by 1 test: return QMetaMethodBuilder(this, index);Executed by:
| 28 | ||||||||||||||||||||||||||||||
| 330 | } | - | ||||||||||||||||||||||||||||||
| 331 | QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 332 | { | - | ||||||||||||||||||||||||||||||
| 333 | int index = int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 334 | d->constructors.appendpush_back(QMetaMethodBuilderPrivate(QMetaMethod::Constructor, signature, | - | ||||||||||||||||||||||||||||||
| 335 | QByteArray())); | - | ||||||||||||||||||||||||||||||
| 336 | return executed 27 times by 1 test: QMetaMethodBuilder(this, -(index + 1));return QMetaMethodBuilder(this, -(index + 1));Executed by:
executed 27 times by 1 test: return QMetaMethodBuilder(this, -(index + 1));Executed by:
| 27 | ||||||||||||||||||||||||||||||
| 337 | } | - | ||||||||||||||||||||||||||||||
| 338 | QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QMetaMethod& prototype) | - | ||||||||||||||||||||||||||||||
| 339 | { | - | ||||||||||||||||||||||||||||||
| 340 | ((!(prototype.methodType() == QMetaMethod::Constructor)) ? qt_assert("prototype.methodType() == QMetaMethod::Constructor",__FILE__,545549) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 341 | QMetaMethodBuilder ctor = addConstructor(prototype.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 342 | ctor.setReturnType(prototype.typeName()); | - | ||||||||||||||||||||||||||||||
| 343 | ctor.setParameterNames(prototype.parameterNames()); | - | ||||||||||||||||||||||||||||||
| 344 | ctor.setTag(prototype.tag()); | - | ||||||||||||||||||||||||||||||
| 345 | ctor.setAccess(prototype.access()); | - | ||||||||||||||||||||||||||||||
| 346 | ctor.setAttributes(prototype.attributes()); | - | ||||||||||||||||||||||||||||||
| 347 | return ctor; | - | ||||||||||||||||||||||||||||||
| 348 | } | - | ||||||||||||||||||||||||||||||
| 349 | QMetaPropertyBuilder QMetaObjectBuilder::addProperty | - | ||||||||||||||||||||||||||||||
| 350 | (const QByteArray& name, const QByteArray& type, int notifierId) | - | ||||||||||||||||||||||||||||||
| 351 | { | - | ||||||||||||||||||||||||||||||
| 352 | int index = int(d->properties.size();()); | - | ||||||||||||||||||||||||||||||
| 353 | d->properties.appendpush_back(QMetaPropertyBuilderPrivate(name, type, notifierId)); | - | ||||||||||||||||||||||||||||||
| 354 | return executed 43 times by 1 test: QMetaPropertyBuilder(this, index);return QMetaPropertyBuilder(this, index);Executed by:
executed 43 times by 1 test: return QMetaPropertyBuilder(this, index);Executed by:
| 43 | ||||||||||||||||||||||||||||||
| 355 | } | - | ||||||||||||||||||||||||||||||
| 356 | QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& prototype) | - | ||||||||||||||||||||||||||||||
| 357 | { | - | ||||||||||||||||||||||||||||||
| 358 | QMetaPropertyBuilder property = addProperty(prototype.name(), prototype.typeName()); | - | ||||||||||||||||||||||||||||||
| 359 | property.setReadable(prototype.isReadable()); | - | ||||||||||||||||||||||||||||||
| 360 | property.setWritable(prototype.isWritable()); | - | ||||||||||||||||||||||||||||||
| 361 | property.setResettable(prototype.isResettable()); | - | ||||||||||||||||||||||||||||||
| 362 | property.setDesignable(prototype.isDesignable()); | - | ||||||||||||||||||||||||||||||
| 363 | property.setScriptable(prototype.isScriptable()); | - | ||||||||||||||||||||||||||||||
| 364 | property.setStored(prototype.isStored()); | - | ||||||||||||||||||||||||||||||
| 365 | property.setEditable(prototype.isEditable()); | - | ||||||||||||||||||||||||||||||
| 366 | property.setUser(prototype.isUser()); | - | ||||||||||||||||||||||||||||||
| 367 | property.setStdCppSet(prototype.hasStdCppSet()); | - | ||||||||||||||||||||||||||||||
| 368 | property.setEnumOrFlag(prototype.isEnumType()); | - | ||||||||||||||||||||||||||||||
| 369 | property.setConstant(prototype.isConstant()); | - | ||||||||||||||||||||||||||||||
| 370 | property.setFinal(prototype.isFinal()); | - | ||||||||||||||||||||||||||||||
| 371 | property.setRevision(prototype.revision()); | - | ||||||||||||||||||||||||||||||
| 372 | if (prototype.hasNotifySignal()) { | - | ||||||||||||||||||||||||||||||
| 373 | - | |||||||||||||||||||||||||||||||
| 374 | QMetaMethod method = prototype.notifySignal(); | - | ||||||||||||||||||||||||||||||
| 375 | int index = indexOfMethod(method.methodSignature()); | - | ||||||||||||||||||||||||||||||
| 376 | if (index == -1) | - | ||||||||||||||||||||||||||||||
| 377 | index = addMethod(method).index(); | - | ||||||||||||||||||||||||||||||
| 378 | d->properties[property._index].notifySignal = index; | - | ||||||||||||||||||||||||||||||
| 379 | d->properties[property._index].setFlag(Notify, true); | - | ||||||||||||||||||||||||||||||
| 380 | } | - | ||||||||||||||||||||||||||||||
| 381 | return property; | - | ||||||||||||||||||||||||||||||
| 382 | } | - | ||||||||||||||||||||||||||||||
| 383 | QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 384 | { | - | ||||||||||||||||||||||||||||||
| 385 | int index = int(d->enumerators.size();()); | - | ||||||||||||||||||||||||||||||
| 386 | d->enumerators.appendpush_back(QMetaEnumBuilderPrivate(name)); | - | ||||||||||||||||||||||||||||||
| 387 | return executed 10 times by 1 test: QMetaEnumBuilder(this, index);return QMetaEnumBuilder(this, index);Executed by:
executed 10 times by 1 test: return QMetaEnumBuilder(this, index);Executed by:
| 10 | ||||||||||||||||||||||||||||||
| 388 | } | - | ||||||||||||||||||||||||||||||
| 389 | QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QMetaEnum& prototype) | - | ||||||||||||||||||||||||||||||
| 390 | { | - | ||||||||||||||||||||||||||||||
| 391 | QMetaEnumBuilder en = addEnumerator(prototype.name()); | - | ||||||||||||||||||||||||||||||
| 392 | en.setIsFlag(prototype.isFlag()); | - | ||||||||||||||||||||||||||||||
| 393 | int count = prototype.keyCount(); | - | ||||||||||||||||||||||||||||||
| 394 | for (int index = 0; index < count; ++index) | - | ||||||||||||||||||||||||||||||
| 395 | en.addKey(prototype.key(index), prototype.value(index)); | - | ||||||||||||||||||||||||||||||
| 396 | return en; | - | ||||||||||||||||||||||||||||||
| 397 | } | - | ||||||||||||||||||||||||||||||
| 398 | int QMetaObjectBuilder::addClassInfo(const QByteArray& name, const QByteArray& value) | - | ||||||||||||||||||||||||||||||
| 399 | { | - | ||||||||||||||||||||||||||||||
| 400 | int index = d->classInfoNames.size(); | - | ||||||||||||||||||||||||||||||
| 401 | d->classInfoNames += name; | - | ||||||||||||||||||||||||||||||
| 402 | d->classInfoValues += value; | - | ||||||||||||||||||||||||||||||
| 403 | return index; | - | ||||||||||||||||||||||||||||||
| 404 | } | - | ||||||||||||||||||||||||||||||
| 405 | int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObject *meta) | - | ||||||||||||||||||||||||||||||
| 406 | { | - | ||||||||||||||||||||||||||||||
| 407 | ((!(meta)) ? qt_assert("meta",__FILE__,670674) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 408 | int index = d->relatedMetaObjects.size(); | - | ||||||||||||||||||||||||||||||
| 409 | d->relatedMetaObjects.append(meta); | - | ||||||||||||||||||||||||||||||
| 410 | return index; | - | ||||||||||||||||||||||||||||||
| 411 | } | - | ||||||||||||||||||||||||||||||
| 412 | void QMetaObjectBuilder::addMetaObject | - | ||||||||||||||||||||||||||||||
| 413 | (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) | - | ||||||||||||||||||||||||||||||
| 414 | { | - | ||||||||||||||||||||||||||||||
| 415 | ((!(prototype)) ? qt_assert("prototype",__FILE__,686690) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 416 | int index; | - | ||||||||||||||||||||||||||||||
| 417 | - | |||||||||||||||||||||||||||||||
| 418 | if ((members & ClassName) != 0) | - | ||||||||||||||||||||||||||||||
| 419 | d->className = prototype->className(); | - | ||||||||||||||||||||||||||||||
| 420 | - | |||||||||||||||||||||||||||||||
| 421 | if ((members & SuperClass) != 0) | - | ||||||||||||||||||||||||||||||
| 422 | d->superClass = prototype->superClass(); | - | ||||||||||||||||||||||||||||||
| 423 | - | |||||||||||||||||||||||||||||||
| 424 | if ((members & (Methods | Signals | Slots)) != 0) { | - | ||||||||||||||||||||||||||||||
| 425 | for (index = prototype->methodOffset(); index < prototype->methodCount(); ++index) { | - | ||||||||||||||||||||||||||||||
| 426 | QMetaMethod method = prototype->method(index); | - | ||||||||||||||||||||||||||||||
| 427 | if (method.methodType() != QMetaMethod::Signal) { | - | ||||||||||||||||||||||||||||||
| 428 | if (method.access() == QMetaMethod::Public && (members & PublicMethods) == 0) | - | ||||||||||||||||||||||||||||||
| 429 | continue; | - | ||||||||||||||||||||||||||||||
| 430 | if (method.access() == QMetaMethod::Private && (members & PrivateMethods) == 0) | - | ||||||||||||||||||||||||||||||
| 431 | continue; | - | ||||||||||||||||||||||||||||||
| 432 | if (method.access() == QMetaMethod::Protected && (members & ProtectedMethods) == 0) | - | ||||||||||||||||||||||||||||||
| 433 | continue; | - | ||||||||||||||||||||||||||||||
| 434 | } | - | ||||||||||||||||||||||||||||||
| 435 | if (method.methodType() == QMetaMethod::Method && (members & Methods) != 0) { | - | ||||||||||||||||||||||||||||||
| 436 | addMethod(method); | - | ||||||||||||||||||||||||||||||
| 437 | } else if (method.methodType() == QMetaMethod::Signal && | - | ||||||||||||||||||||||||||||||
| 438 | (members & Signals) != 0) { | - | ||||||||||||||||||||||||||||||
| 439 | addMethod(method); | - | ||||||||||||||||||||||||||||||
| 440 | } else if (method.methodType() == QMetaMethod::Slot && | - | ||||||||||||||||||||||||||||||
| 441 | (members & Slots) != 0) { | - | ||||||||||||||||||||||||||||||
| 442 | addMethod(method); | - | ||||||||||||||||||||||||||||||
| 443 | } | - | ||||||||||||||||||||||||||||||
| 444 | } | - | ||||||||||||||||||||||||||||||
| 445 | } | - | ||||||||||||||||||||||||||||||
| 446 | - | |||||||||||||||||||||||||||||||
| 447 | if ((members & Constructors) != 0) { | - | ||||||||||||||||||||||||||||||
| 448 | for (index = 0; index < prototype->constructorCount(); ++index) | - | ||||||||||||||||||||||||||||||
| 449 | addConstructor(prototype->constructor(index)); | - | ||||||||||||||||||||||||||||||
| 450 | } | - | ||||||||||||||||||||||||||||||
| 451 | - | |||||||||||||||||||||||||||||||
| 452 | if ((members & Properties) != 0) { | - | ||||||||||||||||||||||||||||||
| 453 | for (index = prototype->propertyOffset(); index < prototype->propertyCount(); ++index) | - | ||||||||||||||||||||||||||||||
| 454 | addProperty(prototype->property(index)); | - | ||||||||||||||||||||||||||||||
| 455 | } | - | ||||||||||||||||||||||||||||||
| 456 | - | |||||||||||||||||||||||||||||||
| 457 | if ((members & Enumerators) != 0) { | - | ||||||||||||||||||||||||||||||
| 458 | for (index = prototype->enumeratorOffset(); index < prototype->enumeratorCount(); ++index) | - | ||||||||||||||||||||||||||||||
| 459 | addEnumerator(prototype->enumerator(index)); | - | ||||||||||||||||||||||||||||||
| 460 | } | - | ||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||
| 462 | if ((members & ClassInfos) != 0) { | - | ||||||||||||||||||||||||||||||
| 463 | for (index = prototype->classInfoOffset(); index < prototype->classInfoCount(); ++index) { | - | ||||||||||||||||||||||||||||||
| 464 | QMetaClassInfo ci = prototype->classInfo(index); | - | ||||||||||||||||||||||||||||||
| 465 | addClassInfo(ci.name(), ci.value()); | - | ||||||||||||||||||||||||||||||
| 466 | } | - | ||||||||||||||||||||||||||||||
| 467 | } | - | ||||||||||||||||||||||||||||||
| 468 | - | |||||||||||||||||||||||||||||||
| 469 | if ((members & RelatedMetaObjects) != 0) { | - | ||||||||||||||||||||||||||||||
| 470 | ((!(priv(prototype->d.data)->revision >= 2)) ? qt_assert("priv(prototype->d.data)->revision >= 2",__FILE__,741745) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 471 | const QMetaObject * const *objects = prototype->d.relatedMetaObjects; | - | ||||||||||||||||||||||||||||||
| 472 | if (objects) { | - | ||||||||||||||||||||||||||||||
| 473 | while (*objects != 0) { | - | ||||||||||||||||||||||||||||||
| 474 | addRelatedMetaObject(*objects); | - | ||||||||||||||||||||||||||||||
| 475 | ++objects; | - | ||||||||||||||||||||||||||||||
| 476 | } | - | ||||||||||||||||||||||||||||||
| 477 | } | - | ||||||||||||||||||||||||||||||
| 478 | } | - | ||||||||||||||||||||||||||||||
| 479 | - | |||||||||||||||||||||||||||||||
| 480 | if ((members & StaticMetacall) != 0) { | - | ||||||||||||||||||||||||||||||
| 481 | ((!(priv(prototype->d.data)->revision >= 6)) ? qt_assert("priv(prototype->d.data)->revision >= 6",__FILE__,752756) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 482 | if (prototype->d.static_metacall) | - | ||||||||||||||||||||||||||||||
| 483 | setStaticMetacallFunction(prototype->d.static_metacall); | - | ||||||||||||||||||||||||||||||
| 484 | } | - | ||||||||||||||||||||||||||||||
| 485 | } | - | ||||||||||||||||||||||||||||||
| 486 | - | |||||||||||||||||||||||||||||||
| 487 | - | |||||||||||||||||||||||||||||||
| 488 | - | |||||||||||||||||||||||||||||||
| 489 | - | |||||||||||||||||||||||||||||||
| 490 | - | |||||||||||||||||||||||||||||||
| 491 | - | |||||||||||||||||||||||||||||||
| 492 | QMetaMethodBuilder QMetaObjectBuilder::method(int index) const | - | ||||||||||||||||||||||||||||||
| 493 | { | - | ||||||||||||||||||||||||||||||
| 494 | if (index >= 0 &&uint(
| 1-3 | ||||||||||||||||||||||||||||||
| 495 | return executed 3 times by 1 test: QMetaMethodBuilder(this, index);return QMetaMethodBuilder(this, index);Executed by:
executed 3 times by 1 test: return QMetaMethodBuilder(this, index);Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 496 | else | - | ||||||||||||||||||||||||||||||
| 497 | return executed 1 time by 1 test: QMetaMethodBuilder();return QMetaMethodBuilder();Executed by:
executed 1 time by 1 test: return QMetaMethodBuilder();Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 498 | } | - | ||||||||||||||||||||||||||||||
| 499 | - | |||||||||||||||||||||||||||||||
| 500 | - | |||||||||||||||||||||||||||||||
| 501 | - | |||||||||||||||||||||||||||||||
| 502 | - | |||||||||||||||||||||||||||||||
| 503 | - | |||||||||||||||||||||||||||||||
| 504 | - | |||||||||||||||||||||||||||||||
| 505 | QMetaMethodBuilder QMetaObjectBuilder::constructor(int index) const | - | ||||||||||||||||||||||||||||||
| 506 | { | - | ||||||||||||||||||||||||||||||
| 507 | if (index >= 0 &&uint(
| 1-2 | ||||||||||||||||||||||||||||||
| 508 | return executed 2 times by 1 test: QMetaMethodBuilder(this, -(index + 1));return QMetaMethodBuilder(this, -(index + 1));Executed by:
executed 2 times by 1 test: return QMetaMethodBuilder(this, -(index + 1));Executed by:
| 2 | ||||||||||||||||||||||||||||||
| 509 | else | - | ||||||||||||||||||||||||||||||
| 510 | return executed 1 time by 1 test: QMetaMethodBuilder();return QMetaMethodBuilder();Executed by:
executed 1 time by 1 test: return QMetaMethodBuilder();Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 511 | } | - | ||||||||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||||||||
| 514 | - | |||||||||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||||||||
| 516 | - | |||||||||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||||||||
| 518 | QMetaPropertyBuilder QMetaObjectBuilder::property(int index) const | - | ||||||||||||||||||||||||||||||
| 519 | { | - | ||||||||||||||||||||||||||||||
| 520 | if (index >= 0 &&uint(
| 1-6 | ||||||||||||||||||||||||||||||
| 521 | return executed 6 times by 1 test: QMetaPropertyBuilder(this, index);return QMetaPropertyBuilder(this, index);Executed by:
executed 6 times by 1 test: return QMetaPropertyBuilder(this, index);Executed by:
| 6 | ||||||||||||||||||||||||||||||
| 522 | else | - | ||||||||||||||||||||||||||||||
| 523 | return executed 1 time by 1 test: QMetaPropertyBuilder();return QMetaPropertyBuilder();Executed by:
executed 1 time by 1 test: return QMetaPropertyBuilder();Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 524 | } | - | ||||||||||||||||||||||||||||||
| 525 | - | |||||||||||||||||||||||||||||||
| 526 | - | |||||||||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||||||||
| 530 | - | |||||||||||||||||||||||||||||||
| 531 | - | |||||||||||||||||||||||||||||||
| 532 | QMetaEnumBuilder QMetaObjectBuilder::enumerator(int index) const | - | ||||||||||||||||||||||||||||||
| 533 | { | - | ||||||||||||||||||||||||||||||
| 534 | if (index >= 0 &&uint(
| 1-2 | ||||||||||||||||||||||||||||||
| 535 | return executed 2 times by 1 test: QMetaEnumBuilder(this, index);return QMetaEnumBuilder(this, index);Executed by:
executed 2 times by 1 test: return QMetaEnumBuilder(this, index);Executed by:
| 2 | ||||||||||||||||||||||||||||||
| 536 | else | - | ||||||||||||||||||||||||||||||
| 537 | return executed 1 time by 1 test: QMetaEnumBuilder();return QMetaEnumBuilder();Executed by:
executed 1 time by 1 test: return QMetaEnumBuilder();Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 538 | } | - | ||||||||||||||||||||||||||||||
| 539 | const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const | - | ||||||||||||||||||||||||||||||
| 540 | { | - | ||||||||||||||||||||||||||||||
| 541 | if (index >= 0 && index < d->relatedMetaObjects.size()) | - | ||||||||||||||||||||||||||||||
| 542 | return d->relatedMetaObjects[index]; | - | ||||||||||||||||||||||||||||||
| 543 | else | - | ||||||||||||||||||||||||||||||
| 544 | return 0; | - | ||||||||||||||||||||||||||||||
| 545 | } | - | ||||||||||||||||||||||||||||||
| 546 | QByteArray QMetaObjectBuilder::classInfoName(int index) const | - | ||||||||||||||||||||||||||||||
| 547 | { | - | ||||||||||||||||||||||||||||||
| 548 | if (index >= 0 && index < d->classInfoNames.size()) | - | ||||||||||||||||||||||||||||||
| 549 | return d->classInfoNames[index]; | - | ||||||||||||||||||||||||||||||
| 550 | else | - | ||||||||||||||||||||||||||||||
| 551 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 552 | } | - | ||||||||||||||||||||||||||||||
| 553 | QByteArray QMetaObjectBuilder::classInfoValue(int index) const | - | ||||||||||||||||||||||||||||||
| 554 | { | - | ||||||||||||||||||||||||||||||
| 555 | if (index >= 0 && index < d->classInfoValues.size()) | - | ||||||||||||||||||||||||||||||
| 556 | return d->classInfoValues[index]; | - | ||||||||||||||||||||||||||||||
| 557 | else | - | ||||||||||||||||||||||||||||||
| 558 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 559 | } | - | ||||||||||||||||||||||||||||||
| 560 | void QMetaObjectBuilder::removeMethod(int index) | - | ||||||||||||||||||||||||||||||
| 561 | { | - | ||||||||||||||||||||||||||||||
| 562 | if (index >= 0 &&uint(
| 0-3 | ||||||||||||||||||||||||||||||
| 563 | d->methods.removeAterase(d->methods.begin() + index); | - | ||||||||||||||||||||||||||||||
| 564 | for (int prop = 0; prop <auto &property : d->properties.size(); ++prop) { | - | ||||||||||||||||||||||||||||||
| 565 | - | |||||||||||||||||||||||||||||||
| 566 | if (d->properties[prop].property.
| 1 | ||||||||||||||||||||||||||||||
| 567 | d->properties[prop].property.notifySignal = -1; | - | ||||||||||||||||||||||||||||||
| 568 | d->properties[prop].property.setFlag(Notify, false); | - | ||||||||||||||||||||||||||||||
| 569 | } executed 1 time by 1 test: else if (d->properties[prop].property.end of blockExecuted by:
| 0-1 | ||||||||||||||||||||||||||||||
| 570 | (d->properties[prop].property. executed 1 time by 1 test: notifySignal)--;--;property.notifySignal--;Executed by:
executed 1 time by 1 test: property.notifySignal--;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 571 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 572 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||
| 573 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||
| 574 | void QMetaObjectBuilder::removeConstructor(int index) | - | ||||||||||||||||||||||||||||||
| 575 | { | - | ||||||||||||||||||||||||||||||
| 576 | if (index >= 0 &&uint(
| 0-1 | ||||||||||||||||||||||||||||||
| 577 | d->constructors.removeAterase(d->constructors.begin() + index); executed 1 time by 1 test: d->constructors.erase(d->constructors.begin() + index);Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 578 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 579 | - | |||||||||||||||||||||||||||||||
| 580 | - | |||||||||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||||||||
| 582 | - | |||||||||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||||||||
| 584 | - | |||||||||||||||||||||||||||||||
| 585 | - | |||||||||||||||||||||||||||||||
| 586 | void QMetaObjectBuilder::removeProperty(int index) | - | ||||||||||||||||||||||||||||||
| 587 | { | - | ||||||||||||||||||||||||||||||
| 588 | if (index >= 0 &&uint(
| 0-1 | ||||||||||||||||||||||||||||||
| 589 | d->properties.removeAterase(d->properties.begin() + index); executed 1 time by 1 test: d->properties.erase(d->properties.begin() + index);Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 590 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 591 | void QMetaObjectBuilder::removeEnumerator(int index) | - | ||||||||||||||||||||||||||||||
| 592 | { | - | ||||||||||||||||||||||||||||||
| 593 | if (index >= 0 &&uint(
| 0-1 | ||||||||||||||||||||||||||||||
| 594 | d->enumerators.removeAterase(d->enumerators.begin() + index); executed 1 time by 1 test: d->enumerators.erase(d->enumerators.begin() + index);Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 595 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 596 | void QMetaObjectBuilder::removeClassInfo(int index) | - | ||||||||||||||||||||||||||||||
| 597 | { | - | ||||||||||||||||||||||||||||||
| 598 | if (index >= 0 && index < d->classInfoNames.size()) { | - | ||||||||||||||||||||||||||||||
| 599 | d->classInfoNames.removeAt(index); | - | ||||||||||||||||||||||||||||||
| 600 | d->classInfoValues.removeAt(index); | - | ||||||||||||||||||||||||||||||
| 601 | } | - | ||||||||||||||||||||||||||||||
| 602 | } | - | ||||||||||||||||||||||||||||||
| 603 | void QMetaObjectBuilder::removeRelatedMetaObject(int index) | - | ||||||||||||||||||||||||||||||
| 604 | { | - | ||||||||||||||||||||||||||||||
| 605 | if (index >= 0 && index < d->relatedMetaObjects.size()) | - | ||||||||||||||||||||||||||||||
| 606 | d->relatedMetaObjects.removeAt(index); | - | ||||||||||||||||||||||||||||||
| 607 | } | - | ||||||||||||||||||||||||||||||
| 608 | - | |||||||||||||||||||||||||||||||
| 609 | - | |||||||||||||||||||||||||||||||
| 610 | - | |||||||||||||||||||||||||||||||
| 611 | - | |||||||||||||||||||||||||||||||
| 612 | - | |||||||||||||||||||||||||||||||
| 613 | - | |||||||||||||||||||||||||||||||
| 614 | - | |||||||||||||||||||||||||||||||
| 615 | int QMetaObjectBuilder::indexOfMethod(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 616 | { | - | ||||||||||||||||||||||||||||||
| 617 | QByteArray sig = QMetaObject::normalizedSignature(signature); | - | ||||||||||||||||||||||||||||||
| 618 | for (int index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 619 | if (sig == d->methods[index].method.signature
| 7-13 | ||||||||||||||||||||||||||||||
| 620 | return executed 7 times by 1 test: index;int(&method - &d->methods.front());return int(&method - &d->methods.front());Executed by:
executed 7 times by 1 test: return int(&method - &d->methods.front());Executed by:
| 7 | ||||||||||||||||||||||||||||||
| 621 | } executed 13 times by 1 test: end of blockExecuted by:
| 13 | ||||||||||||||||||||||||||||||
| 622 | return executed 4 times by 1 test: -1;return -1;Executed by:
executed 4 times by 1 test: return -1;Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 623 | } | - | ||||||||||||||||||||||||||||||
| 624 | - | |||||||||||||||||||||||||||||||
| 625 | - | |||||||||||||||||||||||||||||||
| 626 | - | |||||||||||||||||||||||||||||||
| 627 | - | |||||||||||||||||||||||||||||||
| 628 | - | |||||||||||||||||||||||||||||||
| 629 | - | |||||||||||||||||||||||||||||||
| 630 | - | |||||||||||||||||||||||||||||||
| 631 | int QMetaObjectBuilder::indexOfSignal(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 632 | { | - | ||||||||||||||||||||||||||||||
| 633 | QByteArray sig = QMetaObject::normalizedSignature(signature); | - | ||||||||||||||||||||||||||||||
| 634 | for (int index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 635 | if (sig == d->methods[index].signature && | 0-5 | ||||||||||||||||||||||||||||||
d->methods[index].method.
| ||||||||||||||||||||||||||||||||
| 636 | return executed 2 times by 1 test: index;int(&method - &d->methods.front());return int(&method - &d->methods.front());Executed by:
executed 2 times by 1 test: return int(&method - &d->methods.front());Executed by:
| 2 | ||||||||||||||||||||||||||||||
| 637 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||
| 638 | return executed 1 time by 1 test: -1;return -1;Executed by:
executed 1 time by 1 test: return -1;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 639 | } | - | ||||||||||||||||||||||||||||||
| 640 | - | |||||||||||||||||||||||||||||||
| 641 | - | |||||||||||||||||||||||||||||||
| 642 | - | |||||||||||||||||||||||||||||||
| 643 | - | |||||||||||||||||||||||||||||||
| 644 | - | |||||||||||||||||||||||||||||||
| 645 | - | |||||||||||||||||||||||||||||||
| 646 | - | |||||||||||||||||||||||||||||||
| 647 | int QMetaObjectBuilder::indexOfSlot(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 648 | { | - | ||||||||||||||||||||||||||||||
| 649 | QByteArray sig = QMetaObject::normalizedSignature(signature); | - | ||||||||||||||||||||||||||||||
| 650 | for (int index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 651 | if (sig == d->methods[index].signature && | 0-5 | ||||||||||||||||||||||||||||||
d->methods[index].method.
| ||||||||||||||||||||||||||||||||
| 652 | return executed 2 times by 1 test: index;int(&method - &d->methods.front());return int(&method - &d->methods.front());Executed by:
executed 2 times by 1 test: return int(&method - &d->methods.front());Executed by:
| 2 | ||||||||||||||||||||||||||||||
| 653 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||
| 654 | return executed 1 time by 1 test: -1;return -1;Executed by:
executed 1 time by 1 test: return -1;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 655 | } | - | ||||||||||||||||||||||||||||||
| 656 | - | |||||||||||||||||||||||||||||||
| 657 | - | |||||||||||||||||||||||||||||||
| 658 | - | |||||||||||||||||||||||||||||||
| 659 | - | |||||||||||||||||||||||||||||||
| 660 | - | |||||||||||||||||||||||||||||||
| 661 | - | |||||||||||||||||||||||||||||||
| 662 | - | |||||||||||||||||||||||||||||||
| 663 | int QMetaObjectBuilder::indexOfConstructor(const QByteArray& signature) | - | ||||||||||||||||||||||||||||||
| 664 | { | - | ||||||||||||||||||||||||||||||
| 665 | QByteArray sig = QMetaObject::normalizedSignature(signature); | - | ||||||||||||||||||||||||||||||
| 666 | for (int index = 0; index <const auto &constructor : d->constructors.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 667 | if (sig == d->constructors[index].constructor.signature
| 3-5 | ||||||||||||||||||||||||||||||
| 668 | return executed 3 times by 1 test: index;int(&constructor - &d->constructors.front());return int(&constructor - &d->constructors.front());Executed by:
executed 3 times by 1 test: return int(&constructor - &d->constructors.front());Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 669 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||||||||||||||||||||||||||
| 670 | return executed 3 times by 1 test: -1;return -1;Executed by:
executed 3 times by 1 test: return -1;Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 671 | } | - | ||||||||||||||||||||||||||||||
| 672 | - | |||||||||||||||||||||||||||||||
| 673 | - | |||||||||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||||||||
| 675 | - | |||||||||||||||||||||||||||||||
| 676 | - | |||||||||||||||||||||||||||||||
| 677 | - | |||||||||||||||||||||||||||||||
| 678 | - | |||||||||||||||||||||||||||||||
| 679 | int QMetaObjectBuilder::indexOfProperty(const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 680 | { | - | ||||||||||||||||||||||||||||||
| 681 | for (int index = 0; index <const auto &property : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 682 | if (name == d->properties[index].property.name
| 3-5 | ||||||||||||||||||||||||||||||
| 683 | return executed 3 times by 1 test: index;int(&property - &d->properties.front());return int(&property - &d->properties.front());Executed by:
executed 3 times by 1 test: return int(&property - &d->properties.front());Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 684 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||||||||||||||||||||||||||
| 685 | return executed 3 times by 1 test: -1;return -1;Executed by:
executed 3 times by 1 test: return -1;Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 686 | } | - | ||||||||||||||||||||||||||||||
| 687 | - | |||||||||||||||||||||||||||||||
| 688 | - | |||||||||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||||||||
| 690 | - | |||||||||||||||||||||||||||||||
| 691 | - | |||||||||||||||||||||||||||||||
| 692 | - | |||||||||||||||||||||||||||||||
| 693 | - | |||||||||||||||||||||||||||||||
| 694 | int QMetaObjectBuilder::indexOfEnumerator(const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 695 | { | - | ||||||||||||||||||||||||||||||
| 696 | for (int index = 0; index <const auto &enumerator : d->enumerators.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 697 | if (name == d->enumerators[index].enumerator.name
| 3-5 | ||||||||||||||||||||||||||||||
| 698 | return executed 3 times by 1 test: index;int(&enumerator - &d->enumerators.front());return int(&enumerator - &d->enumerators.front());Executed by:
executed 3 times by 1 test: return int(&enumerator - &d->enumerators.front());Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 699 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||||||||||||||||||||||||||
| 700 | return executed 3 times by 1 test: -1;return -1;Executed by:
executed 3 times by 1 test: return -1;Executed by:
| 3 | ||||||||||||||||||||||||||||||
| 701 | } | - | ||||||||||||||||||||||||||||||
| 702 | int QMetaObjectBuilder::indexOfClassInfo(const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 703 | { | - | ||||||||||||||||||||||||||||||
| 704 | for (int index = 0; index < d->classInfoNames.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 705 | if (name == d->classInfoNames[index]) | - | ||||||||||||||||||||||||||||||
| 706 | return index; | - | ||||||||||||||||||||||||||||||
| 707 | } | - | ||||||||||||||||||||||||||||||
| 708 | return -1; | - | ||||||||||||||||||||||||||||||
| 709 | } | - | ||||||||||||||||||||||||||||||
| 710 | QMetaStringTable::QMetaStringTable(const QByteArray &className) | - | ||||||||||||||||||||||||||||||
| 711 | : m_index(0) | - | ||||||||||||||||||||||||||||||
| 712 | , m_className(className) | - | ||||||||||||||||||||||||||||||
| 713 | { | - | ||||||||||||||||||||||||||||||
| 714 | const int index = enter(m_className); | - | ||||||||||||||||||||||||||||||
| 715 | ((!(index == 0)) ? qt_assert("index == 0",__FILE__,10811083) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 716 | (void)index;; | - | ||||||||||||||||||||||||||||||
| 717 | } | - | ||||||||||||||||||||||||||||||
| 718 | - | |||||||||||||||||||||||||||||||
| 719 | - | |||||||||||||||||||||||||||||||
| 720 | - | |||||||||||||||||||||||||||||||
| 721 | int QMetaStringTable::enter(const QByteArray &value) | - | ||||||||||||||||||||||||||||||
| 722 | { | - | ||||||||||||||||||||||||||||||
| 723 | Entries::iterator it = m_entries.find(value); | - | ||||||||||||||||||||||||||||||
| 724 | if (it != m_entries.end()) | - | ||||||||||||||||||||||||||||||
| 725 | return it.value(); | - | ||||||||||||||||||||||||||||||
| 726 | int pos = m_index; | - | ||||||||||||||||||||||||||||||
| 727 | m_entries.insert(value, pos); | - | ||||||||||||||||||||||||||||||
| 728 | ++m_index; | - | ||||||||||||||||||||||||||||||
| 729 | return pos; | - | ||||||||||||||||||||||||||||||
| 730 | } | - | ||||||||||||||||||||||||||||||
| 731 | - | |||||||||||||||||||||||||||||||
| 732 | int QMetaStringTable::preferredAlignment() | - | ||||||||||||||||||||||||||||||
| 733 | { | - | ||||||||||||||||||||||||||||||
| 734 | return alignof(QByteArrayData); | - | ||||||||||||||||||||||||||||||
| 735 | } | - | ||||||||||||||||||||||||||||||
| 736 | - | |||||||||||||||||||||||||||||||
| 737 | - | |||||||||||||||||||||||||||||||
| 738 | int QMetaStringTable::blobSize() const | - | ||||||||||||||||||||||||||||||
| 739 | { | - | ||||||||||||||||||||||||||||||
| 740 | int size = m_entries.size() * sizeof(QByteArrayData); | - | ||||||||||||||||||||||||||||||
| 741 | Entries::const_iterator it; | - | ||||||||||||||||||||||||||||||
| 742 | for (it = m_entries.constBegin(); it != m_entries.constEnd(); ++it) | - | ||||||||||||||||||||||||||||||
| 743 | size += it.key().size() + 1; | - | ||||||||||||||||||||||||||||||
| 744 | return size; | - | ||||||||||||||||||||||||||||||
| 745 | } | - | ||||||||||||||||||||||||||||||
| 746 | - | |||||||||||||||||||||||||||||||
| 747 | static void writeString(char *out, int i, const QByteArray &str, | - | ||||||||||||||||||||||||||||||
| 748 | const int offsetOfStringdataMember, int &stringdataOffset) | - | ||||||||||||||||||||||||||||||
| 749 | { | - | ||||||||||||||||||||||||||||||
| 750 | int size = str.size(); | - | ||||||||||||||||||||||||||||||
| 751 | qptrdiff offset = offsetOfStringdataMember + stringdataOffset | - | ||||||||||||||||||||||||||||||
| 752 | - i * sizeof(QByteArrayData); | - | ||||||||||||||||||||||||||||||
| 753 | const QByteArrayData data = | - | ||||||||||||||||||||||||||||||
| 754 | { { { -1 } }, size, 0, 0, offset }; | - | ||||||||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||||||||
| 756 | memcpy(out + i * sizeof(QByteArrayData), &data, sizeof(QByteArrayData)); | - | ||||||||||||||||||||||||||||||
| 757 | - | |||||||||||||||||||||||||||||||
| 758 | memcpy(out + offsetOfStringdataMember + stringdataOffset, str.constData(), size); | - | ||||||||||||||||||||||||||||||
| 759 | out[offsetOfStringdataMember + stringdataOffset + size] = '\0'; | - | ||||||||||||||||||||||||||||||
| 760 | - | |||||||||||||||||||||||||||||||
| 761 | stringdataOffset += size + 1; | - | ||||||||||||||||||||||||||||||
| 762 | } | - | ||||||||||||||||||||||||||||||
| 763 | - | |||||||||||||||||||||||||||||||
| 764 | - | |||||||||||||||||||||||||||||||
| 765 | - | |||||||||||||||||||||||||||||||
| 766 | - | |||||||||||||||||||||||||||||||
| 767 | - | |||||||||||||||||||||||||||||||
| 768 | void QMetaStringTable::writeBlob(char *out) const | - | ||||||||||||||||||||||||||||||
| 769 | { | - | ||||||||||||||||||||||||||||||
| 770 | ((!(!(reinterpret_cast<quintptr>(out) & (preferredAlignment()-1)))) ? qt_assert("!(reinterpret_cast<quintptr>(out) & (preferredAlignment()-1))",__FILE__,11361138) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 771 | - | |||||||||||||||||||||||||||||||
| 772 | int offsetOfStringdataMember = m_entries.size() * sizeof(QByteArrayData); | - | ||||||||||||||||||||||||||||||
| 773 | int stringdataOffset = 0; | - | ||||||||||||||||||||||||||||||
| 774 | - | |||||||||||||||||||||||||||||||
| 775 | - | |||||||||||||||||||||||||||||||
| 776 | writeString(out, 0, m_className, offsetOfStringdataMember, stringdataOffset); | - | ||||||||||||||||||||||||||||||
| 777 | - | |||||||||||||||||||||||||||||||
| 778 | for (Entries::ConstIterator it = m_entries.constBegin(), end = m_entries.constEnd(); | - | ||||||||||||||||||||||||||||||
| 779 | it != end; ++it) { | - | ||||||||||||||||||||||||||||||
| 780 | const int i = it.value(); | - | ||||||||||||||||||||||||||||||
| 781 | if (i == 0) | - | ||||||||||||||||||||||||||||||
| 782 | continue; | - | ||||||||||||||||||||||||||||||
| 783 | const QByteArray &str = it.key(); | - | ||||||||||||||||||||||||||||||
| 784 | - | |||||||||||||||||||||||||||||||
| 785 | writeString(out, i, str, offsetOfStringdataMember, stringdataOffset); | - | ||||||||||||||||||||||||||||||
| 786 | } | - | ||||||||||||||||||||||||||||||
| 787 | } | - | ||||||||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||||||||
| 789 | - | |||||||||||||||||||||||||||||||
| 790 | - | |||||||||||||||||||||||||||||||
| 791 | - | |||||||||||||||||||||||||||||||
| 792 | static int aggregateParameterCount(const QVectorstd::vector<QMetaMethodBuilderPrivate> &methods) | - | ||||||||||||||||||||||||||||||
| 793 | { | - | ||||||||||||||||||||||||||||||
| 794 | int sum = 0; | - | ||||||||||||||||||||||||||||||
| 795 | for (int i = 0; i <const auto &method : methods.size(); ++i) | - | ||||||||||||||||||||||||||||||
| 796 | sum += methodsmethod.at(i).parameterCount() + 1; executed 258 times by 1 test: sum += method.parameterCount() + 1;Executed by:
| 258 | ||||||||||||||||||||||||||||||
| 797 | return executed 72 times by 1 test: sum;return sum;Executed by:
executed 72 times by 1 test: return sum;Executed by:
| 72 | ||||||||||||||||||||||||||||||
| 798 | } | - | ||||||||||||||||||||||||||||||
| 799 | - | |||||||||||||||||||||||||||||||
| 800 | - | |||||||||||||||||||||||||||||||
| 801 | - | |||||||||||||||||||||||||||||||
| 802 | - | |||||||||||||||||||||||||||||||
| 803 | - | |||||||||||||||||||||||||||||||
| 804 | static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, | - | ||||||||||||||||||||||||||||||
| 805 | int expectedSize, bool relocatable) | - | ||||||||||||||||||||||||||||||
| 806 | { | - | ||||||||||||||||||||||||||||||
| 807 | (void)expectedSize;; | - | ||||||||||||||||||||||||||||||
| 808 | int size = 0; | - | ||||||||||||||||||||||||||||||
| 809 | int dataIndex; | - | ||||||||||||||||||||||||||||||
| 810 | int paramsIndex; | - | ||||||||||||||||||||||||||||||
| 811 | int enumIndex; | - | ||||||||||||||||||||||||||||||
| 812 | int index; | - | ||||||||||||||||||||||||||||||
| 813 | bool hasRevisionedMethods = d->hasRevisionedMethods(); | - | ||||||||||||||||||||||||||||||
| 814 | bool hasRevisionedProperties = d->hasRevisionedProperties(); | - | ||||||||||||||||||||||||||||||
| 815 | bool hasNotifySignals = false; | - | ||||||||||||||||||||||||||||||
| 816 | - | |||||||||||||||||||||||||||||||
| 817 | if (relocatable
| 2-34 | ||||||||||||||||||||||||||||||
| 818 | (d->relatedMetaObjects.size() > 0
| 0-2 | ||||||||||||||||||||||||||||||
| 819 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
| 820 | - | |||||||||||||||||||||||||||||||
| 821 | - | |||||||||||||||||||||||||||||||
| 822 | QMetaObject *meta = reinterpret_cast<QMetaObject *>(buf); | - | ||||||||||||||||||||||||||||||
| 823 | size += sizeof(QMetaObject); | - | ||||||||||||||||||||||||||||||
| 824 | (size) = ((size) + sizeof(int) - 1) & ~(sizeof(int) - 1); | - | ||||||||||||||||||||||||||||||
| 825 | if (buf
| 18 | ||||||||||||||||||||||||||||||
| 826 | if (!relocatable
executed 17 times by 1 test: meta->d.superdata = d->superClass;Executed by:
| 1-17 | ||||||||||||||||||||||||||||||
| 827 | meta->d.relatedMetaObjects = 0; | - | ||||||||||||||||||||||||||||||
| 828 | meta->d.extradata = 0; | - | ||||||||||||||||||||||||||||||
| 829 | meta->d.static_metacall = d->staticMetacallFunction; | - | ||||||||||||||||||||||||||||||
| 830 | } executed 18 times by 1 test: end of blockExecuted by:
| 18 | ||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||
| 832 | - | |||||||||||||||||||||||||||||||
| 833 | QMetaObjectPrivate *pmeta | - | ||||||||||||||||||||||||||||||
| 834 | = reinterpret_cast<QMetaObjectPrivate *>(buf + size); | - | ||||||||||||||||||||||||||||||
| 835 | int pmetaSize = size; | - | ||||||||||||||||||||||||||||||
| 836 | dataIndex = MetaObjectPrivateFieldCount; | - | ||||||||||||||||||||||||||||||
| 837 | for (index = 0; index <const auto &property : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 838 | if (d->properties[index].property.
| 2-32 | ||||||||||||||||||||||||||||||
| 839 | hasNotifySignals = true; | - | ||||||||||||||||||||||||||||||
| 840 | break; executed 32 times by 1 test: break;Executed by:
| 32 | ||||||||||||||||||||||||||||||
| 841 | } | - | ||||||||||||||||||||||||||||||
| 842 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 843 | int methodParametersDataSize = | - | ||||||||||||||||||||||||||||||
| 844 | ((aggregateParameterCount(d->methods) | - | ||||||||||||||||||||||||||||||
| 845 | + aggregateParameterCount(d->constructors)) * 2) | - | ||||||||||||||||||||||||||||||
| 846 | - int(d->methods.size()()) | - | ||||||||||||||||||||||||||||||
| 847 | - int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 848 | if (buf
| 18 | ||||||||||||||||||||||||||||||
| 849 | static_assert(bool(QMetaObjectPrivate::OutputRevision == 7), "QMetaObjectBuilder should generate the same version as moc"); | - | ||||||||||||||||||||||||||||||
| 850 | pmeta->revision = QMetaObjectPrivate::OutputRevision; | - | ||||||||||||||||||||||||||||||
| 851 | pmeta->flags = d->flags; | - | ||||||||||||||||||||||||||||||
| 852 | pmeta->className = 0; | - | ||||||||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||||||||
| 854 | - | |||||||||||||||||||||||||||||||
| 855 | pmeta->classInfoCount = d->classInfoNames.size(); | - | ||||||||||||||||||||||||||||||
| 856 | pmeta->classInfoData = dataIndex; | - | ||||||||||||||||||||||||||||||
| 857 | dataIndex += 2 * d->classInfoNames.size(); | - | ||||||||||||||||||||||||||||||
| 858 | - | |||||||||||||||||||||||||||||||
| 859 | pmeta->methodCount = int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 860 | pmeta->methodData = dataIndex; | - | ||||||||||||||||||||||||||||||
| 861 | dataIndex += 5 * int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 862 | if (hasRevisionedMethods
| 4-14 | ||||||||||||||||||||||||||||||
| 863 | dataIndex += int(d->methods.size();()); executed 4 times by 1 test: dataIndex += int(d->methods.size());Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 864 | paramsIndex = dataIndex; | - | ||||||||||||||||||||||||||||||
| 865 | dataIndex += methodParametersDataSize; | - | ||||||||||||||||||||||||||||||
| 866 | - | |||||||||||||||||||||||||||||||
| 867 | pmeta->propertyCount = int(d->properties.size();()); | - | ||||||||||||||||||||||||||||||
| 868 | pmeta->propertyData = dataIndex; | - | ||||||||||||||||||||||||||||||
| 869 | dataIndex += 3 * int(d->properties.size();()); | - | ||||||||||||||||||||||||||||||
| 870 | if (hasNotifySignals
| 2-16 | ||||||||||||||||||||||||||||||
| 871 | dataIndex += int(d->properties.size();()); executed 16 times by 1 test: dataIndex += int(d->properties.size());Executed by:
| 16 | ||||||||||||||||||||||||||||||
| 872 | if (hasRevisionedProperties
| 4-14 | ||||||||||||||||||||||||||||||
| 873 | dataIndex += int(d->properties.size();()); executed 4 times by 1 test: dataIndex += int(d->properties.size());Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 874 | - | |||||||||||||||||||||||||||||||
| 875 | pmeta->enumeratorCount = int(d->enumerators.size();()); | - | ||||||||||||||||||||||||||||||
| 876 | pmeta->enumeratorData = dataIndex; | - | ||||||||||||||||||||||||||||||
| 877 | dataIndex += 4 * int(d->enumerators.size();()); | - | ||||||||||||||||||||||||||||||
| 878 | - | |||||||||||||||||||||||||||||||
| 879 | pmeta->constructorCount = int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 880 | pmeta->constructorData = dataIndex; | - | ||||||||||||||||||||||||||||||
| 881 | dataIndex += 5 * int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 882 | } executed 18 times by 1 test: else {end of blockExecuted by:
| 18 | ||||||||||||||||||||||||||||||
| 883 | dataIndex += 2 * int(d->classInfoNames.size();()); | - | ||||||||||||||||||||||||||||||
| 884 | dataIndex += 5 * int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 885 | if (hasRevisionedMethods
| 4-14 | ||||||||||||||||||||||||||||||
| 886 | dataIndex += int(d->methods.size();()); executed 4 times by 1 test: dataIndex += int(d->methods.size());Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 887 | paramsIndex = dataIndex; | - | ||||||||||||||||||||||||||||||
| 888 | dataIndex += methodParametersDataSize; | - | ||||||||||||||||||||||||||||||
| 889 | dataIndex += 3 * int(d->properties.size();()); | - | ||||||||||||||||||||||||||||||
| 890 | if (hasNotifySignals
| 2-16 | ||||||||||||||||||||||||||||||
| 891 | dataIndex += int(d->properties.size();()); executed 16 times by 1 test: dataIndex += int(d->properties.size());Executed by:
| 16 | ||||||||||||||||||||||||||||||
| 892 | if (hasRevisionedProperties
| 4-14 | ||||||||||||||||||||||||||||||
| 893 | dataIndex += int(d->properties.size();()); executed 4 times by 1 test: dataIndex += int(d->properties.size());Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 894 | dataIndex += 4 * int(d->enumerators.size();()); | - | ||||||||||||||||||||||||||||||
| 895 | dataIndex += 5 * int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 896 | } executed 18 times by 1 test: end of blockExecuted by:
| 18 | ||||||||||||||||||||||||||||||
| 897 | - | |||||||||||||||||||||||||||||||
| 898 | - | |||||||||||||||||||||||||||||||
| 899 | enumIndex = dataIndex; | - | ||||||||||||||||||||||||||||||
| 900 | for (index = 0; index <const auto &enumerator : d->enumerators.size(); ++index) | - | ||||||||||||||||||||||||||||||
| 901 | { | 16 | ||||||||||||||||||||||||||||||
| QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);dataIndex += 2 * enumerator->.keys.size(); executed 16 times by 1 test: dataIndex += 2 * enumerator.keys.size();Executed by:
| ||||||||||||||||||||||||||||||||
| 902 | - | |||||||||||||||||||||||||||||||
| 903 | - | |||||||||||||||||||||||||||||||
| 904 | }++dataIndex; | - | ||||||||||||||||||||||||||||||
| 905 | - | |||||||||||||||||||||||||||||||
| 906 | - | |||||||||||||||||||||||||||||||
| 907 | int *data = reinterpret_cast<int *>(pmeta); | - | ||||||||||||||||||||||||||||||
| 908 | size += dataIndex * sizeof(int); | - | ||||||||||||||||||||||||||||||
| 909 | (size) = ((size) + sizeof(void *) - 1) & ~(sizeof(void *) - 1); | - | ||||||||||||||||||||||||||||||
| 910 | char *str = reinterpret_cast<char *>(buf + size); | - | ||||||||||||||||||||||||||||||
| 911 | if (buf
| 18 | ||||||||||||||||||||||||||||||
| 912 | if (relocatable
| 1-17 | ||||||||||||||||||||||||||||||
| 913 | meta->d.stringdata = reinterpret_cast<const QByteArrayData *>((quintptr)size); | - | ||||||||||||||||||||||||||||||
| 914 | meta->d.data = reinterpret_cast<uint *>((quintptr)pmetaSize); | - | ||||||||||||||||||||||||||||||
| 915 | } executed 1 time by 1 test: else {end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 916 | meta->d.stringdata = reinterpret_cast<const QByteArrayData *>(str); | - | ||||||||||||||||||||||||||||||
| 917 | meta->d.data = reinterpret_cast<uint *>(data); | - | ||||||||||||||||||||||||||||||
| 918 | } executed 17 times by 1 test: end of blockExecuted by:
| 17 | ||||||||||||||||||||||||||||||
| 919 | } | - | ||||||||||||||||||||||||||||||
| 920 | - | |||||||||||||||||||||||||||||||
| 921 | - | |||||||||||||||||||||||||||||||
| 922 | dataIndex = MetaObjectPrivateFieldCount; | - | ||||||||||||||||||||||||||||||
| 923 | - | |||||||||||||||||||||||||||||||
| 924 | QMetaStringTable strings(d->className); | - | ||||||||||||||||||||||||||||||
| 925 | - | |||||||||||||||||||||||||||||||
| 926 | - | |||||||||||||||||||||||||||||||
| 927 | ((!(!buf || dataIndex == pmeta->classInfoData)) ? qt_assert("!buf || dataIndex == pmeta->classInfoData",__FILE__,1295) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 928 | for (index = 0; index < d->classInfoNames.size()
| 16-36 | ||||||||||||||||||||||||||||||
| 929 | int name = strings.enter(d->classInfoNames[index]); | - | ||||||||||||||||||||||||||||||
| 930 | int value = strings.enter(d->classInfoValues[index]); | - | ||||||||||||||||||||||||||||||
| 931 | if (buf
| 8 | ||||||||||||||||||||||||||||||
| 932 | data[dataIndex] = name; | - | ||||||||||||||||||||||||||||||
| 933 | data[dataIndex + 1] = value; | - | ||||||||||||||||||||||||||||||
| 934 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||
| 935 | dataIndex += 2; | - | ||||||||||||||||||||||||||||||
| 936 | } executed 16 times by 1 test: end of blockExecuted by:
| 16 | ||||||||||||||||||||||||||||||
| 937 | - | |||||||||||||||||||||||||||||||
| 938 | - | |||||||||||||||||||||||||||||||
| 939 | ((!(!buf || dataIndex == pmeta->methodData)) ? qt_assert("!buf || dataIndex == pmeta->methodData",__FILE__,1307) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 940 | for (index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 941 | QMetaMethodBuilderPrivate *method = &(d->methods[index]);int name = strings.enter(method->.name()); | - | ||||||||||||||||||||||||||||||
| 942 | int argc = method->.parameterCount(); | - | ||||||||||||||||||||||||||||||
| 943 | int tag = strings.enter(method->.tag); | - | ||||||||||||||||||||||||||||||
| 944 | int attrs = method->.attributes; | - | ||||||||||||||||||||||||||||||
| 945 | if (buf
| 105 | ||||||||||||||||||||||||||||||
| 946 | data[dataIndex] = name; | - | ||||||||||||||||||||||||||||||
| 947 | data[dataIndex + 1] = argc; | - | ||||||||||||||||||||||||||||||
| 948 | data[dataIndex + 2] = paramsIndex; | - | ||||||||||||||||||||||||||||||
| 949 | data[dataIndex + 3] = tag; | - | ||||||||||||||||||||||||||||||
| 950 | data[dataIndex + 4] = attrs; | - | ||||||||||||||||||||||||||||||
| 951 | if (method->.methodType() == QMetaMethod::Signal
| 26-79 | ||||||||||||||||||||||||||||||
| 952 | pmeta->signalCount++; executed 26 times by 1 test: pmeta->signalCount++;Executed by:
| 26 | ||||||||||||||||||||||||||||||
| 953 | } executed 105 times by 1 test: end of blockExecuted by:
| 105 | ||||||||||||||||||||||||||||||
| 954 | dataIndex += 5; | - | ||||||||||||||||||||||||||||||
| 955 | paramsIndex += 1 + argc * 2; | - | ||||||||||||||||||||||||||||||
| 956 | } executed 210 times by 1 test: end of blockExecuted by:
| 210 | ||||||||||||||||||||||||||||||
| 957 | if (hasRevisionedMethods
| 8-28 | ||||||||||||||||||||||||||||||
| 958 | for (index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 959 | QMetaMethodBuilderPrivate *method = &(d->methods[index]);if (buf
| 40 | ||||||||||||||||||||||||||||||
| 960 | data[dataIndex] = method->.revision; executed 40 times by 1 test: data[dataIndex] = method.revision;Executed by:
| 40 | ||||||||||||||||||||||||||||||
| 961 | ++dataIndex; | - | ||||||||||||||||||||||||||||||
| 962 | } executed 80 times by 1 test: end of blockExecuted by:
| 80 | ||||||||||||||||||||||||||||||
| 963 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||
| 964 | - | |||||||||||||||||||||||||||||||
| 965 | - | |||||||||||||||||||||||||||||||
| 966 | ((!(!buf || dataIndex == pmeta->methodData + int(d->methods.size()()) * 5 + (hasRevisionedMethods ? int(d->methods.size()()) : 0))) ? qt_assert("!buf || dataIndex == pmeta->methodData + int(d->methods.size()()) * 5 + (hasRevisionedMethods ? int(d->methods.size()()) : 0)", | - | ||||||||||||||||||||||||||||||
| 967 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 968 | , | - | ||||||||||||||||||||||||||||||
| 969 | 13371335 | - | ||||||||||||||||||||||||||||||
| 970 | ) : qt_noop()) | - | ||||||||||||||||||||||||||||||
| 971 | ; | - | ||||||||||||||||||||||||||||||
| 972 | for (int x = 0; x < 2
| 36-72 | ||||||||||||||||||||||||||||||
| 973 | QVectorconst std::vector<QMetaMethodBuilderPrivate> &methods = (
| 36 | ||||||||||||||||||||||||||||||
| 974 | for (index = 0; index <const auto &method : methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 975 | QMetaMethodBuilderPrivate *method = &(methods[index]);const QList<QByteArray> paramTypeNames = method->.parameterTypes(); | - | ||||||||||||||||||||||||||||||
| 976 | int paramCount = paramTypeNames.size(); | - | ||||||||||||||||||||||||||||||
| 977 | for (int i = -1; i < paramCount
| 258-444 | ||||||||||||||||||||||||||||||
| 978 | const QByteArray &typeName = (
| 186-258 | ||||||||||||||||||||||||||||||
| 979 | int typeInfo; | - | ||||||||||||||||||||||||||||||
| 980 | if (QtPrivate::isBuiltinType(typeName)
| 0-444 | ||||||||||||||||||||||||||||||
| 981 | typeInfo = QMetaType::type(typeName); executed 444 times by 1 test: typeInfo = QMetaType::type(typeName);Executed by:
| 444 | ||||||||||||||||||||||||||||||
| 982 | else | - | ||||||||||||||||||||||||||||||
| 983 | typeInfo = IsUnresolvedType | strings.enter(typeName); never executed: typeInfo = IsUnresolvedType | strings.enter(typeName); | 0 | ||||||||||||||||||||||||||||||
| 984 | if (buf
| 222 | ||||||||||||||||||||||||||||||
| 985 | data[dataIndex] = typeInfo; executed 222 times by 1 test: data[dataIndex] = typeInfo;Executed by:
| 222 | ||||||||||||||||||||||||||||||
| 986 | ++dataIndex; | - | ||||||||||||||||||||||||||||||
| 987 | } executed 444 times by 1 test: end of blockExecuted by:
| 444 | ||||||||||||||||||||||||||||||
| 988 | - | |||||||||||||||||||||||||||||||
| 989 | QList<QByteArray> paramNames = method->.parameterNames; | - | ||||||||||||||||||||||||||||||
| 990 | while (paramNames.size() < paramCount
| 18-258 | ||||||||||||||||||||||||||||||
| 991 | paramNames.append(QByteArray()); executed 18 times by 1 test: paramNames.append(QByteArray());Executed by:
| 18 | ||||||||||||||||||||||||||||||
| 992 | for (int i = 0; i < paramCount
| 186-258 | ||||||||||||||||||||||||||||||
| 993 | int stringIndex = strings.enter(paramNames.at(i)); | - | ||||||||||||||||||||||||||||||
| 994 | if (buf
| 93 | ||||||||||||||||||||||||||||||
| 995 | data[dataIndex] = stringIndex; executed 93 times by 1 test: data[dataIndex] = stringIndex;Executed by:
| 93 | ||||||||||||||||||||||||||||||
| 996 | ++dataIndex; | - | ||||||||||||||||||||||||||||||
| 997 | } executed 186 times by 1 test: end of blockExecuted by:
| 186 | ||||||||||||||||||||||||||||||
| 998 | } executed 258 times by 1 test: end of blockExecuted by:
| 258 | ||||||||||||||||||||||||||||||
| 999 | } executed 72 times by 1 test: end of blockExecuted by:
| 72 | ||||||||||||||||||||||||||||||
| 1000 | - | |||||||||||||||||||||||||||||||
| 1001 | - | |||||||||||||||||||||||||||||||
| 1002 | ((!(!buf || dataIndex == pmeta->propertyData)) ? qt_assert("!buf || dataIndex == pmeta->propertyData",__FILE__,13691366) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 1003 | for (index = 0; index <const auto &prop : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1004 | QMetaPropertyBuilderPrivate *prop = &(d->properties[index]);int name = strings.enter(prop->.name); | - | ||||||||||||||||||||||||||||||
| 1005 | - | |||||||||||||||||||||||||||||||
| 1006 | int typeInfo; | - | ||||||||||||||||||||||||||||||
| 1007 | if (QtPrivate::isBuiltinType(prop->.type)
| 24-50 | ||||||||||||||||||||||||||||||
| 1008 | typeInfo = QMetaType::type(prop->.type); executed 50 times by 1 test: typeInfo = QMetaType::type(prop.type);Executed by:
| 50 | ||||||||||||||||||||||||||||||
| 1009 | else | - | ||||||||||||||||||||||||||||||
| 1010 | typeInfo = IsUnresolvedType | strings.enter(prop->.type); executed 24 times by 1 test: typeInfo = IsUnresolvedType | strings.enter(prop.type);Executed by:
| 24 | ||||||||||||||||||||||||||||||
| 1011 | - | |||||||||||||||||||||||||||||||
| 1012 | int flags = prop->.flags; | - | ||||||||||||||||||||||||||||||
| 1013 | - | |||||||||||||||||||||||||||||||
| 1014 | if (!QtPrivate::isBuiltinType(prop->.type)
| 24-50 | ||||||||||||||||||||||||||||||
| 1015 | flags |= EnumOrFlag; executed 24 times by 1 test: flags |= EnumOrFlag;Executed by:
| 24 | ||||||||||||||||||||||||||||||
| 1016 | - | |||||||||||||||||||||||||||||||
| 1017 | if (buf
| 37 | ||||||||||||||||||||||||||||||
| 1018 | data[dataIndex] = name; | - | ||||||||||||||||||||||||||||||
| 1019 | data[dataIndex + 1] = typeInfo; | - | ||||||||||||||||||||||||||||||
| 1020 | data[dataIndex + 2] = flags; | - | ||||||||||||||||||||||||||||||
| 1021 | } executed 37 times by 1 test: end of blockExecuted by:
| 37 | ||||||||||||||||||||||||||||||
| 1022 | dataIndex += 3; | - | ||||||||||||||||||||||||||||||
| 1023 | } executed 74 times by 1 test: end of blockExecuted by:
| 74 | ||||||||||||||||||||||||||||||
| 1024 | if (hasNotifySignals
| 4-32 | ||||||||||||||||||||||||||||||
| 1025 | for (index = 0; index <const auto &prop : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1026 | QMetaPropertyBuilderPrivate *prop = &(d->properties[index]);if (buf
| 36 | ||||||||||||||||||||||||||||||
| 1027 | if (prop->.notifySignal != -1
| 16-20 | ||||||||||||||||||||||||||||||
| 1028 | data[dataIndex] = prop->.notifySignal; executed 16 times by 1 test: data[dataIndex] = prop.notifySignal;Executed by:
| 16 | ||||||||||||||||||||||||||||||
| 1029 | else | - | ||||||||||||||||||||||||||||||
| 1030 | data[dataIndex] = 0; executed 20 times by 1 test: data[dataIndex] = 0;Executed by:
| 20 | ||||||||||||||||||||||||||||||
| 1031 | } | - | ||||||||||||||||||||||||||||||
| 1032 | ++dataIndex; | - | ||||||||||||||||||||||||||||||
| 1033 | } executed 72 times by 1 test: end of blockExecuted by:
| 72 | ||||||||||||||||||||||||||||||
| 1034 | } executed 32 times by 1 test: end of blockExecuted by:
| 32 | ||||||||||||||||||||||||||||||
| 1035 | if (hasRevisionedProperties
| 8-28 | ||||||||||||||||||||||||||||||
| 1036 | for (index = 0; index <const auto &prop : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1037 | QMetaPropertyBuilderPrivate *prop = &(d->properties[index]);if (buf
| 24 | ||||||||||||||||||||||||||||||
| 1038 | data[dataIndex] = prop->.revision; executed 24 times by 1 test: data[dataIndex] = prop.revision;Executed by:
| 24 | ||||||||||||||||||||||||||||||
| 1039 | ++dataIndex; | - | ||||||||||||||||||||||||||||||
| 1040 | } executed 48 times by 1 test: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||||||||
| 1041 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||
| 1042 | - | |||||||||||||||||||||||||||||||
| 1043 | - | |||||||||||||||||||||||||||||||
| 1044 | ((!(!buf || dataIndex == pmeta->enumeratorData)) ? qt_assert("!buf || dataIndex == pmeta->enumeratorData",__FILE__,14141408) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 1045 | for (index = 0; index <const auto &enumerator : d->enumerators.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1046 | QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);int name = strings.enter(enumerator->.name); | - | ||||||||||||||||||||||||||||||
| 1047 | int isFlag = (int)(enumerator->.isFlag); | - | ||||||||||||||||||||||||||||||
| 1048 | int count = enumerator->.keys.size(); | - | ||||||||||||||||||||||||||||||
| 1049 | int enumOffset = enumIndex; | - | ||||||||||||||||||||||||||||||
| 1050 | if (buf
| 8 | ||||||||||||||||||||||||||||||
| 1051 | data[dataIndex] = name; | - | ||||||||||||||||||||||||||||||
| 1052 | data[dataIndex + 1] = isFlag; | - | ||||||||||||||||||||||||||||||
| 1053 | data[dataIndex + 2] = count; | - | ||||||||||||||||||||||||||||||
| 1054 | data[dataIndex + 3] = enumOffset; | - | ||||||||||||||||||||||||||||||
| 1055 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||
| 1056 | for (int key = 0; key < count
| 16-32 | ||||||||||||||||||||||||||||||
| 1057 | int keyIndex = strings.enter(enumerator->.keys[key]); | - | ||||||||||||||||||||||||||||||
| 1058 | if (buf
| 16 | ||||||||||||||||||||||||||||||
| 1059 | data[enumOffset++] = keyIndex; | - | ||||||||||||||||||||||||||||||
| 1060 | data[enumOffset++] = enumerator->.values[key]; | - | ||||||||||||||||||||||||||||||
| 1061 | } executed 16 times by 1 test: end of blockExecuted by:
| 16 | ||||||||||||||||||||||||||||||
| 1062 | } executed 32 times by 1 test: end of blockExecuted by:
| 32 | ||||||||||||||||||||||||||||||
| 1063 | dataIndex += 4; | - | ||||||||||||||||||||||||||||||
| 1064 | enumIndex += 2 * count; | - | ||||||||||||||||||||||||||||||
| 1065 | } executed 16 times by 1 test: end of blockExecuted by:
| 16 | ||||||||||||||||||||||||||||||
| 1066 | - | |||||||||||||||||||||||||||||||
| 1067 | - | |||||||||||||||||||||||||||||||
| 1068 | ((!(!buf || dataIndex == pmeta->constructorData)) ? qt_assert("!buf || dataIndex == pmeta->constructorData",__FILE__,14391432) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 1069 | for (index = 0; index <const auto &ctor : d->constructors.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1070 | QMetaMethodBuilderPrivate *method = &(d->constructors[index]);int name = strings.enter(method->ctor.name()); | - | ||||||||||||||||||||||||||||||
| 1071 | int argc = method->ctor.parameterCount(); | - | ||||||||||||||||||||||||||||||
| 1072 | int tag = strings.enter(method->ctor.tag); | - | ||||||||||||||||||||||||||||||
| 1073 | int attrs = method->ctor.attributes; | - | ||||||||||||||||||||||||||||||
| 1074 | if (buf
| 24 | ||||||||||||||||||||||||||||||
| 1075 | data[dataIndex] = name; | - | ||||||||||||||||||||||||||||||
| 1076 | data[dataIndex + 1] = argc; | - | ||||||||||||||||||||||||||||||
| 1077 | data[dataIndex + 2] = paramsIndex; | - | ||||||||||||||||||||||||||||||
| 1078 | data[dataIndex + 3] = tag; | - | ||||||||||||||||||||||||||||||
| 1079 | data[dataIndex + 4] = attrs; | - | ||||||||||||||||||||||||||||||
| 1080 | } executed 24 times by 1 test: end of blockExecuted by:
| 24 | ||||||||||||||||||||||||||||||
| 1081 | dataIndex += 5; | - | ||||||||||||||||||||||||||||||
| 1082 | paramsIndex += 1 + argc * 2; | - | ||||||||||||||||||||||||||||||
| 1083 | } executed 48 times by 1 test: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||||||||
| 1084 | - | |||||||||||||||||||||||||||||||
| 1085 | size += strings.blobSize(); | - | ||||||||||||||||||||||||||||||
| 1086 | - | |||||||||||||||||||||||||||||||
| 1087 | if (buf
| 18 | ||||||||||||||||||||||||||||||
| 1088 | strings.writeBlob(str); executed 18 times by 1 test: strings.writeBlob(str);Executed by:
| 18 | ||||||||||||||||||||||||||||||
| 1089 | - | |||||||||||||||||||||||||||||||
| 1090 | - | |||||||||||||||||||||||||||||||
| 1091 | if (buf
| 18 | ||||||||||||||||||||||||||||||
| 1092 | data[enumIndex] = 0; executed 18 times by 1 test: data[enumIndex] = 0;Executed by:
| 18 | ||||||||||||||||||||||||||||||
| 1093 | - | |||||||||||||||||||||||||||||||
| 1094 | - | |||||||||||||||||||||||||||||||
| 1095 | if (d->relatedMetaObjects.size() > 0
| 8-28 | ||||||||||||||||||||||||||||||
| 1096 | (size) = ((size) + sizeof(QMetaObject *) - 1) & ~(sizeof(QMetaObject *) - 1); | - | ||||||||||||||||||||||||||||||
| 1097 | const QMetaObject **objects = | - | ||||||||||||||||||||||||||||||
| 1098 | reinterpret_cast<const QMetaObject **>(buf + size); | - | ||||||||||||||||||||||||||||||
| 1099 | if (buf
| 4 | ||||||||||||||||||||||||||||||
| 1100 | meta->d.relatedMetaObjects = objects; | - | ||||||||||||||||||||||||||||||
| 1101 | for (index = 0; index < d->relatedMetaObjects.size()
| 4 | ||||||||||||||||||||||||||||||
| 1102 | objects[index] = d->relatedMetaObjects[index]; executed 4 times by 1 test: objects[index] = d->relatedMetaObjects[index];Executed by:
| 4 | ||||||||||||||||||||||||||||||
| 1103 | objects[index] = 0; | - | ||||||||||||||||||||||||||||||
| 1104 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||||||||
| 1105 | size += sizeof(QMetaObject *) * (d->relatedMetaObjects.size() + 1); | - | ||||||||||||||||||||||||||||||
| 1106 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||
| 1107 | - | |||||||||||||||||||||||||||||||
| 1108 | - | |||||||||||||||||||||||||||||||
| 1109 | (size) = ((size) + sizeof(void *) - 1) & ~(sizeof(void *) - 1); | - | ||||||||||||||||||||||||||||||
| 1110 | ((!(!buf || size == expectedSize)) ? qt_assert("!buf || size == expectedSize",__FILE__,14821474) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 1111 | return executed 36 times by 1 test: size;return size;Executed by:
executed 36 times by 1 test: return size;Executed by:
| 36 | ||||||||||||||||||||||||||||||
| 1112 | } | - | ||||||||||||||||||||||||||||||
| 1113 | QMetaObject *QMetaObjectBuilder::toMetaObject() const | - | ||||||||||||||||||||||||||||||
| 1114 | { | - | ||||||||||||||||||||||||||||||
| 1115 | int size = buildMetaObject(d, 0, 0, false); | - | ||||||||||||||||||||||||||||||
| 1116 | char *buf = reinterpret_cast<char *>(malloc(size)); | - | ||||||||||||||||||||||||||||||
| 1117 | memset(buf, 0, size); | - | ||||||||||||||||||||||||||||||
| 1118 | buildMetaObject(d, buf, size, false); | - | ||||||||||||||||||||||||||||||
| 1119 | return reinterpret_cast<QMetaObject *>(buf); | - | ||||||||||||||||||||||||||||||
| 1120 | } | - | ||||||||||||||||||||||||||||||
| 1121 | QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const | - | ||||||||||||||||||||||||||||||
| 1122 | { | - | ||||||||||||||||||||||||||||||
| 1123 | int size = buildMetaObject(d, 0, 0, true); | - | ||||||||||||||||||||||||||||||
| 1124 | if (size == -1) { | - | ||||||||||||||||||||||||||||||
| 1125 | if (ok) *ok = false; | - | ||||||||||||||||||||||||||||||
| 1126 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1127 | } | - | ||||||||||||||||||||||||||||||
| 1128 | - | |||||||||||||||||||||||||||||||
| 1129 | QByteArray data; | - | ||||||||||||||||||||||||||||||
| 1130 | data.resize(size); | - | ||||||||||||||||||||||||||||||
| 1131 | char *buf = data.data(); | - | ||||||||||||||||||||||||||||||
| 1132 | memset(buf, 0, size); | - | ||||||||||||||||||||||||||||||
| 1133 | buildMetaObject(d, buf, size, true); | - | ||||||||||||||||||||||||||||||
| 1134 | if (ok) *ok = true; | - | ||||||||||||||||||||||||||||||
| 1135 | return data; | - | ||||||||||||||||||||||||||||||
| 1136 | } | - | ||||||||||||||||||||||||||||||
| 1137 | void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output, | - | ||||||||||||||||||||||||||||||
| 1138 | const QMetaObject *superclass, | - | ||||||||||||||||||||||||||||||
| 1139 | const QByteArray &data) | - | ||||||||||||||||||||||||||||||
| 1140 | { | - | ||||||||||||||||||||||||||||||
| 1141 | if (!output) | - | ||||||||||||||||||||||||||||||
| 1142 | return; | - | ||||||||||||||||||||||||||||||
| 1143 | - | |||||||||||||||||||||||||||||||
| 1144 | const char *buf = data.constData(); | - | ||||||||||||||||||||||||||||||
| 1145 | const QMetaObject *dataMo = reinterpret_cast<const QMetaObject *>(buf); | - | ||||||||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||||||||
| 1147 | quintptr stringdataOffset = (quintptr)dataMo->d.stringdata; | - | ||||||||||||||||||||||||||||||
| 1148 | quintptr dataOffset = (quintptr)dataMo->d.data; | - | ||||||||||||||||||||||||||||||
| 1149 | - | |||||||||||||||||||||||||||||||
| 1150 | output->d.superdata = superclass; | - | ||||||||||||||||||||||||||||||
| 1151 | output->d.stringdata = reinterpret_cast<const QByteArrayData *>(buf + stringdataOffset); | - | ||||||||||||||||||||||||||||||
| 1152 | output->d.data = reinterpret_cast<const uint *>(buf + dataOffset); | - | ||||||||||||||||||||||||||||||
| 1153 | output->d.extradata = 0; | - | ||||||||||||||||||||||||||||||
| 1154 | output->d.relatedMetaObjects = 0; | - | ||||||||||||||||||||||||||||||
| 1155 | output->d.static_metacall = 0; | - | ||||||||||||||||||||||||||||||
| 1156 | } | - | ||||||||||||||||||||||||||||||
| 1157 | QMetaObjectBuilder::StaticMetacallFunction QMetaObjectBuilder::staticMetacallFunction() const | - | ||||||||||||||||||||||||||||||
| 1158 | { | - | ||||||||||||||||||||||||||||||
| 1159 | return d->staticMetacallFunction; | - | ||||||||||||||||||||||||||||||
| 1160 | } | - | ||||||||||||||||||||||||||||||
| 1161 | - | |||||||||||||||||||||||||||||||
| 1162 | - | |||||||||||||||||||||||||||||||
| 1163 | - | |||||||||||||||||||||||||||||||
| 1164 | - | |||||||||||||||||||||||||||||||
| 1165 | - | |||||||||||||||||||||||||||||||
| 1166 | - | |||||||||||||||||||||||||||||||
| 1167 | - | |||||||||||||||||||||||||||||||
| 1168 | void QMetaObjectBuilder::setStaticMetacallFunction | - | ||||||||||||||||||||||||||||||
| 1169 | (QMetaObjectBuilder::StaticMetacallFunction value) | - | ||||||||||||||||||||||||||||||
| 1170 | { | - | ||||||||||||||||||||||||||||||
| 1171 | d->staticMetacallFunction = value; | - | ||||||||||||||||||||||||||||||
| 1172 | } | - | ||||||||||||||||||||||||||||||
| 1173 | void QMetaObjectBuilder::serialize(QDataStream& stream) const | - | ||||||||||||||||||||||||||||||
| 1174 | { | - | ||||||||||||||||||||||||||||||
| 1175 | int index; | - | ||||||||||||||||||||||||||||||
| 1176 | - | |||||||||||||||||||||||||||||||
| 1177 | - | |||||||||||||||||||||||||||||||
| 1178 | stream << d->className; | - | ||||||||||||||||||||||||||||||
| 1179 | if (d->superClass
| 0-2 | ||||||||||||||||||||||||||||||
| 1180 | stream << QByteArray(d->superClass->className()); executed 2 times by 1 test: stream << QByteArray(d->superClass->className());Executed by:
| 2 | ||||||||||||||||||||||||||||||
| 1181 | else | - | ||||||||||||||||||||||||||||||
| 1182 | stream << QByteArray(); never executed: stream << QByteArray(); | 0 | ||||||||||||||||||||||||||||||
| 1183 | - | |||||||||||||||||||||||||||||||
| 1184 | - | |||||||||||||||||||||||||||||||
| 1185 | stream << d->classInfoNames.size(); | - | ||||||||||||||||||||||||||||||
| 1186 | stream << int(d->methods.size();()); | - | ||||||||||||||||||||||||||||||
| 1187 | stream << int(d->properties.size();()); | - | ||||||||||||||||||||||||||||||
| 1188 | stream << int(d->enumerators.size();()); | - | ||||||||||||||||||||||||||||||
| 1189 | stream << int(d->constructors.size();()); | - | ||||||||||||||||||||||||||||||
| 1190 | stream << d->relatedMetaObjects.size(); | - | ||||||||||||||||||||||||||||||
| 1191 | - | |||||||||||||||||||||||||||||||
| 1192 | - | |||||||||||||||||||||||||||||||
| 1193 | for (index = 0; index < d->classInfoNames.size()
| 2 | ||||||||||||||||||||||||||||||
| 1194 | stream << d->classInfoNames[index]; | - | ||||||||||||||||||||||||||||||
| 1195 | stream << d->classInfoValues[index]; | - | ||||||||||||||||||||||||||||||
| 1196 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1197 | - | |||||||||||||||||||||||||||||||
| 1198 | - | |||||||||||||||||||||||||||||||
| 1199 | for (index = 0; index <const auto &method : d->methods.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1200 | const QMetaMethodBuilderPrivate *method = &(d->methods[index]);stream << method->.signature; | - | ||||||||||||||||||||||||||||||
| 1201 | stream << method->.returnType; | - | ||||||||||||||||||||||||||||||
| 1202 | stream << method->.parameterNames; | - | ||||||||||||||||||||||||||||||
| 1203 | stream << method->.tag; | - | ||||||||||||||||||||||||||||||
| 1204 | stream << method->.attributes; | - | ||||||||||||||||||||||||||||||
| 1205 | if (method->.revision
| 1-9 | ||||||||||||||||||||||||||||||
| 1206 | stream << method->.revision; executed 1 time by 1 test: stream << method.revision;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 1207 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||
| 1208 | - | |||||||||||||||||||||||||||||||
| 1209 | - | |||||||||||||||||||||||||||||||
| 1210 | for (index = 0; index <const auto &property : d->properties.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1211 | const QMetaPropertyBuilderPrivate *property = &(d->properties[index]);stream << property->.name; | - | ||||||||||||||||||||||||||||||
| 1212 | stream << property->.type; | - | ||||||||||||||||||||||||||||||
| 1213 | stream << property->.flags; | - | ||||||||||||||||||||||||||||||
| 1214 | stream << property->.notifySignal; | - | ||||||||||||||||||||||||||||||
| 1215 | if (property->.revision
| 1-6 | ||||||||||||||||||||||||||||||
| 1216 | stream << property->.revision; executed 1 time by 1 test: stream << property.revision;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 1217 | } executed 7 times by 1 test: end of blockExecuted by:
| 7 | ||||||||||||||||||||||||||||||
| 1218 | - | |||||||||||||||||||||||||||||||
| 1219 | - | |||||||||||||||||||||||||||||||
| 1220 | for (index = 0; index <const auto &enumerator : d->enumerators.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1221 | const QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]);stream << enumerator->.name; | - | ||||||||||||||||||||||||||||||
| 1222 | stream << enumerator->.isFlag; | - | ||||||||||||||||||||||||||||||
| 1223 | stream << enumerator->.keys; | - | ||||||||||||||||||||||||||||||
| 1224 | stream << enumerator->.values; | - | ||||||||||||||||||||||||||||||
| 1225 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1226 | - | |||||||||||||||||||||||||||||||
| 1227 | - | |||||||||||||||||||||||||||||||
| 1228 | for (index = 0; index <const auto &ctor : d->constructors.size(); ++index) { | - | ||||||||||||||||||||||||||||||
| 1229 | const QMetaMethodBuilderPrivate *method = &(d->constructors[index]);stream << method->ctor.signature; | - | ||||||||||||||||||||||||||||||
| 1230 | stream << method->ctor.returnType; | - | ||||||||||||||||||||||||||||||
| 1231 | stream << method->ctor.parameterNames; | - | ||||||||||||||||||||||||||||||
| 1232 | stream << method->ctor.tag; | - | ||||||||||||||||||||||||||||||
| 1233 | stream << method->ctor.attributes; | - | ||||||||||||||||||||||||||||||
| 1234 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 1235 | - | |||||||||||||||||||||||||||||||
| 1236 | - | |||||||||||||||||||||||||||||||
| 1237 | for (index = 0; index < d->relatedMetaObjects.size()
| 1-2 | ||||||||||||||||||||||||||||||
| 1238 | const QMetaObject *meta = d->relatedMetaObjects[index]; | - | ||||||||||||||||||||||||||||||
| 1239 | stream << QByteArray(meta->className()); | - | ||||||||||||||||||||||||||||||
| 1240 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 1241 | - | |||||||||||||||||||||||||||||||
| 1242 | - | |||||||||||||||||||||||||||||||
| 1243 | - | |||||||||||||||||||||||||||||||
| 1244 | - | |||||||||||||||||||||||||||||||
| 1245 | stream << QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1246 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1247 | - | |||||||||||||||||||||||||||||||
| 1248 | - | |||||||||||||||||||||||||||||||
| 1249 | static const QMetaObject *resolveClassName | - | ||||||||||||||||||||||||||||||
| 1250 | (const QMap<QByteArray, const QMetaObject *>& references, | - | ||||||||||||||||||||||||||||||
| 1251 | const QByteArray& name) | - | ||||||||||||||||||||||||||||||
| 1252 | { | - | ||||||||||||||||||||||||||||||
| 1253 | if (name == QByteArray("QObject")) | - | ||||||||||||||||||||||||||||||
| 1254 | return &QObject::staticMetaObject; | - | ||||||||||||||||||||||||||||||
| 1255 | else | - | ||||||||||||||||||||||||||||||
| 1256 | return references.value(name, 0); | - | ||||||||||||||||||||||||||||||
| 1257 | } | - | ||||||||||||||||||||||||||||||
| 1258 | void QMetaObjectBuilder::deserialize | - | ||||||||||||||||||||||||||||||
| 1259 | (QDataStream& stream, | - | ||||||||||||||||||||||||||||||
| 1260 | const QMap<QByteArray, const QMetaObject *>& references) | - | ||||||||||||||||||||||||||||||
| 1261 | { | - | ||||||||||||||||||||||||||||||
| 1262 | QByteArray name; | - | ||||||||||||||||||||||||||||||
| 1263 | const QMetaObject *cl; | - | ||||||||||||||||||||||||||||||
| 1264 | int index; | - | ||||||||||||||||||||||||||||||
| 1265 | - | |||||||||||||||||||||||||||||||
| 1266 | - | |||||||||||||||||||||||||||||||
| 1267 | d->className.clear(); | - | ||||||||||||||||||||||||||||||
| 1268 | d->superClass = &QObject::staticMetaObject; | - | ||||||||||||||||||||||||||||||
| 1269 | d->classInfoNames.clear(); | - | ||||||||||||||||||||||||||||||
| 1270 | d->classInfoValues.clear(); | - | ||||||||||||||||||||||||||||||
| 1271 | d->methods.clear(); | - | ||||||||||||||||||||||||||||||
| 1272 | d->properties.clear(); | - | ||||||||||||||||||||||||||||||
| 1273 | d->enumerators.clear(); | - | ||||||||||||||||||||||||||||||
| 1274 | d->constructors.clear(); | - | ||||||||||||||||||||||||||||||
| 1275 | d->relatedMetaObjects.clear(); | - | ||||||||||||||||||||||||||||||
| 1276 | d->staticMetacallFunction = 0; | - | ||||||||||||||||||||||||||||||
| 1277 | - | |||||||||||||||||||||||||||||||
| 1278 | - | |||||||||||||||||||||||||||||||
| 1279 | stream >> d->className; | - | ||||||||||||||||||||||||||||||
| 1280 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1281 | if (name.isEmpty()
| 0-2 | ||||||||||||||||||||||||||||||
| 1282 | d->superClass = 0; | - | ||||||||||||||||||||||||||||||
| 1283 | } never executed: else if ((end of block
| 0-2 | ||||||||||||||||||||||||||||||
| 1284 | d->superClass = cl; | - | ||||||||||||||||||||||||||||||
| 1285 | } executed 2 times by 1 test: else {end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1286 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1287 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1288 | } | - | ||||||||||||||||||||||||||||||
| 1289 | - | |||||||||||||||||||||||||||||||
| 1290 | - | |||||||||||||||||||||||||||||||
| 1291 | int classInfoCount, methodCount, propertyCount; | - | ||||||||||||||||||||||||||||||
| 1292 | int enumeratorCount, constructorCount, relatedMetaObjectCount; | - | ||||||||||||||||||||||||||||||
| 1293 | stream >> classInfoCount; | - | ||||||||||||||||||||||||||||||
| 1294 | stream >> methodCount; | - | ||||||||||||||||||||||||||||||
| 1295 | stream >> propertyCount; | - | ||||||||||||||||||||||||||||||
| 1296 | stream >> enumeratorCount; | - | ||||||||||||||||||||||||||||||
| 1297 | stream >> constructorCount; | - | ||||||||||||||||||||||||||||||
| 1298 | stream >> relatedMetaObjectCount; | - | ||||||||||||||||||||||||||||||
| 1299 | if (classInfoCount < 0
| 0-2 | ||||||||||||||||||||||||||||||
| 1300 | propertyCount < 0
| 0-2 | ||||||||||||||||||||||||||||||
| 1301 | constructorCount < 0
| 0-2 | ||||||||||||||||||||||||||||||
| 1302 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1303 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1304 | } | - | ||||||||||||||||||||||||||||||
| 1305 | - | |||||||||||||||||||||||||||||||
| 1306 | - | |||||||||||||||||||||||||||||||
| 1307 | for (index = 0; index < classInfoCount
| 2 | ||||||||||||||||||||||||||||||
| 1308 | if (stream.status() != QDataStream::Ok
| 0-2 | ||||||||||||||||||||||||||||||
| 1309 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1310 | QByteArray value; | - | ||||||||||||||||||||||||||||||
| 1311 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1312 | stream >> value; | - | ||||||||||||||||||||||||||||||
| 1313 | addClassInfo(name, value); | - | ||||||||||||||||||||||||||||||
| 1314 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1315 | - | |||||||||||||||||||||||||||||||
| 1316 | - | |||||||||||||||||||||||||||||||
| 1317 | for (index = 0; index < methodCount
| 2-10 | ||||||||||||||||||||||||||||||
| 1318 | if (stream.status() != QDataStream::Ok
| 0-10 | ||||||||||||||||||||||||||||||
| 1319 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1320 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1321 | addMethod(name); | - | ||||||||||||||||||||||||||||||
| 1322 | QMetaMethodBuilderPrivate *method&method = &(d->methods[index]);]; | - | ||||||||||||||||||||||||||||||
| 1323 | stream >> method->.returnType; | - | ||||||||||||||||||||||||||||||
| 1324 | stream >> method->.parameterNames; | - | ||||||||||||||||||||||||||||||
| 1325 | stream >> method->.tag; | - | ||||||||||||||||||||||||||||||
| 1326 | stream >> method->.attributes; | - | ||||||||||||||||||||||||||||||
| 1327 | if (method->.attributes & MethodRevisioned
| 1-9 | ||||||||||||||||||||||||||||||
| 1328 | stream >> method->.revision; executed 1 time by 1 test: stream >> method.revision;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 1329 | if (method->.methodType() == QMetaMethod::Constructor
| 0-10 | ||||||||||||||||||||||||||||||
| 1330 | - | |||||||||||||||||||||||||||||||
| 1331 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1332 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1333 | } | - | ||||||||||||||||||||||||||||||
| 1334 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||
| 1335 | - | |||||||||||||||||||||||||||||||
| 1336 | - | |||||||||||||||||||||||||||||||
| 1337 | for (index = 0; index < propertyCount
| 2-7 | ||||||||||||||||||||||||||||||
| 1338 | if (stream.status() != QDataStream::Ok
| 0-7 | ||||||||||||||||||||||||||||||
| 1339 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1340 | QByteArray type; | - | ||||||||||||||||||||||||||||||
| 1341 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1342 | stream >> type; | - | ||||||||||||||||||||||||||||||
| 1343 | addProperty(name, type); | - | ||||||||||||||||||||||||||||||
| 1344 | QMetaPropertyBuilderPrivate *property&property = &(d->properties[index]);]; | - | ||||||||||||||||||||||||||||||
| 1345 | stream >> property->.flags; | - | ||||||||||||||||||||||||||||||
| 1346 | stream >> property->.notifySignal; | - | ||||||||||||||||||||||||||||||
| 1347 | if (property->.notifySignal < -1
| 0-7 | ||||||||||||||||||||||||||||||
| 1348 | property->.notifySignal >= int(d->methods.size())())
| 0-7 | ||||||||||||||||||||||||||||||
| 1349 | - | |||||||||||||||||||||||||||||||
| 1350 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1351 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1352 | } | - | ||||||||||||||||||||||||||||||
| 1353 | if (property->.notifySignal >= 0
| 1-6 | ||||||||||||||||||||||||||||||
| 1354 | d->methods[property->.notifySignal].methodType() != QMetaMethod::Signal
| 0-1 | ||||||||||||||||||||||||||||||
| 1355 | - | |||||||||||||||||||||||||||||||
| 1356 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1357 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1358 | } | - | ||||||||||||||||||||||||||||||
| 1359 | if (property->.flags & Revisioned
| 1-6 | ||||||||||||||||||||||||||||||
| 1360 | stream >> property->.revision; executed 1 time by 1 test: stream >> property.revision;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 1361 | } executed 7 times by 1 test: end of blockExecuted by:
| 7 | ||||||||||||||||||||||||||||||
| 1362 | - | |||||||||||||||||||||||||||||||
| 1363 | - | |||||||||||||||||||||||||||||||
| 1364 | for (index = 0; index < enumeratorCount
| 2 | ||||||||||||||||||||||||||||||
| 1365 | if (stream.status() != QDataStream::Ok
| 0-2 | ||||||||||||||||||||||||||||||
| 1366 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1367 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1368 | addEnumerator(name); | - | ||||||||||||||||||||||||||||||
| 1369 | QMetaEnumBuilderPrivate *enumerator&enumerator = &(d->enumerators[index]);]; | - | ||||||||||||||||||||||||||||||
| 1370 | stream >> enumerator->.isFlag; | - | ||||||||||||||||||||||||||||||
| 1371 | stream >> enumerator->.keys; | - | ||||||||||||||||||||||||||||||
| 1372 | stream >> enumerator->.values; | - | ||||||||||||||||||||||||||||||
| 1373 | if (enumerator->.keys.size() != enumerator->.values.size()
| 0-2 | ||||||||||||||||||||||||||||||
| 1374 | - | |||||||||||||||||||||||||||||||
| 1375 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1376 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1377 | } | - | ||||||||||||||||||||||||||||||
| 1378 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1379 | - | |||||||||||||||||||||||||||||||
| 1380 | - | |||||||||||||||||||||||||||||||
| 1381 | for (index = 0; index < constructorCount
| 1-2 | ||||||||||||||||||||||||||||||
| 1382 | if (stream.status() != QDataStream::Ok
| 0-1 | ||||||||||||||||||||||||||||||
| 1383 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1384 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1385 | addConstructor(name); | - | ||||||||||||||||||||||||||||||
| 1386 | QMetaMethodBuilderPrivate *method&method = &(d->constructors[index]);]; | - | ||||||||||||||||||||||||||||||
| 1387 | stream >> method->.returnType; | - | ||||||||||||||||||||||||||||||
| 1388 | stream >> method->.parameterNames; | - | ||||||||||||||||||||||||||||||
| 1389 | stream >> method->.tag; | - | ||||||||||||||||||||||||||||||
| 1390 | stream >> method->.attributes; | - | ||||||||||||||||||||||||||||||
| 1391 | if (method->.methodType() != QMetaMethod::Constructor
| 0-1 | ||||||||||||||||||||||||||||||
| 1392 | - | |||||||||||||||||||||||||||||||
| 1393 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1394 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1395 | } | - | ||||||||||||||||||||||||||||||
| 1396 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 1397 | - | |||||||||||||||||||||||||||||||
| 1398 | - | |||||||||||||||||||||||||||||||
| 1399 | for (index = 0; index < relatedMetaObjectCount
| 1-2 | ||||||||||||||||||||||||||||||
| 1400 | if (stream.status() != QDataStream::Ok
| 0-1 | ||||||||||||||||||||||||||||||
| 1401 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1402 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1403 | cl = resolveClassName(references, name); | - | ||||||||||||||||||||||||||||||
| 1404 | if (!cl
| 0-1 | ||||||||||||||||||||||||||||||
| 1405 | stream.setStatus(QDataStream::ReadCorruptData); | - | ||||||||||||||||||||||||||||||
| 1406 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 1407 | } | - | ||||||||||||||||||||||||||||||
| 1408 | addRelatedMetaObject(cl); | - | ||||||||||||||||||||||||||||||
| 1409 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||
| 1410 | - | |||||||||||||||||||||||||||||||
| 1411 | - | |||||||||||||||||||||||||||||||
| 1412 | stream >> name; | - | ||||||||||||||||||||||||||||||
| 1413 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||
| 1414 | QMetaMethodBuilderPrivate *QMetaMethodBuilder::d_func() const | - | ||||||||||||||||||||||||||||||
| 1415 | { | - | ||||||||||||||||||||||||||||||
| 1416 | - | |||||||||||||||||||||||||||||||
| 1417 | if (_mobj
| 0-631 | ||||||||||||||||||||||||||||||
| 1418 | return executed 528 times by 1 test: &(_mobj->d->methods[_index]);return &(_mobj->d->methods[_index]);Executed by:
executed 528 times by 1 test: return &(_mobj->d->methods[_index]);Executed by:
| 528 | ||||||||||||||||||||||||||||||
| 1419 | else if (_mobj
| 0-103 | ||||||||||||||||||||||||||||||
| 1420 | return executed 103 times by 1 test: &(_mobj->d->constructors[(-_index) - 1]);return &(_mobj->d->constructors[(-_index) - 1]);Executed by:
executed 103 times by 1 test: return &(_mobj->d->constructors[(-_index) - 1]);Executed by:
| 103 | ||||||||||||||||||||||||||||||
| 1421 | else | - | ||||||||||||||||||||||||||||||
| 1422 | return executed 11 times by 1 test: 0;return 0;Executed by:
executed 11 times by 1 test: return 0;Executed by:
| 11 | ||||||||||||||||||||||||||||||
| 1423 | } | - | ||||||||||||||||||||||||||||||
| 1424 | int QMetaMethodBuilder::index() const | - | ||||||||||||||||||||||||||||||
| 1425 | { | - | ||||||||||||||||||||||||||||||
| 1426 | if (_index >= 0) | - | ||||||||||||||||||||||||||||||
| 1427 | return _index; | - | ||||||||||||||||||||||||||||||
| 1428 | else | - | ||||||||||||||||||||||||||||||
| 1429 | return (-_index) - 1; | - | ||||||||||||||||||||||||||||||
| 1430 | } | - | ||||||||||||||||||||||||||||||
| 1431 | - | |||||||||||||||||||||||||||||||
| 1432 | - | |||||||||||||||||||||||||||||||
| 1433 | - | |||||||||||||||||||||||||||||||
| 1434 | - | |||||||||||||||||||||||||||||||
| 1435 | QMetaMethod::MethodType QMetaMethodBuilder::methodType() const | - | ||||||||||||||||||||||||||||||
| 1436 | { | - | ||||||||||||||||||||||||||||||
| 1437 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1438 | if (d) | - | ||||||||||||||||||||||||||||||
| 1439 | return d->methodType(); | - | ||||||||||||||||||||||||||||||
| 1440 | else | - | ||||||||||||||||||||||||||||||
| 1441 | return QMetaMethod::Method; | - | ||||||||||||||||||||||||||||||
| 1442 | } | - | ||||||||||||||||||||||||||||||
| 1443 | - | |||||||||||||||||||||||||||||||
| 1444 | - | |||||||||||||||||||||||||||||||
| 1445 | - | |||||||||||||||||||||||||||||||
| 1446 | - | |||||||||||||||||||||||||||||||
| 1447 | - | |||||||||||||||||||||||||||||||
| 1448 | - | |||||||||||||||||||||||||||||||
| 1449 | QByteArray QMetaMethodBuilder::signature() const | - | ||||||||||||||||||||||||||||||
| 1450 | { | - | ||||||||||||||||||||||||||||||
| 1451 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1452 | if (d) | - | ||||||||||||||||||||||||||||||
| 1453 | return d->signature; | - | ||||||||||||||||||||||||||||||
| 1454 | else | - | ||||||||||||||||||||||||||||||
| 1455 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1456 | } | - | ||||||||||||||||||||||||||||||
| 1457 | - | |||||||||||||||||||||||||||||||
| 1458 | - | |||||||||||||||||||||||||||||||
| 1459 | - | |||||||||||||||||||||||||||||||
| 1460 | - | |||||||||||||||||||||||||||||||
| 1461 | - | |||||||||||||||||||||||||||||||
| 1462 | - | |||||||||||||||||||||||||||||||
| 1463 | - | |||||||||||||||||||||||||||||||
| 1464 | QByteArray QMetaMethodBuilder::returnType() const | - | ||||||||||||||||||||||||||||||
| 1465 | { | - | ||||||||||||||||||||||||||||||
| 1466 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1467 | if (d) | - | ||||||||||||||||||||||||||||||
| 1468 | return d->returnType; | - | ||||||||||||||||||||||||||||||
| 1469 | else | - | ||||||||||||||||||||||||||||||
| 1470 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1471 | } | - | ||||||||||||||||||||||||||||||
| 1472 | void QMetaMethodBuilder::setReturnType(const QByteArray& value) | - | ||||||||||||||||||||||||||||||
| 1473 | { | - | ||||||||||||||||||||||||||||||
| 1474 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1475 | if (d) | - | ||||||||||||||||||||||||||||||
| 1476 | d->returnType = QMetaObject::normalizedType(value); | - | ||||||||||||||||||||||||||||||
| 1477 | } | - | ||||||||||||||||||||||||||||||
| 1478 | - | |||||||||||||||||||||||||||||||
| 1479 | - | |||||||||||||||||||||||||||||||
| 1480 | - | |||||||||||||||||||||||||||||||
| 1481 | - | |||||||||||||||||||||||||||||||
| 1482 | - | |||||||||||||||||||||||||||||||
| 1483 | - | |||||||||||||||||||||||||||||||
| 1484 | QList<QByteArray> QMetaMethodBuilder::parameterTypes() const | - | ||||||||||||||||||||||||||||||
| 1485 | { | - | ||||||||||||||||||||||||||||||
| 1486 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1487 | if (d) | - | ||||||||||||||||||||||||||||||
| 1488 | return d->parameterTypes(); | - | ||||||||||||||||||||||||||||||
| 1489 | else | - | ||||||||||||||||||||||||||||||
| 1490 | return QList<QByteArray>(); | - | ||||||||||||||||||||||||||||||
| 1491 | } | - | ||||||||||||||||||||||||||||||
| 1492 | - | |||||||||||||||||||||||||||||||
| 1493 | - | |||||||||||||||||||||||||||||||
| 1494 | - | |||||||||||||||||||||||||||||||
| 1495 | - | |||||||||||||||||||||||||||||||
| 1496 | - | |||||||||||||||||||||||||||||||
| 1497 | - | |||||||||||||||||||||||||||||||
| 1498 | QList<QByteArray> QMetaMethodBuilder::parameterNames() const | - | ||||||||||||||||||||||||||||||
| 1499 | { | - | ||||||||||||||||||||||||||||||
| 1500 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1501 | if (d) | - | ||||||||||||||||||||||||||||||
| 1502 | return d->parameterNames; | - | ||||||||||||||||||||||||||||||
| 1503 | else | - | ||||||||||||||||||||||||||||||
| 1504 | return QList<QByteArray>(); | - | ||||||||||||||||||||||||||||||
| 1505 | } | - | ||||||||||||||||||||||||||||||
| 1506 | - | |||||||||||||||||||||||||||||||
| 1507 | - | |||||||||||||||||||||||||||||||
| 1508 | - | |||||||||||||||||||||||||||||||
| 1509 | - | |||||||||||||||||||||||||||||||
| 1510 | - | |||||||||||||||||||||||||||||||
| 1511 | - | |||||||||||||||||||||||||||||||
| 1512 | void QMetaMethodBuilder::setParameterNames(const QList<QByteArray>& value) | - | ||||||||||||||||||||||||||||||
| 1513 | { | - | ||||||||||||||||||||||||||||||
| 1514 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1515 | if (d) | - | ||||||||||||||||||||||||||||||
| 1516 | d->parameterNames = value; | - | ||||||||||||||||||||||||||||||
| 1517 | } | - | ||||||||||||||||||||||||||||||
| 1518 | - | |||||||||||||||||||||||||||||||
| 1519 | - | |||||||||||||||||||||||||||||||
| 1520 | - | |||||||||||||||||||||||||||||||
| 1521 | - | |||||||||||||||||||||||||||||||
| 1522 | - | |||||||||||||||||||||||||||||||
| 1523 | - | |||||||||||||||||||||||||||||||
| 1524 | QByteArray QMetaMethodBuilder::tag() const | - | ||||||||||||||||||||||||||||||
| 1525 | { | - | ||||||||||||||||||||||||||||||
| 1526 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1527 | if (d) | - | ||||||||||||||||||||||||||||||
| 1528 | return d->tag; | - | ||||||||||||||||||||||||||||||
| 1529 | else | - | ||||||||||||||||||||||||||||||
| 1530 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1531 | } | - | ||||||||||||||||||||||||||||||
| 1532 | - | |||||||||||||||||||||||||||||||
| 1533 | - | |||||||||||||||||||||||||||||||
| 1534 | - | |||||||||||||||||||||||||||||||
| 1535 | - | |||||||||||||||||||||||||||||||
| 1536 | - | |||||||||||||||||||||||||||||||
| 1537 | - | |||||||||||||||||||||||||||||||
| 1538 | void QMetaMethodBuilder::setTag(const QByteArray& value) | - | ||||||||||||||||||||||||||||||
| 1539 | { | - | ||||||||||||||||||||||||||||||
| 1540 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1541 | if (d) | - | ||||||||||||||||||||||||||||||
| 1542 | d->tag = value; | - | ||||||||||||||||||||||||||||||
| 1543 | } | - | ||||||||||||||||||||||||||||||
| 1544 | QMetaMethod::Access QMetaMethodBuilder::access() const | - | ||||||||||||||||||||||||||||||
| 1545 | { | - | ||||||||||||||||||||||||||||||
| 1546 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1547 | if (d) | - | ||||||||||||||||||||||||||||||
| 1548 | return d->access(); | - | ||||||||||||||||||||||||||||||
| 1549 | else | - | ||||||||||||||||||||||||||||||
| 1550 | return QMetaMethod::Public; | - | ||||||||||||||||||||||||||||||
| 1551 | } | - | ||||||||||||||||||||||||||||||
| 1552 | void QMetaMethodBuilder::setAccess(QMetaMethod::Access value) | - | ||||||||||||||||||||||||||||||
| 1553 | { | - | ||||||||||||||||||||||||||||||
| 1554 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1555 | if (d && d->methodType() != QMetaMethod::Signal) | - | ||||||||||||||||||||||||||||||
| 1556 | d->setAccess(value); | - | ||||||||||||||||||||||||||||||
| 1557 | } | - | ||||||||||||||||||||||||||||||
| 1558 | - | |||||||||||||||||||||||||||||||
| 1559 | - | |||||||||||||||||||||||||||||||
| 1560 | - | |||||||||||||||||||||||||||||||
| 1561 | - | |||||||||||||||||||||||||||||||
| 1562 | - | |||||||||||||||||||||||||||||||
| 1563 | - | |||||||||||||||||||||||||||||||
| 1564 | int QMetaMethodBuilder::attributes() const | - | ||||||||||||||||||||||||||||||
| 1565 | { | - | ||||||||||||||||||||||||||||||
| 1566 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1567 | if (d) | - | ||||||||||||||||||||||||||||||
| 1568 | return (d->attributes >> 4); | - | ||||||||||||||||||||||||||||||
| 1569 | else | - | ||||||||||||||||||||||||||||||
| 1570 | return 0; | - | ||||||||||||||||||||||||||||||
| 1571 | } | - | ||||||||||||||||||||||||||||||
| 1572 | - | |||||||||||||||||||||||||||||||
| 1573 | - | |||||||||||||||||||||||||||||||
| 1574 | - | |||||||||||||||||||||||||||||||
| 1575 | - | |||||||||||||||||||||||||||||||
| 1576 | - | |||||||||||||||||||||||||||||||
| 1577 | - | |||||||||||||||||||||||||||||||
| 1578 | void QMetaMethodBuilder::setAttributes(int value) | - | ||||||||||||||||||||||||||||||
| 1579 | { | - | ||||||||||||||||||||||||||||||
| 1580 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1581 | if (d) | - | ||||||||||||||||||||||||||||||
| 1582 | d->attributes = ((d->attributes & 0x0f) | (value << 4)); | - | ||||||||||||||||||||||||||||||
| 1583 | } | - | ||||||||||||||||||||||||||||||
| 1584 | - | |||||||||||||||||||||||||||||||
| 1585 | - | |||||||||||||||||||||||||||||||
| 1586 | - | |||||||||||||||||||||||||||||||
| 1587 | - | |||||||||||||||||||||||||||||||
| 1588 | - | |||||||||||||||||||||||||||||||
| 1589 | - | |||||||||||||||||||||||||||||||
| 1590 | int QMetaMethodBuilder::revision() const | - | ||||||||||||||||||||||||||||||
| 1591 | { | - | ||||||||||||||||||||||||||||||
| 1592 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1593 | if (d) | - | ||||||||||||||||||||||||||||||
| 1594 | return d->revision; | - | ||||||||||||||||||||||||||||||
| 1595 | return 0; | - | ||||||||||||||||||||||||||||||
| 1596 | - | |||||||||||||||||||||||||||||||
| 1597 | } | - | ||||||||||||||||||||||||||||||
| 1598 | - | |||||||||||||||||||||||||||||||
| 1599 | - | |||||||||||||||||||||||||||||||
| 1600 | - | |||||||||||||||||||||||||||||||
| 1601 | - | |||||||||||||||||||||||||||||||
| 1602 | - | |||||||||||||||||||||||||||||||
| 1603 | - | |||||||||||||||||||||||||||||||
| 1604 | void QMetaMethodBuilder::setRevision(int revision) | - | ||||||||||||||||||||||||||||||
| 1605 | { | - | ||||||||||||||||||||||||||||||
| 1606 | QMetaMethodBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1607 | if (d) { | - | ||||||||||||||||||||||||||||||
| 1608 | d->revision = revision; | - | ||||||||||||||||||||||||||||||
| 1609 | if (revision) | - | ||||||||||||||||||||||||||||||
| 1610 | d->attributes |= MethodRevisioned; | - | ||||||||||||||||||||||||||||||
| 1611 | else | - | ||||||||||||||||||||||||||||||
| 1612 | d->attributes &= ~MethodRevisioned; | - | ||||||||||||||||||||||||||||||
| 1613 | } | - | ||||||||||||||||||||||||||||||
| 1614 | } | - | ||||||||||||||||||||||||||||||
| 1615 | QMetaPropertyBuilderPrivate *QMetaPropertyBuilder::d_func() const | - | ||||||||||||||||||||||||||||||
| 1616 | { | - | ||||||||||||||||||||||||||||||
| 1617 | if (_mobj
| 0-840 | ||||||||||||||||||||||||||||||
| 1618 | return executed 840 times by 1 test: &(_mobj->d->properties[_index]);return &(_mobj->d->properties[_index]);Executed by:
executed 840 times by 1 test: return &(_mobj->d->properties[_index]);Executed by:
| 840 | ||||||||||||||||||||||||||||||
| 1619 | else | - | ||||||||||||||||||||||||||||||
| 1620 | return executed 17 times by 1 test: 0;return 0;Executed by:
executed 17 times by 1 test: return 0;Executed by:
| 17 | ||||||||||||||||||||||||||||||
| 1621 | } | - | ||||||||||||||||||||||||||||||
| 1622 | QByteArray QMetaPropertyBuilder::name() const | - | ||||||||||||||||||||||||||||||
| 1623 | { | - | ||||||||||||||||||||||||||||||
| 1624 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1625 | if (d) | - | ||||||||||||||||||||||||||||||
| 1626 | return d->name; | - | ||||||||||||||||||||||||||||||
| 1627 | else | - | ||||||||||||||||||||||||||||||
| 1628 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1629 | } | - | ||||||||||||||||||||||||||||||
| 1630 | - | |||||||||||||||||||||||||||||||
| 1631 | - | |||||||||||||||||||||||||||||||
| 1632 | - | |||||||||||||||||||||||||||||||
| 1633 | - | |||||||||||||||||||||||||||||||
| 1634 | - | |||||||||||||||||||||||||||||||
| 1635 | - | |||||||||||||||||||||||||||||||
| 1636 | QByteArray QMetaPropertyBuilder::type() const | - | ||||||||||||||||||||||||||||||
| 1637 | { | - | ||||||||||||||||||||||||||||||
| 1638 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1639 | if (d) | - | ||||||||||||||||||||||||||||||
| 1640 | return d->type; | - | ||||||||||||||||||||||||||||||
| 1641 | else | - | ||||||||||||||||||||||||||||||
| 1642 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 1643 | } | - | ||||||||||||||||||||||||||||||
| 1644 | - | |||||||||||||||||||||||||||||||
| 1645 | - | |||||||||||||||||||||||||||||||
| 1646 | - | |||||||||||||||||||||||||||||||
| 1647 | - | |||||||||||||||||||||||||||||||
| 1648 | - | |||||||||||||||||||||||||||||||
| 1649 | - | |||||||||||||||||||||||||||||||
| 1650 | bool QMetaPropertyBuilder::hasNotifySignal() const | - | ||||||||||||||||||||||||||||||
| 1651 | { | - | ||||||||||||||||||||||||||||||
| 1652 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1653 | if (d) | - | ||||||||||||||||||||||||||||||
| 1654 | return d->flag(Notify); | - | ||||||||||||||||||||||||||||||
| 1655 | else | - | ||||||||||||||||||||||||||||||
| 1656 | return false; | - | ||||||||||||||||||||||||||||||
| 1657 | } | - | ||||||||||||||||||||||||||||||
| 1658 | - | |||||||||||||||||||||||||||||||
| 1659 | - | |||||||||||||||||||||||||||||||
| 1660 | - | |||||||||||||||||||||||||||||||
| 1661 | - | |||||||||||||||||||||||||||||||
| 1662 | - | |||||||||||||||||||||||||||||||
| 1663 | - | |||||||||||||||||||||||||||||||
| 1664 | QMetaMethodBuilder QMetaPropertyBuilder::notifySignal() const | - | ||||||||||||||||||||||||||||||
| 1665 | { | - | ||||||||||||||||||||||||||||||
| 1666 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1667 | if (d && d->notifySignal >= 0) | - | ||||||||||||||||||||||||||||||
| 1668 | return QMetaMethodBuilder(_mobj, d->notifySignal); | - | ||||||||||||||||||||||||||||||
| 1669 | else | - | ||||||||||||||||||||||||||||||
| 1670 | return QMetaMethodBuilder(); | - | ||||||||||||||||||||||||||||||
| 1671 | } | - | ||||||||||||||||||||||||||||||
| 1672 | - | |||||||||||||||||||||||||||||||
| 1673 | - | |||||||||||||||||||||||||||||||
| 1674 | - | |||||||||||||||||||||||||||||||
| 1675 | - | |||||||||||||||||||||||||||||||
| 1676 | - | |||||||||||||||||||||||||||||||
| 1677 | - | |||||||||||||||||||||||||||||||
| 1678 | void QMetaPropertyBuilder::setNotifySignal(const QMetaMethodBuilder& value) | - | ||||||||||||||||||||||||||||||
| 1679 | { | - | ||||||||||||||||||||||||||||||
| 1680 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1681 | if (d) { | - | ||||||||||||||||||||||||||||||
| 1682 | if (value._mobj) { | - | ||||||||||||||||||||||||||||||
| 1683 | d->notifySignal = value._index; | - | ||||||||||||||||||||||||||||||
| 1684 | d->setFlag(Notify, true); | - | ||||||||||||||||||||||||||||||
| 1685 | } else { | - | ||||||||||||||||||||||||||||||
| 1686 | d->notifySignal = -1; | - | ||||||||||||||||||||||||||||||
| 1687 | d->setFlag(Notify, false); | - | ||||||||||||||||||||||||||||||
| 1688 | } | - | ||||||||||||||||||||||||||||||
| 1689 | } | - | ||||||||||||||||||||||||||||||
| 1690 | } | - | ||||||||||||||||||||||||||||||
| 1691 | - | |||||||||||||||||||||||||||||||
| 1692 | - | |||||||||||||||||||||||||||||||
| 1693 | - | |||||||||||||||||||||||||||||||
| 1694 | - | |||||||||||||||||||||||||||||||
| 1695 | - | |||||||||||||||||||||||||||||||
| 1696 | - | |||||||||||||||||||||||||||||||
| 1697 | void QMetaPropertyBuilder::removeNotifySignal() | - | ||||||||||||||||||||||||||||||
| 1698 | { | - | ||||||||||||||||||||||||||||||
| 1699 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1700 | if (d) { | - | ||||||||||||||||||||||||||||||
| 1701 | d->notifySignal = -1; | - | ||||||||||||||||||||||||||||||
| 1702 | d->setFlag(Notify, false); | - | ||||||||||||||||||||||||||||||
| 1703 | } | - | ||||||||||||||||||||||||||||||
| 1704 | } | - | ||||||||||||||||||||||||||||||
| 1705 | - | |||||||||||||||||||||||||||||||
| 1706 | - | |||||||||||||||||||||||||||||||
| 1707 | - | |||||||||||||||||||||||||||||||
| 1708 | - | |||||||||||||||||||||||||||||||
| 1709 | - | |||||||||||||||||||||||||||||||
| 1710 | - | |||||||||||||||||||||||||||||||
| 1711 | - | |||||||||||||||||||||||||||||||
| 1712 | bool QMetaPropertyBuilder::isReadable() const | - | ||||||||||||||||||||||||||||||
| 1713 | { | - | ||||||||||||||||||||||||||||||
| 1714 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1715 | if (d) | - | ||||||||||||||||||||||||||||||
| 1716 | return d->flag(Readable); | - | ||||||||||||||||||||||||||||||
| 1717 | else | - | ||||||||||||||||||||||||||||||
| 1718 | return false; | - | ||||||||||||||||||||||||||||||
| 1719 | } | - | ||||||||||||||||||||||||||||||
| 1720 | - | |||||||||||||||||||||||||||||||
| 1721 | - | |||||||||||||||||||||||||||||||
| 1722 | - | |||||||||||||||||||||||||||||||
| 1723 | - | |||||||||||||||||||||||||||||||
| 1724 | - | |||||||||||||||||||||||||||||||
| 1725 | - | |||||||||||||||||||||||||||||||
| 1726 | - | |||||||||||||||||||||||||||||||
| 1727 | bool QMetaPropertyBuilder::isWritable() const | - | ||||||||||||||||||||||||||||||
| 1728 | { | - | ||||||||||||||||||||||||||||||
| 1729 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1730 | if (d) | - | ||||||||||||||||||||||||||||||
| 1731 | return d->flag(Writable); | - | ||||||||||||||||||||||||||||||
| 1732 | else | - | ||||||||||||||||||||||||||||||
| 1733 | return false; | - | ||||||||||||||||||||||||||||||
| 1734 | } | - | ||||||||||||||||||||||||||||||
| 1735 | - | |||||||||||||||||||||||||||||||
| 1736 | - | |||||||||||||||||||||||||||||||
| 1737 | - | |||||||||||||||||||||||||||||||
| 1738 | - | |||||||||||||||||||||||||||||||
| 1739 | - | |||||||||||||||||||||||||||||||
| 1740 | - | |||||||||||||||||||||||||||||||
| 1741 | - | |||||||||||||||||||||||||||||||
| 1742 | bool QMetaPropertyBuilder::isResettable() const | - | ||||||||||||||||||||||||||||||
| 1743 | { | - | ||||||||||||||||||||||||||||||
| 1744 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1745 | if (d) | - | ||||||||||||||||||||||||||||||
| 1746 | return d->flag(Resettable); | - | ||||||||||||||||||||||||||||||
| 1747 | else | - | ||||||||||||||||||||||||||||||
| 1748 | return false; | - | ||||||||||||||||||||||||||||||
| 1749 | } | - | ||||||||||||||||||||||||||||||
| 1750 | - | |||||||||||||||||||||||||||||||
| 1751 | - | |||||||||||||||||||||||||||||||
| 1752 | - | |||||||||||||||||||||||||||||||
| 1753 | - | |||||||||||||||||||||||||||||||
| 1754 | - | |||||||||||||||||||||||||||||||
| 1755 | - | |||||||||||||||||||||||||||||||
| 1756 | - | |||||||||||||||||||||||||||||||
| 1757 | bool QMetaPropertyBuilder::isDesignable() const | - | ||||||||||||||||||||||||||||||
| 1758 | { | - | ||||||||||||||||||||||||||||||
| 1759 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1760 | if (d) | - | ||||||||||||||||||||||||||||||
| 1761 | return d->flag(Designable); | - | ||||||||||||||||||||||||||||||
| 1762 | else | - | ||||||||||||||||||||||||||||||
| 1763 | return false; | - | ||||||||||||||||||||||||||||||
| 1764 | } | - | ||||||||||||||||||||||||||||||
| 1765 | - | |||||||||||||||||||||||||||||||
| 1766 | - | |||||||||||||||||||||||||||||||
| 1767 | - | |||||||||||||||||||||||||||||||
| 1768 | - | |||||||||||||||||||||||||||||||
| 1769 | - | |||||||||||||||||||||||||||||||
| 1770 | - | |||||||||||||||||||||||||||||||
| 1771 | - | |||||||||||||||||||||||||||||||
| 1772 | bool QMetaPropertyBuilder::isScriptable() const | - | ||||||||||||||||||||||||||||||
| 1773 | { | - | ||||||||||||||||||||||||||||||
| 1774 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1775 | if (d) | - | ||||||||||||||||||||||||||||||
| 1776 | return d->flag(Scriptable); | - | ||||||||||||||||||||||||||||||
| 1777 | else | - | ||||||||||||||||||||||||||||||
| 1778 | return false; | - | ||||||||||||||||||||||||||||||
| 1779 | } | - | ||||||||||||||||||||||||||||||
| 1780 | - | |||||||||||||||||||||||||||||||
| 1781 | - | |||||||||||||||||||||||||||||||
| 1782 | - | |||||||||||||||||||||||||||||||
| 1783 | - | |||||||||||||||||||||||||||||||
| 1784 | - | |||||||||||||||||||||||||||||||
| 1785 | - | |||||||||||||||||||||||||||||||
| 1786 | - | |||||||||||||||||||||||||||||||
| 1787 | bool QMetaPropertyBuilder::isStored() const | - | ||||||||||||||||||||||||||||||
| 1788 | { | - | ||||||||||||||||||||||||||||||
| 1789 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1790 | if (d) | - | ||||||||||||||||||||||||||||||
| 1791 | return d->flag(Stored); | - | ||||||||||||||||||||||||||||||
| 1792 | else | - | ||||||||||||||||||||||||||||||
| 1793 | return false; | - | ||||||||||||||||||||||||||||||
| 1794 | } | - | ||||||||||||||||||||||||||||||
| 1795 | - | |||||||||||||||||||||||||||||||
| 1796 | - | |||||||||||||||||||||||||||||||
| 1797 | - | |||||||||||||||||||||||||||||||
| 1798 | - | |||||||||||||||||||||||||||||||
| 1799 | - | |||||||||||||||||||||||||||||||
| 1800 | - | |||||||||||||||||||||||||||||||
| 1801 | - | |||||||||||||||||||||||||||||||
| 1802 | bool QMetaPropertyBuilder::isEditable() const | - | ||||||||||||||||||||||||||||||
| 1803 | { | - | ||||||||||||||||||||||||||||||
| 1804 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1805 | if (d) | - | ||||||||||||||||||||||||||||||
| 1806 | return d->flag(Editable); | - | ||||||||||||||||||||||||||||||
| 1807 | else | - | ||||||||||||||||||||||||||||||
| 1808 | return false; | - | ||||||||||||||||||||||||||||||
| 1809 | } | - | ||||||||||||||||||||||||||||||
| 1810 | bool QMetaPropertyBuilder::isUser() const | - | ||||||||||||||||||||||||||||||
| 1811 | { | - | ||||||||||||||||||||||||||||||
| 1812 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1813 | if (d) | - | ||||||||||||||||||||||||||||||
| 1814 | return d->flag(User); | - | ||||||||||||||||||||||||||||||
| 1815 | else | - | ||||||||||||||||||||||||||||||
| 1816 | return false; | - | ||||||||||||||||||||||||||||||
| 1817 | } | - | ||||||||||||||||||||||||||||||
| 1818 | bool QMetaPropertyBuilder::hasStdCppSet() const | - | ||||||||||||||||||||||||||||||
| 1819 | { | - | ||||||||||||||||||||||||||||||
| 1820 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1821 | if (d) | - | ||||||||||||||||||||||||||||||
| 1822 | return d->flag(StdCppSet); | - | ||||||||||||||||||||||||||||||
| 1823 | else | - | ||||||||||||||||||||||||||||||
| 1824 | return false; | - | ||||||||||||||||||||||||||||||
| 1825 | } | - | ||||||||||||||||||||||||||||||
| 1826 | - | |||||||||||||||||||||||||||||||
| 1827 | - | |||||||||||||||||||||||||||||||
| 1828 | - | |||||||||||||||||||||||||||||||
| 1829 | - | |||||||||||||||||||||||||||||||
| 1830 | - | |||||||||||||||||||||||||||||||
| 1831 | - | |||||||||||||||||||||||||||||||
| 1832 | - | |||||||||||||||||||||||||||||||
| 1833 | bool QMetaPropertyBuilder::isEnumOrFlag() const | - | ||||||||||||||||||||||||||||||
| 1834 | { | - | ||||||||||||||||||||||||||||||
| 1835 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1836 | if (d) | - | ||||||||||||||||||||||||||||||
| 1837 | return d->flag(EnumOrFlag); | - | ||||||||||||||||||||||||||||||
| 1838 | else | - | ||||||||||||||||||||||||||||||
| 1839 | return false; | - | ||||||||||||||||||||||||||||||
| 1840 | } | - | ||||||||||||||||||||||||||||||
| 1841 | - | |||||||||||||||||||||||||||||||
| 1842 | - | |||||||||||||||||||||||||||||||
| 1843 | - | |||||||||||||||||||||||||||||||
| 1844 | - | |||||||||||||||||||||||||||||||
| 1845 | - | |||||||||||||||||||||||||||||||
| 1846 | bool QMetaPropertyBuilder::isConstant() const | - | ||||||||||||||||||||||||||||||
| 1847 | { | - | ||||||||||||||||||||||||||||||
| 1848 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1849 | if (d) | - | ||||||||||||||||||||||||||||||
| 1850 | return d->flag(Constant); | - | ||||||||||||||||||||||||||||||
| 1851 | else | - | ||||||||||||||||||||||||||||||
| 1852 | return false; | - | ||||||||||||||||||||||||||||||
| 1853 | } | - | ||||||||||||||||||||||||||||||
| 1854 | - | |||||||||||||||||||||||||||||||
| 1855 | - | |||||||||||||||||||||||||||||||
| 1856 | - | |||||||||||||||||||||||||||||||
| 1857 | - | |||||||||||||||||||||||||||||||
| 1858 | - | |||||||||||||||||||||||||||||||
| 1859 | bool QMetaPropertyBuilder::isFinal() const | - | ||||||||||||||||||||||||||||||
| 1860 | { | - | ||||||||||||||||||||||||||||||
| 1861 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1862 | if (d) | - | ||||||||||||||||||||||||||||||
| 1863 | return d->flag(Final); | - | ||||||||||||||||||||||||||||||
| 1864 | else | - | ||||||||||||||||||||||||||||||
| 1865 | return false; | - | ||||||||||||||||||||||||||||||
| 1866 | } | - | ||||||||||||||||||||||||||||||
| 1867 | - | |||||||||||||||||||||||||||||||
| 1868 | - | |||||||||||||||||||||||||||||||
| 1869 | - | |||||||||||||||||||||||||||||||
| 1870 | - | |||||||||||||||||||||||||||||||
| 1871 | - | |||||||||||||||||||||||||||||||
| 1872 | - | |||||||||||||||||||||||||||||||
| 1873 | void QMetaPropertyBuilder::setReadable(bool value) | - | ||||||||||||||||||||||||||||||
| 1874 | { | - | ||||||||||||||||||||||||||||||
| 1875 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1876 | if (d) | - | ||||||||||||||||||||||||||||||
| 1877 | d->setFlag(Readable, value); | - | ||||||||||||||||||||||||||||||
| 1878 | } | - | ||||||||||||||||||||||||||||||
| 1879 | - | |||||||||||||||||||||||||||||||
| 1880 | - | |||||||||||||||||||||||||||||||
| 1881 | - | |||||||||||||||||||||||||||||||
| 1882 | - | |||||||||||||||||||||||||||||||
| 1883 | - | |||||||||||||||||||||||||||||||
| 1884 | - | |||||||||||||||||||||||||||||||
| 1885 | void QMetaPropertyBuilder::setWritable(bool value) | - | ||||||||||||||||||||||||||||||
| 1886 | { | - | ||||||||||||||||||||||||||||||
| 1887 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1888 | if (d) | - | ||||||||||||||||||||||||||||||
| 1889 | d->setFlag(Writable, value); | - | ||||||||||||||||||||||||||||||
| 1890 | } | - | ||||||||||||||||||||||||||||||
| 1891 | - | |||||||||||||||||||||||||||||||
| 1892 | - | |||||||||||||||||||||||||||||||
| 1893 | - | |||||||||||||||||||||||||||||||
| 1894 | - | |||||||||||||||||||||||||||||||
| 1895 | - | |||||||||||||||||||||||||||||||
| 1896 | - | |||||||||||||||||||||||||||||||
| 1897 | void QMetaPropertyBuilder::setResettable(bool value) | - | ||||||||||||||||||||||||||||||
| 1898 | { | - | ||||||||||||||||||||||||||||||
| 1899 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1900 | if (d) | - | ||||||||||||||||||||||||||||||
| 1901 | d->setFlag(Resettable, value); | - | ||||||||||||||||||||||||||||||
| 1902 | } | - | ||||||||||||||||||||||||||||||
| 1903 | - | |||||||||||||||||||||||||||||||
| 1904 | - | |||||||||||||||||||||||||||||||
| 1905 | - | |||||||||||||||||||||||||||||||
| 1906 | - | |||||||||||||||||||||||||||||||
| 1907 | - | |||||||||||||||||||||||||||||||
| 1908 | - | |||||||||||||||||||||||||||||||
| 1909 | void QMetaPropertyBuilder::setDesignable(bool value) | - | ||||||||||||||||||||||||||||||
| 1910 | { | - | ||||||||||||||||||||||||||||||
| 1911 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1912 | if (d) | - | ||||||||||||||||||||||||||||||
| 1913 | d->setFlag(Designable, value); | - | ||||||||||||||||||||||||||||||
| 1914 | } | - | ||||||||||||||||||||||||||||||
| 1915 | - | |||||||||||||||||||||||||||||||
| 1916 | - | |||||||||||||||||||||||||||||||
| 1917 | - | |||||||||||||||||||||||||||||||
| 1918 | - | |||||||||||||||||||||||||||||||
| 1919 | - | |||||||||||||||||||||||||||||||
| 1920 | - | |||||||||||||||||||||||||||||||
| 1921 | void QMetaPropertyBuilder::setScriptable(bool value) | - | ||||||||||||||||||||||||||||||
| 1922 | { | - | ||||||||||||||||||||||||||||||
| 1923 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1924 | if (d) | - | ||||||||||||||||||||||||||||||
| 1925 | d->setFlag(Scriptable, value); | - | ||||||||||||||||||||||||||||||
| 1926 | } | - | ||||||||||||||||||||||||||||||
| 1927 | - | |||||||||||||||||||||||||||||||
| 1928 | - | |||||||||||||||||||||||||||||||
| 1929 | - | |||||||||||||||||||||||||||||||
| 1930 | - | |||||||||||||||||||||||||||||||
| 1931 | - | |||||||||||||||||||||||||||||||
| 1932 | - | |||||||||||||||||||||||||||||||
| 1933 | void QMetaPropertyBuilder::setStored(bool value) | - | ||||||||||||||||||||||||||||||
| 1934 | { | - | ||||||||||||||||||||||||||||||
| 1935 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1936 | if (d) | - | ||||||||||||||||||||||||||||||
| 1937 | d->setFlag(Stored, value); | - | ||||||||||||||||||||||||||||||
| 1938 | } | - | ||||||||||||||||||||||||||||||
| 1939 | - | |||||||||||||||||||||||||||||||
| 1940 | - | |||||||||||||||||||||||||||||||
| 1941 | - | |||||||||||||||||||||||||||||||
| 1942 | - | |||||||||||||||||||||||||||||||
| 1943 | - | |||||||||||||||||||||||||||||||
| 1944 | - | |||||||||||||||||||||||||||||||
| 1945 | void QMetaPropertyBuilder::setEditable(bool value) | - | ||||||||||||||||||||||||||||||
| 1946 | { | - | ||||||||||||||||||||||||||||||
| 1947 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1948 | if (d) | - | ||||||||||||||||||||||||||||||
| 1949 | d->setFlag(Editable, value); | - | ||||||||||||||||||||||||||||||
| 1950 | } | - | ||||||||||||||||||||||||||||||
| 1951 | - | |||||||||||||||||||||||||||||||
| 1952 | - | |||||||||||||||||||||||||||||||
| 1953 | - | |||||||||||||||||||||||||||||||
| 1954 | - | |||||||||||||||||||||||||||||||
| 1955 | - | |||||||||||||||||||||||||||||||
| 1956 | - | |||||||||||||||||||||||||||||||
| 1957 | void QMetaPropertyBuilder::setUser(bool value) | - | ||||||||||||||||||||||||||||||
| 1958 | { | - | ||||||||||||||||||||||||||||||
| 1959 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1960 | if (d) | - | ||||||||||||||||||||||||||||||
| 1961 | d->setFlag(User, value); | - | ||||||||||||||||||||||||||||||
| 1962 | } | - | ||||||||||||||||||||||||||||||
| 1963 | void QMetaPropertyBuilder::setStdCppSet(bool value) | - | ||||||||||||||||||||||||||||||
| 1964 | { | - | ||||||||||||||||||||||||||||||
| 1965 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1966 | if (d) | - | ||||||||||||||||||||||||||||||
| 1967 | d->setFlag(StdCppSet, value); | - | ||||||||||||||||||||||||||||||
| 1968 | } | - | ||||||||||||||||||||||||||||||
| 1969 | - | |||||||||||||||||||||||||||||||
| 1970 | - | |||||||||||||||||||||||||||||||
| 1971 | - | |||||||||||||||||||||||||||||||
| 1972 | - | |||||||||||||||||||||||||||||||
| 1973 | - | |||||||||||||||||||||||||||||||
| 1974 | - | |||||||||||||||||||||||||||||||
| 1975 | - | |||||||||||||||||||||||||||||||
| 1976 | void QMetaPropertyBuilder::setEnumOrFlag(bool value) | - | ||||||||||||||||||||||||||||||
| 1977 | { | - | ||||||||||||||||||||||||||||||
| 1978 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1979 | if (d) | - | ||||||||||||||||||||||||||||||
| 1980 | d->setFlag(EnumOrFlag, value); | - | ||||||||||||||||||||||||||||||
| 1981 | } | - | ||||||||||||||||||||||||||||||
| 1982 | - | |||||||||||||||||||||||||||||||
| 1983 | - | |||||||||||||||||||||||||||||||
| 1984 | - | |||||||||||||||||||||||||||||||
| 1985 | - | |||||||||||||||||||||||||||||||
| 1986 | - | |||||||||||||||||||||||||||||||
| 1987 | - | |||||||||||||||||||||||||||||||
| 1988 | void QMetaPropertyBuilder::setConstant(bool value) | - | ||||||||||||||||||||||||||||||
| 1989 | { | - | ||||||||||||||||||||||||||||||
| 1990 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 1991 | if (d) | - | ||||||||||||||||||||||||||||||
| 1992 | d->setFlag(Constant, value); | - | ||||||||||||||||||||||||||||||
| 1993 | } | - | ||||||||||||||||||||||||||||||
| 1994 | - | |||||||||||||||||||||||||||||||
| 1995 | - | |||||||||||||||||||||||||||||||
| 1996 | - | |||||||||||||||||||||||||||||||
| 1997 | - | |||||||||||||||||||||||||||||||
| 1998 | - | |||||||||||||||||||||||||||||||
| 1999 | - | |||||||||||||||||||||||||||||||
| 2000 | void QMetaPropertyBuilder::setFinal(bool value) | - | ||||||||||||||||||||||||||||||
| 2001 | { | - | ||||||||||||||||||||||||||||||
| 2002 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2003 | if (d) | - | ||||||||||||||||||||||||||||||
| 2004 | d->setFlag(Final, value); | - | ||||||||||||||||||||||||||||||
| 2005 | } | - | ||||||||||||||||||||||||||||||
| 2006 | - | |||||||||||||||||||||||||||||||
| 2007 | - | |||||||||||||||||||||||||||||||
| 2008 | - | |||||||||||||||||||||||||||||||
| 2009 | - | |||||||||||||||||||||||||||||||
| 2010 | - | |||||||||||||||||||||||||||||||
| 2011 | - | |||||||||||||||||||||||||||||||
| 2012 | int QMetaPropertyBuilder::revision() const | - | ||||||||||||||||||||||||||||||
| 2013 | { | - | ||||||||||||||||||||||||||||||
| 2014 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2015 | if (d) | - | ||||||||||||||||||||||||||||||
| 2016 | return d->revision; | - | ||||||||||||||||||||||||||||||
| 2017 | return 0; | - | ||||||||||||||||||||||||||||||
| 2018 | - | |||||||||||||||||||||||||||||||
| 2019 | } | - | ||||||||||||||||||||||||||||||
| 2020 | - | |||||||||||||||||||||||||||||||
| 2021 | - | |||||||||||||||||||||||||||||||
| 2022 | - | |||||||||||||||||||||||||||||||
| 2023 | - | |||||||||||||||||||||||||||||||
| 2024 | - | |||||||||||||||||||||||||||||||
| 2025 | - | |||||||||||||||||||||||||||||||
| 2026 | void QMetaPropertyBuilder::setRevision(int revision) | - | ||||||||||||||||||||||||||||||
| 2027 | { | - | ||||||||||||||||||||||||||||||
| 2028 | QMetaPropertyBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2029 | if (d) { | - | ||||||||||||||||||||||||||||||
| 2030 | d->revision = revision; | - | ||||||||||||||||||||||||||||||
| 2031 | d->setFlag(Revisioned, revision != 0); | - | ||||||||||||||||||||||||||||||
| 2032 | } | - | ||||||||||||||||||||||||||||||
| 2033 | } | - | ||||||||||||||||||||||||||||||
| 2034 | QMetaEnumBuilderPrivate *QMetaEnumBuilder::d_func() const | - | ||||||||||||||||||||||||||||||
| 2035 | { | - | ||||||||||||||||||||||||||||||
| 2036 | if (_mobj
| 0-89 | ||||||||||||||||||||||||||||||
| 2037 | return executed 89 times by 1 test: &(_mobj->d->enumerators[_index]);return &(_mobj->d->enumerators[_index]);Executed by:
executed 89 times by 1 test: return &(_mobj->d->enumerators[_index]);Executed by:
| 89 | ||||||||||||||||||||||||||||||
| 2038 | else | - | ||||||||||||||||||||||||||||||
| 2039 | return executed 1 time by 1 test: 0;return 0;Executed by:
executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||||||||
| 2040 | } | - | ||||||||||||||||||||||||||||||
| 2041 | QByteArray QMetaEnumBuilder::name() const | - | ||||||||||||||||||||||||||||||
| 2042 | { | - | ||||||||||||||||||||||||||||||
| 2043 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2044 | if (d) | - | ||||||||||||||||||||||||||||||
| 2045 | return d->name; | - | ||||||||||||||||||||||||||||||
| 2046 | else | - | ||||||||||||||||||||||||||||||
| 2047 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 2048 | } | - | ||||||||||||||||||||||||||||||
| 2049 | - | |||||||||||||||||||||||||||||||
| 2050 | - | |||||||||||||||||||||||||||||||
| 2051 | - | |||||||||||||||||||||||||||||||
| 2052 | - | |||||||||||||||||||||||||||||||
| 2053 | - | |||||||||||||||||||||||||||||||
| 2054 | - | |||||||||||||||||||||||||||||||
| 2055 | - | |||||||||||||||||||||||||||||||
| 2056 | bool QMetaEnumBuilder::isFlag() const | - | ||||||||||||||||||||||||||||||
| 2057 | { | - | ||||||||||||||||||||||||||||||
| 2058 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2059 | if (d) | - | ||||||||||||||||||||||||||||||
| 2060 | return d->isFlag; | - | ||||||||||||||||||||||||||||||
| 2061 | else | - | ||||||||||||||||||||||||||||||
| 2062 | return false; | - | ||||||||||||||||||||||||||||||
| 2063 | } | - | ||||||||||||||||||||||||||||||
| 2064 | - | |||||||||||||||||||||||||||||||
| 2065 | - | |||||||||||||||||||||||||||||||
| 2066 | - | |||||||||||||||||||||||||||||||
| 2067 | - | |||||||||||||||||||||||||||||||
| 2068 | - | |||||||||||||||||||||||||||||||
| 2069 | - | |||||||||||||||||||||||||||||||
| 2070 | void QMetaEnumBuilder::setIsFlag(bool value) | - | ||||||||||||||||||||||||||||||
| 2071 | { | - | ||||||||||||||||||||||||||||||
| 2072 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2073 | if (d) | - | ||||||||||||||||||||||||||||||
| 2074 | d->isFlag = value; | - | ||||||||||||||||||||||||||||||
| 2075 | } | - | ||||||||||||||||||||||||||||||
| 2076 | - | |||||||||||||||||||||||||||||||
| 2077 | - | |||||||||||||||||||||||||||||||
| 2078 | - | |||||||||||||||||||||||||||||||
| 2079 | - | |||||||||||||||||||||||||||||||
| 2080 | - | |||||||||||||||||||||||||||||||
| 2081 | - | |||||||||||||||||||||||||||||||
| 2082 | int QMetaEnumBuilder::keyCount() const | - | ||||||||||||||||||||||||||||||
| 2083 | { | - | ||||||||||||||||||||||||||||||
| 2084 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2085 | if (d) | - | ||||||||||||||||||||||||||||||
| 2086 | return d->keys.size(); | - | ||||||||||||||||||||||||||||||
| 2087 | else | - | ||||||||||||||||||||||||||||||
| 2088 | return 0; | - | ||||||||||||||||||||||||||||||
| 2089 | } | - | ||||||||||||||||||||||||||||||
| 2090 | - | |||||||||||||||||||||||||||||||
| 2091 | - | |||||||||||||||||||||||||||||||
| 2092 | - | |||||||||||||||||||||||||||||||
| 2093 | - | |||||||||||||||||||||||||||||||
| 2094 | - | |||||||||||||||||||||||||||||||
| 2095 | - | |||||||||||||||||||||||||||||||
| 2096 | - | |||||||||||||||||||||||||||||||
| 2097 | QByteArray QMetaEnumBuilder::key(int index) const | - | ||||||||||||||||||||||||||||||
| 2098 | { | - | ||||||||||||||||||||||||||||||
| 2099 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2100 | if (d && index >= 0 && index < d->keys.size()) | - | ||||||||||||||||||||||||||||||
| 2101 | return d->keys[index]; | - | ||||||||||||||||||||||||||||||
| 2102 | else | - | ||||||||||||||||||||||||||||||
| 2103 | return QByteArray(); | - | ||||||||||||||||||||||||||||||
| 2104 | } | - | ||||||||||||||||||||||||||||||
| 2105 | - | |||||||||||||||||||||||||||||||
| 2106 | - | |||||||||||||||||||||||||||||||
| 2107 | - | |||||||||||||||||||||||||||||||
| 2108 | - | |||||||||||||||||||||||||||||||
| 2109 | - | |||||||||||||||||||||||||||||||
| 2110 | - | |||||||||||||||||||||||||||||||
| 2111 | - | |||||||||||||||||||||||||||||||
| 2112 | int QMetaEnumBuilder::value(int index) const | - | ||||||||||||||||||||||||||||||
| 2113 | { | - | ||||||||||||||||||||||||||||||
| 2114 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2115 | if (d && index >= 0 && index < d->keys.size()) | - | ||||||||||||||||||||||||||||||
| 2116 | return d->values[index]; | - | ||||||||||||||||||||||||||||||
| 2117 | else | - | ||||||||||||||||||||||||||||||
| 2118 | return -1; | - | ||||||||||||||||||||||||||||||
| 2119 | } | - | ||||||||||||||||||||||||||||||
| 2120 | - | |||||||||||||||||||||||||||||||
| 2121 | - | |||||||||||||||||||||||||||||||
| 2122 | - | |||||||||||||||||||||||||||||||
| 2123 | - | |||||||||||||||||||||||||||||||
| 2124 | - | |||||||||||||||||||||||||||||||
| 2125 | - | |||||||||||||||||||||||||||||||
| 2126 | - | |||||||||||||||||||||||||||||||
| 2127 | int QMetaEnumBuilder::addKey(const QByteArray& name, int value) | - | ||||||||||||||||||||||||||||||
| 2128 | { | - | ||||||||||||||||||||||||||||||
| 2129 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2130 | if (d) { | - | ||||||||||||||||||||||||||||||
| 2131 | int index = d->keys.size(); | - | ||||||||||||||||||||||||||||||
| 2132 | d->keys += name; | - | ||||||||||||||||||||||||||||||
| 2133 | d->values += value; | - | ||||||||||||||||||||||||||||||
| 2134 | return index; | - | ||||||||||||||||||||||||||||||
| 2135 | } else { | - | ||||||||||||||||||||||||||||||
| 2136 | return -1; | - | ||||||||||||||||||||||||||||||
| 2137 | } | - | ||||||||||||||||||||||||||||||
| 2138 | } | - | ||||||||||||||||||||||||||||||
| 2139 | - | |||||||||||||||||||||||||||||||
| 2140 | - | |||||||||||||||||||||||||||||||
| 2141 | - | |||||||||||||||||||||||||||||||
| 2142 | - | |||||||||||||||||||||||||||||||
| 2143 | - | |||||||||||||||||||||||||||||||
| 2144 | - | |||||||||||||||||||||||||||||||
| 2145 | void QMetaEnumBuilder::removeKey(int index) | - | ||||||||||||||||||||||||||||||
| 2146 | { | - | ||||||||||||||||||||||||||||||
| 2147 | QMetaEnumBuilderPrivate *d = d_func(); | - | ||||||||||||||||||||||||||||||
| 2148 | if (d && index >= 0 && index < d->keys.size()) { | - | ||||||||||||||||||||||||||||||
| 2149 | d->keys.removeAt(index); | - | ||||||||||||||||||||||||||||||
| 2150 | d->values.removeAt(index); | - | ||||||||||||||||||||||||||||||
| 2151 | } | - | ||||||||||||||||||||||||||||||
| 2152 | } | - | ||||||||||||||||||||||||||||||
| 2153 | - | |||||||||||||||||||||||||||||||
| 2154 | - | |||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |