From f99f5dcdc6f1ae26145242712985ca42d724e34d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 29 Feb 2016 11:14:40 +0100 Subject: AutoTest: Fix enabled state of Run buttons of results pane Run buttons of the results pane might stay disabled after a parse if no items would be swept. Change-Id: I3df800ec0b42fa7de2b010a911922427da51df3c Reviewed-by: David Schulz --- src/plugins/autotest/testtreemodel.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp index 502a24507f..0d00fdc7c4 100644 --- a/src/plugins/autotest/testtreemodel.cpp +++ b/src/plugins/autotest/testtreemodel.cpp @@ -561,14 +561,13 @@ void TestTreeModel::markForRemoval(const QString &filePath) void TestTreeModel::sweep() { - bool hasChanged = false; Type types[] = { AutoTest, QuickTest, GoogleTest }; for (Type type : types) { TestTreeItem *root = rootItemForType(type); - hasChanged |= sweepChildren(root); + sweepChildren(root); } - if (hasChanged) - emit testTreeModelChanged(); + // even if nothing has changed by the sweeping we might had parse which added or modified items + emit testTreeModelChanged(); #ifdef WITH_TESTS if (m_parser->state() == TestCodeParser::Idle && !m_parser->furtherParsingExpected()) emit sweepingDone(); -- cgit v1.2.1