Skip to content
Snippets Groups Projects
Commit f092ad0a authored by Robert Loehning's avatar Robert Loehning
Browse files

Simplify TestResultsPane::visibilityChanged


Change-Id: Ie278384bb0fe899989a01a0ad89455b11059787f
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 21afdf22
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment