forked from qt-creator/qt-creator
AutoTest: Remove indirection when retrieving configuration
Change-Id: Ia77dd1880da9b4b8d83456af231fe32724427552 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -271,7 +271,7 @@ void TestNavigationWidget::onRunThisTestTriggered()
|
||||
return;
|
||||
|
||||
TestTreeItem *item = static_cast<TestTreeItem *>(sourceIndex.internalPointer());
|
||||
if (TestConfiguration *configuration = m_model->getTestConfiguration(item)) {
|
||||
if (TestConfiguration *configuration = item->testConfiguration()) {
|
||||
TestRunner *runner = TestRunner::instance();
|
||||
runner->setSelectedTests( {configuration} );
|
||||
runner->prepareToRunTests();
|
||||
|
||||
@@ -187,12 +187,6 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
|
||||
return result;
|
||||
}
|
||||
|
||||
TestConfiguration *TestTreeModel::getTestConfiguration(const TestTreeItem *item) const
|
||||
{
|
||||
QTC_ASSERT(item != 0, return 0);
|
||||
return item->testConfiguration();
|
||||
}
|
||||
|
||||
void TestTreeModel::syncTestFrameworks()
|
||||
{
|
||||
// remove all currently registered
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
bool hasTests() const;
|
||||
QList<TestConfiguration *> getAllTestCases() const;
|
||||
QList<TestConfiguration *> getSelectedTests() const;
|
||||
TestConfiguration *getTestConfiguration(const TestTreeItem *item) const;
|
||||
|
||||
void syncTestFrameworks();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user