AutoTest: Remove indirection when retrieving configuration

Change-Id: Ia77dd1880da9b4b8d83456af231fe32724427552
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-06-15 09:07:39 +02:00
parent a0cceb2810
commit 4d1918c93f
3 changed files with 1 additions and 8 deletions

View File

@@ -271,7 +271,7 @@ void TestNavigationWidget::onRunThisTestTriggered()
return; return;
TestTreeItem *item = static_cast<TestTreeItem *>(sourceIndex.internalPointer()); TestTreeItem *item = static_cast<TestTreeItem *>(sourceIndex.internalPointer());
if (TestConfiguration *configuration = m_model->getTestConfiguration(item)) { if (TestConfiguration *configuration = item->testConfiguration()) {
TestRunner *runner = TestRunner::instance(); TestRunner *runner = TestRunner::instance();
runner->setSelectedTests( {configuration} ); runner->setSelectedTests( {configuration} );
runner->prepareToRunTests(); runner->prepareToRunTests();

View File

@@ -187,12 +187,6 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
return result; return result;
} }
TestConfiguration *TestTreeModel::getTestConfiguration(const TestTreeItem *item) const
{
QTC_ASSERT(item != 0, return 0);
return item->testConfiguration();
}
void TestTreeModel::syncTestFrameworks() void TestTreeModel::syncTestFrameworks()
{ {
// remove all currently registered // remove all currently registered

View File

@@ -58,7 +58,6 @@ public:
bool hasTests() const; bool hasTests() const;
QList<TestConfiguration *> getAllTestCases() const; QList<TestConfiguration *> getAllTestCases() const;
QList<TestConfiguration *> getSelectedTests() const; QList<TestConfiguration *> getSelectedTests() const;
TestConfiguration *getTestConfiguration(const TestTreeItem *item) const;
void syncTestFrameworks(); void syncTestFrameworks();