diff options
author | The Qt Project <gerrit-noreply@qt-project.org> | 2019-08-07 11:40:58 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-08-07 11:40:58 +0000 |
commit | 52c5a37ea8c18f6c609e5beec696376c30d7b6db (patch) | |
tree | d910f8fd7fee67e467d087a4a46367fa5d8b84b0 | |
parent | 456beb67e2e718d9b4674133d7d71c708e5cab94 (diff) | |
parent | 2cfff0303fbab3fc9f9dd2b31132e2efce1e474f (diff) |
Merge "Merge 1.14 into master"
-rw-r--r-- | src/lib/corelib/generators/generatordata.h | 20 | ||||
-rw-r--r-- | src/lib/corelib/parser/qmljslexer.cpp | 2 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/lib/corelib/generators/generatordata.h b/src/lib/corelib/generators/generatordata.h index b6200339e..da65815ad 100644 --- a/src/lib/corelib/generators/generatordata.h +++ b/src/lib/corelib/generators/generatordata.h @@ -72,21 +72,15 @@ template <typename U> struct IMultiplexableContainer { void forEach(const std::function<void(const QString &configurationName, const U &data)> &func) const { - QMapIterator<QString, U> it(data); - while (it.hasNext()) { - it.next(); + for (auto it = data.cbegin(), end = data.cend(); it != end; ++it) func(it.key(), it.value()); - } } void forEach(const std::function<void(const std::string &configurationName, const U &data)> &func) const { - QMapIterator<QString, U> it(data); - while (it.hasNext()) { - it.next(); + for (auto it = data.cbegin(), end = data.cend(); it != end; ++it) func(it.key().toStdString(), it.value()); - } } const U operator[](const QString &configurationName) const @@ -147,21 +141,15 @@ struct QBS_EXPORT GeneratableProject : public GeneratableProjectData { void forEach(const std::function<void(const QString &configurationName, const Project &data)> &func) const { - QMapIterator<QString, Project> it(projects); - while (it.hasNext()) { - it.next(); + for (auto it = projects.cbegin(), end = projects.cend(); it != end; ++it) func(it.key(), it.value()); - } } void forEach(const std::function<void(const std::string &configurationName, const Project &data)> &func) const { - QMapIterator<QString, Project> it(projects); - while (it.hasNext()) { - it.next(); + for (auto it = projects.cbegin(), end = projects.cend(); it != end; ++it) func(it.key().toStdString(), it.value()); - } } const Project operator[](const QString &configurationName) const diff --git a/src/lib/corelib/parser/qmljslexer.cpp b/src/lib/corelib/parser/qmljslexer.cpp index ef57ab84a..dc6ac8a0f 100644 --- a/src/lib/corelib/parser/qmljslexer.cpp +++ b/src/lib/corelib/parser/qmljslexer.cpp @@ -73,7 +73,7 @@ static unsigned char convertHex(ushort c) static QChar convertHex(QChar c1, QChar c2) { - return {(convertHex(c1.unicode()) << 4) + convertHex(c2.unicode())}; + return QChar{(convertHex(c1.unicode()) << 4) + convertHex(c2.unicode())}; } static QChar convertUnicode(QChar c1, QChar c2, QChar c3, QChar c4) |