forked from qt-creator/qt-creator
Autotests: emit testTreeModelChanged when new tests are added.
The signal used to be emitted only on reset or when tests are actually removed during sweep phase: thus the 'run tests' button in test panel stayed disabled if the panel was opened while tests were scanned. Change-Id: I274c9d03f1e1140c8aa375f92465c5a0c866cd62 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -42,7 +42,7 @@ TestTreeItem::TestTreeItem(const QString &name, const QString &filePath, Type ty
|
||||
m_filePath(filePath),
|
||||
m_type(type),
|
||||
m_line(0),
|
||||
m_markedForRemoval(false)
|
||||
m_status(NewlyAdded)
|
||||
{
|
||||
m_checked = (m_type == TestCase || m_type == TestFunctionOrSet) ? Qt::Checked : Qt::Unchecked;
|
||||
}
|
||||
@@ -207,12 +207,12 @@ Qt::CheckState TestTreeItem::checked() const
|
||||
|
||||
void TestTreeItem::markForRemoval(bool mark)
|
||||
{
|
||||
m_markedForRemoval = mark;
|
||||
m_status = mark ? MarkedForRemoval : Cleared;
|
||||
}
|
||||
|
||||
void TestTreeItem::markForRemovalRecursively(bool mark)
|
||||
{
|
||||
m_markedForRemoval = mark;
|
||||
markForRemoval(mark);
|
||||
for (int row = 0, count = childCount(); row < count; ++row)
|
||||
childItem(row)->markForRemovalRecursively(mark);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user