diff options
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetatype_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator_p.h | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmltypenamecache.cpp | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmltypenamecache_p.h | 14 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine_p.h | 6 |
10 files changed, 25 insertions, 25 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 76755831f6..7b758566b7 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1049,7 +1049,7 @@ void QQmlTypeModulePrivate::add(QQmlType *type) list.append(type); } -QQmlType *QQmlTypeModule::type(const QHashedStringRef &name, int minor) +QQmlType *QQmlTypeModule::type(const QHashedStringRef &name, int minor) const { QMutexLocker lock(metaTypeDataLock()); @@ -1063,7 +1063,7 @@ QQmlType *QQmlTypeModule::type(const QHashedStringRef &name, int minor) return 0; } -QQmlType *QQmlTypeModule::type(const QV4::String *name, int minor) +QQmlType *QQmlTypeModule::type(const QV4::String *name, int minor) const { QMutexLocker lock(metaTypeDataLock()); diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h index 9afe4825dc..cc0e0ad71e 100644 --- a/src/qml/qml/qqmlmetatype_p.h +++ b/src/qml/qml/qqmlmetatype_p.h @@ -259,8 +259,8 @@ public: int minimumMinorVersion() const; int maximumMinorVersion() const; - QQmlType *type(const QHashedStringRef &, int); - QQmlType *type(const QV4::String *, int); + QQmlType *type(const QHashedStringRef &, int) const; + QQmlType *type(const QV4::String *, int) const; QList<QQmlType*> singletonTypes(int) const; diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index e3312f9df5..caee7b9d1d 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -92,13 +92,13 @@ public: QQmlContextData *finalize(QQmlInstantiationInterrupt &interrupt); void clear(); - QQmlComponentAttached **componentAttachment() { return &sharedState->componentAttached; } + QQmlComponentAttached **componentAttachment() const { return &sharedState->componentAttached; } - QList<QQmlEnginePrivate::FinalizeCallback> *finalizeCallbacks() { return &sharedState->finalizeCallbacks; } + QList<QQmlEnginePrivate::FinalizeCallback> *finalizeCallbacks() const { return &sharedState->finalizeCallbacks; } QList<QQmlError> errors; - QQmlContextData *parentContextData() { return parentContext.contextData(); } + QQmlContextData *parentContextData() const { return parentContext.contextData(); } QFiniteStack<QPointer<QObject> > &allCreatedObjects() const { return sharedState->allCreatedObjects; } private: diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index a74ba141be..3885e6ea0b 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -1618,7 +1618,7 @@ QQmlTypeLoader::~QQmlTypeLoader() invalidate(); } -QQmlImportDatabase *QQmlTypeLoader::importDatabase() +QQmlImportDatabase *QQmlTypeLoader::importDatabase() const { return &QQmlEnginePrivate::get(engine())->importDatabase; } diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index ad5ab3124e..abbbf89ea2 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -287,7 +287,7 @@ public: QQmlTypeLoader(QQmlEngine *); ~QQmlTypeLoader(); - QQmlImportDatabase *importDatabase(); + QQmlImportDatabase *importDatabase() const; QQmlTypeData *getType(const QUrl &url, Mode mode = PreferSynchronous); QQmlTypeData *getType(const QByteArray &, const QUrl &url, Mode mode = PreferSynchronous); diff --git a/src/qml/qml/qqmltypenamecache.cpp b/src/qml/qml/qqmltypenamecache.cpp index 34e1fc87f2..c2098bc9a1 100644 --- a/src/qml/qml/qqmltypenamecache.cpp +++ b/src/qml/qml/qqmltypenamecache.cpp @@ -84,7 +84,7 @@ void QQmlTypeNameCache::add(const QHashedString &name, int importedScriptIndex, m_namedImports.insert(name, import); } -QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) const { Result result = query(m_namedImports, name); @@ -98,7 +98,7 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) } QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name, - const void *importNamespace) + const void *importNamespace) const { Q_ASSERT(importNamespace); const Import *i = static_cast<const Import *>(importNamespace); @@ -112,7 +112,7 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name, return result; } -QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name) const { Result result = query(m_namedImports, name); @@ -125,7 +125,7 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name) return result; } -QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name, const void *importNamespace) +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QV4::String *name, const void *importNamespace) const { Q_ASSERT(importNamespace); const Import *i = static_cast<const Import *>(importNamespace); diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h index 7591075102..8a387bed5f 100644 --- a/src/qml/qml/qqmltypenamecache_p.h +++ b/src/qml/qml/qqmltypenamecache_p.h @@ -87,10 +87,10 @@ public: const void *importNamespace; int scriptIndex; }; - Result query(const QHashedStringRef &); - Result query(const QHashedStringRef &, const void *importNamespace); - Result query(const QV4::String *); - Result query(const QV4::String *, const void *importNamespace); + Result query(const QHashedStringRef &) const; + Result query(const QHashedStringRef &, const void *importNamespace) const; + Result query(const QV4::String *) const; + Result query(const QV4::String *, const void *importNamespace) const; private: friend class QQmlImports; @@ -108,7 +108,7 @@ private: }; template<typename Key> - Result query(const QStringHash<Import> &imports, Key key) + Result query(const QStringHash<Import> &imports, Key key) const { Import *i = imports.value(key); if (i) { @@ -123,7 +123,7 @@ private: } template<typename Key> - Result query(const QStringHash<QUrl> &urls, Key key) + Result query(const QStringHash<QUrl> &urls, Key key) const { QUrl *url = urls.value(key); if (url) { @@ -136,7 +136,7 @@ private: } template<typename Key> - Result typeSearch(const QVector<QQmlTypeModuleVersion> &modules, Key key) + Result typeSearch(const QVector<QQmlTypeModuleVersion> &modules, Key key) const { QVector<QQmlTypeModuleVersion>::const_iterator end = modules.constEnd(); for (QVector<QQmlTypeModuleVersion>::const_iterator it = modules.constBegin(); it != end; ++it) { diff --git a/src/qml/qml/qqmlvaluetypeproxybinding.cpp b/src/qml/qml/qqmlvaluetypeproxybinding.cpp index 56f073121e..4e2e7b06c7 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding.cpp +++ b/src/qml/qml/qqmlvaluetypeproxybinding.cpp @@ -72,7 +72,7 @@ bool QQmlValueTypeProxyBinding::isValueTypeProxy() const return true; } -QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(QQmlPropertyIndex propertyIndex) +QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(QQmlPropertyIndex propertyIndex) const { QQmlAbstractBinding *binding = m_bindings.data(); diff --git a/src/qml/qml/qqmlvaluetypeproxybinding_p.h b/src/qml/qml/qqmlvaluetypeproxybinding_p.h index aa7abaa486..92b5470f39 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding_p.h +++ b/src/qml/qml/qqmlvaluetypeproxybinding_p.h @@ -60,7 +60,7 @@ class QQmlValueTypeProxyBinding : public QQmlAbstractBinding public: QQmlValueTypeProxyBinding(QObject *o, QQmlPropertyIndex coreIndex); - QQmlAbstractBinding *binding(QQmlPropertyIndex targetPropertyIndex); + QQmlAbstractBinding *binding(QQmlPropertyIndex targetPropertyIndex) const; void removeBindings(quint32 mask); void setEnabled(bool, QQmlPropertyData::WriteFlags) override; diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 0cbe34fd30..3bd3517968 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -117,7 +117,7 @@ class QQmlV4Function { public: int length() const { return callData->argc; } - QV4::ReturnedValue operator[](int idx) { return (idx < callData->argc ? callData->args[idx].asReturnedValue() : QV4::Encode::undefined()); } + QV4::ReturnedValue operator[](int idx) const { return (idx < callData->argc ? callData->args[idx].asReturnedValue() : QV4::Encode::undefined()); } void setReturnValue(QV4::ReturnedValue rv) { *retVal = rv; } QV4::ExecutionEngine *v4engine() const { return e; } private: @@ -181,9 +181,9 @@ public: QV4::ReturnedValue global(); QQmlDelayedCallQueue *delayedCallQueue() { return &m_delayedCallQueue; } - void *xmlHttpRequestData() { return m_xmlHttpRequestData; } + void *xmlHttpRequestData() const { return m_xmlHttpRequestData; } - Deletable *listModelData() { return m_listModelData; } + Deletable *listModelData() const { return m_listModelData; } void setListModelData(Deletable *d) { if (m_listModelData) delete m_listModelData; m_listModelData = d; } void freezeObject(const QV4::Value &value); |