fix uint warning and use vector::reverse_iterator

Change-Id: I23b201dd3452c0c9581ec94928020838f0624573
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Tim Jenssen
2017-05-11 18:58:04 +02:00
parent e1c7c91c9e
commit 3bc2ce1864

View File

@@ -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;