diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-04 20:23:46 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-05 07:21:13 (GMT) |
commit | 726b3b6f756e8b486549271062c40d53f996e404 (patch) | |
tree | 728ee8b5fa542092939e07b064c54baf33122514 /Source/QtDialog/QCMakeCacheView.cxx | |
parent | 377d4df2795ad501aa7a08cf5c2ac0ef1208c362 (diff) | |
download | CMake-726b3b6f756e8b486549271062c40d53f996e404.zip CMake-726b3b6f756e8b486549271062c40d53f996e404.tar.gz CMake-726b3b6f756e8b486549271062c40d53f996e404.tar.bz2 |
QtDialog: add reference in foreach
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 29f8daf..67191a9 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -47,7 +47,7 @@ protected: } // check all strings for a match - foreach (QString str, strs) { + foreach (QString const& str, strs) { if (str.contains(this->filterRegExp())) { return true; } @@ -236,12 +236,12 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props) qSort(newP); qSort(newP2); int row_count = 0; - foreach (QCMakeProperty p, newP) { + foreach (QCMakeProperty const& p, newP) { this->insertRow(row_count); this->setPropertyData(this->index(row_count, 0), p, true); row_count++; } - foreach (QCMakeProperty p, newP2) { + foreach (QCMakeProperty const& p, newP2) { this->insertRow(row_count); this->setPropertyData(this->index(row_count, 0), p, false); row_count++; @@ -399,7 +399,7 @@ void QCMakeCacheModel::breakProperties( { QMap<QString, QCMakePropertyList> tmp; // return a map of properties grouped by prefixes, and sorted - foreach (QCMakeProperty p, props) { + foreach (QCMakeProperty const& p, props) { QString prefix = QCMakeCacheModel::prefix(p.Key); tmp[prefix].append(p); } |