diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2017-05-11 18:58:04 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2017-06-01 09:43:18 +0000 |
commit | 3bc2ce1864e1174b2fb2becedd766a7ad6da87cc (patch) | |
tree | ebcdc5c6786bc5fe7e93695b6de093519f2e0b7f /src/plugins/autotest | |
parent | e1c7c91c9e3342b09d130f36884264af91524843 (diff) | |
download | qt-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.cpp | 5 |
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; |