aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloaderqmldircontent.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-10-04 14:13:36 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-10-07 09:09:49 +0200
commitce94b847c87e2606c5f189d2ad3715c1d025b9cf (patch)
tree94ccb94300d87ddafb465ce82c6f60601ce0749b /src/qml/qml/qqmltypeloaderqmldircontent.cpp
parent2b371a50cbc1f54284fcea3834834ca58fc28fd0 (diff)
Small performance improvements suggested by clang-tidy
mostly add const &, a few std::move and in particular case, remove const so the std::move being done over the variable actually has effect Change-Id: Id611cd31bc012f219d7a17d4626b1c2a5fbddd66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypeloaderqmldircontent.cpp')
-rw-r--r--src/qml/qml/qqmltypeloaderqmldircontent.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypeloaderqmldircontent.cpp b/src/qml/qml/qqmltypeloaderqmldircontent.cpp
index 238af9b710..8e983db756 100644
--- a/src/qml/qml/qqmltypeloaderqmldircontent.cpp
+++ b/src/qml/qml/qqmltypeloaderqmldircontent.cpp
@@ -55,7 +55,8 @@ QList<QQmlError> QQmlTypeLoaderQmldirContent::errors(const QString &uri) const
{
QList<QQmlError> errors;
const QUrl url(uri);
- for (const auto parseError : m_parser.errors(uri)) {
+ const auto parseErrors = m_parser.errors(uri);
+ for (const auto &parseError : parseErrors) {
QQmlError error;
error.setUrl(url);
error.setLine(parseError.line);