aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@theqtcompany.com>2015-05-29 13:45:35 +0200
committerRobert Loehning <robert.loehning@theqtcompany.com>2015-05-29 15:02:52 +0300
commitf092ad0a2ef4e7c6b8230a5289c25725ff47bcdd (patch)
treee27a3a6b4eac34b82f9eaaa180948c39c6db246c
parent21afdf227aeec4a5d4cfe8d32588cce25d0e4cf5 (diff)
Simplify TestResultsPane::visibilityChangedat-v3.4.2at-3.4
Change-Id: Ie278384bb0fe899989a01a0ad89455b11059787f Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r--plugins/autotest/testresultspane.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/autotest/testresultspane.cpp b/plugins/autotest/testresultspane.cpp
index 3d9e874bdf..0d6b9052b8 100644
--- a/plugins/autotest/testresultspane.cpp
+++ b/plugins/autotest/testresultspane.cpp
@@ -185,23 +185,20 @@ void TestResultsPane::clearContents()
void TestResultsPane::visibilityChanged(bool visible)
{
+ if (visible == m_wasVisibleBefore)
+ return;
if (visible) {
- if (m_wasVisibleBefore)
- return;
connect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged,
this, &TestResultsPane::onTestTreeModelChanged);
// make sure run/run all are in correct state
onTestTreeModelChanged();
- m_wasVisibleBefore = true;
TestTreeModel::instance()->enableParsing();
} else {
- if (!m_wasVisibleBefore)
- return;
disconnect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged,
this, &TestResultsPane::onTestTreeModelChanged);
- m_wasVisibleBefore = false;
TestTreeModel::instance()->disableParsing();
}
+ m_wasVisibleBefore = visible;
}
void TestResultsPane::setFocus()