diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-02-05 13:32:00 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-02-16 15:42:25 +0200 |
commit | 61c50e4aa343387b56192a34db6384d1dfcfa3c5 (patch) | |
tree | f16697dcf8dadcd422729a49a7a053e1d45f179a /plugins/autotest/testtreemodel.cpp | |
parent | 2ece8b61814a38a58e70f6209f3e6adf8657b481 (diff) | |
download | qt-creator-61c50e4aa343387b56192a34db6384d1dfcfa3c5.tar.gz |
Fix wrong behavior for gathering test configuration
If the current project mixed named and unnamed Quick tests
determing the test configuration failed due to running into
the assert if you had no auto tests for the current project
selected as well.
Change-Id: I5c98316fada704cd7e021becab897d168a19b99b
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
Diffstat (limited to 'plugins/autotest/testtreemodel.cpp')
-rw-r--r-- | plugins/autotest/testtreemodel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp index 81e4d4bfc9..9c8d235a04 100644 --- a/plugins/autotest/testtreemodel.cpp +++ b/plugins/autotest/testtreemodel.cpp @@ -464,13 +464,13 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const QTC_ASSERT(testConfiguration, qWarning() << "Illegal state (unnamed Quick Test listed as named)"; return QList<TestConfiguration *>()); - foundMains[mainFile]->setTestCaseCount(testConfiguration->testCaseCount()); + foundMains[mainFile]->setTestCaseCount(testConfiguration->testCaseCount() + 1); } else { - TestConfiguration *tc = new TestConfiguration(QString(), QStringList()); - tc->setTestCaseCount(1); - tc->setUnnamedOnly(true); - addProjectInformation(tc, mainFile); - foundMains.insert(mainFile, tc); + testConfiguration = new TestConfiguration(QString(), QStringList()); + testConfiguration->setTestCaseCount(1); + testConfiguration->setUnnamedOnly(true); + addProjectInformation(testConfiguration, mainFile); + foundMains.insert(mainFile, testConfiguration); } } } |