Commit f092ad0a authored by Robert Loehning's avatar Robert Loehning

Simplify TestResultsPane::visibilityChanged

Change-Id: Ie278384bb0fe899989a01a0ad89455b11059787f
Reviewed-by: 's avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 21afdf22
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment