aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-07-19 19:25:25 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-20 19:30:29 +0000
commit51dbd978eeac258fbc34ecb06d990efb90a58866 (patch)
treea76ecbcf56b869adbc1ad8183a00d68fe8aa130b /src/qml/qml
parent0a2bd3df1f3be29b8d3351731eb8b79002537f82 (diff)
qml: Pass non-trivially-copyable types by const-ref
Change-Id: Id3d960ee8236a4c6f4bb4e0add1f88dfa32d3592 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlimport.cpp4
-rw-r--r--src/qml/qml/qqmlmetatype.cpp2
-rw-r--r--src/qml/qml/qqmlmetatype_p.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 87ee8078f4..cf509a96ec 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -385,7 +385,7 @@ void QQmlImports::populateCache(QQmlTypeNameCache *cache) const
// We need to exclude the entry for the current baseUrl. This can happen for example
// when handling qmldir files on the remote dir case and the current type is marked as
// singleton.
-bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QString baseUrl)
+bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QString &baseUrl)
{
if (importUrl.isEmpty())
return false;
@@ -401,7 +401,7 @@ bool excludeBaseUrl(const QString &importUrl, const QString &fileName, const QSt
return true;
}
-void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::CompositeSingletonReference> &resultList, QUrl baseUrl)
+void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::CompositeSingletonReference> &resultList, const QUrl &baseUrl)
{
typedef QQmlDirComponents::const_iterator ConstIterator;
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 55df65e607..41629801ea 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -255,7 +255,7 @@ QObject *QQmlType::SingletonInstanceInfo::qobjectApi(QQmlEngine *e) const
return qobjectApis.value(e);
}
-void QQmlType::SingletonInstanceInfo::setScriptApi(QQmlEngine *e, QJSValue v)
+void QQmlType::SingletonInstanceInfo::setScriptApi(QQmlEngine *e, const QJSValue &v)
{
scriptApis.insert(e, v);
}
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index e5ac20d314..61a6567f1d 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -191,7 +191,7 @@ public:
void setQObjectApi(QQmlEngine *, QObject *);
QObject *qobjectApi(QQmlEngine *) const;
- void setScriptApi(QQmlEngine *, QJSValue);
+ void setScriptApi(QQmlEngine *, const QJSValue &);
QJSValue scriptApi(QQmlEngine *) const;
void init(QQmlEngine *);