summaryrefslogtreecommitdiff
path: root/src/plugins/autotest
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2017-05-11 18:58:04 +0200
committerTim Jenssen <tim.jenssen@qt.io>2017-06-01 09:43:18 +0000
commit3bc2ce1864e1174b2fb2becedd766a7ad6da87cc (patch)
treeebcdc5c6786bc5fe7e93695b6de093519f2e0b7f /src/plugins/autotest
parente1c7c91c9e3342b09d130f36884264af91524843 (diff)
downloadqt-creator-3bc2ce1864e1174b2fb2becedd766a7ad6da87cc.tar.gz
fix uint warning and use vector::reverse_iterator
Change-Id: I23b201dd3452c0c9581ec94928020838f0624573 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r--src/plugins/autotest/testresultmodel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/autotest/testresultmodel.cpp b/src/plugins/autotest/testresultmodel.cpp
index 45988d8e4e..c962b8a19f 100644
--- a/src/plugins/autotest/testresultmodel.cpp
+++ b/src/plugins/autotest/testresultmodel.cpp
@@ -225,8 +225,9 @@ void TestResultModel::addTestResult(const TestResultPtr &testResult, bool autoEx
void TestResultModel::removeCurrentTestMessage()
{
std::vector<Utils::TreeItem *> topLevelItems(rootItem()->begin(), rootItem()->end());
- for (int row = topLevelItems.size() - 1; row >= 0; --row) {
- TestResultItem *current = static_cast<TestResultItem *>(topLevelItems[row]);
+ auto end = topLevelItems.rend();
+ for (auto it = topLevelItems.rbegin(); it != end; ++it) {
+ TestResultItem *current = static_cast<TestResultItem *>(*it);
if (current->testResult()->result() == Result::MessageCurrentTest) {
destroyItem(current);
break;