summaryrefslogtreecommitdiff
path: root/plugins/autotest/testtreemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/autotest/testtreemodel.cpp')
-rw-r--r--plugins/autotest/testtreemodel.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp
index 1e40493c02..b0451a40d7 100644
--- a/plugins/autotest/testtreemodel.cpp
+++ b/plugins/autotest/testtreemodel.cpp
@@ -715,6 +715,27 @@ bool TestTreeModel::hasUnnamedQuickTests() const
return false;
}
+QStringList TestTreeModel::getSelectedSquishTestCases(const QString &suiteConfPath)
+{
+ QStringList result;
+ const int count = m_squishTestRootItem->childCount();
+ if (count) {
+ for (int row = 0; row < count; ++row) {
+ TestTreeItem *child = m_squishTestRootItem->child(row);
+ if (child->filePath() == suiteConfPath) {
+ const int testCaseCount = child->childCount();
+ for (int testCaseRow = 0; testCaseRow < testCaseCount; ++testCaseRow) {
+ TestTreeItem *grandChild = child->child(testCaseRow);
+ if (grandChild->checked())
+ result.append(grandChild->name());
+ }
+ break;
+ }
+ }
+ }
+ return result;
+}
+
TestTreeItem *TestTreeModel::unnamedQuickTests() const
{
for (int row = 0, count = m_quickTestRootItem->childCount(); row < count; ++row) {