QmlDesigner: performance-for-range-copy

Avoid copying the loop variable on each iteration if a const reference
would suffice.

For QPointers<>, this change only adds a const.

Change-Id: I5abe7d793cd46859a9a4f9304ec1bd41f899d72c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Alessandro Portale
2020-06-13 23:04:31 +02:00
parent e2670bf3e6
commit 625a35e492
13 changed files with 17 additions and 17 deletions

View File

@@ -294,7 +294,7 @@ void ItemLibraryModel::sortSections()
std::sort(m_sections.begin(), m_sections.end(), sectionSort);
for (auto itemLibrarySection : m_sections)
for (const auto itemLibrarySection : m_sections)
itemLibrarySection->sortItems();
}