Fix getSelectedTests() for Quick Tests having special functions

Quick Tests with special functions (init(), cleanup(),...)
must not try to execute these functions explicitly.

Change-Id: Ia9a4e9c2788110bb61a70796b0e3a4b9b2091a49
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-08-19 13:35:33 +02:00
committed by David Schulz
parent 5386fda851
commit 3ee77bd119

View File

@@ -475,6 +475,8 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
int grandChildCount = child->childCount();
for (int grandChildRow = 0; grandChildRow < grandChildCount; ++grandChildRow) {
const TestTreeItem *grandChild = child->child(grandChildRow);
if (grandChild->type() != TestTreeItem::TEST_FUNCTION)
continue;
if (grandChild->checked() == Qt::Checked)
testFunctions << child->name() + QLatin1String("::") + grandChild->name();
}