diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-04-16 14:04:36 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-06-24 16:40:34 +0300 |
commit | e9b28403273fb2522ecf34164f8f768bbc7c644e (patch) | |
tree | 4d371bcc73e6a1770266957c72d91aa9a1ee2fc9 /plugins/autotest/testtreemodel.h | |
parent | 8260b79458927cff98b4c09f7e0083753effc40d (diff) | |
download | qt-creator-e9b28403273fb2522ecf34164f8f768bbc7c644e.tar.gz |
Provide 'Run This Test' context menu entry
This menu entry will be added only if current selected test (function)
is not an unnamed Quick Test. Otherwise it's now possible to execute
a particular test case or just a single test function by using the
context menu. This avoids the need of (de)selecting inside the model.
Change-Id: I857a3ffe72c72a9dbb06e948045cfe2c7843935d
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'plugins/autotest/testtreemodel.h')
-rw-r--r-- | plugins/autotest/testtreemodel.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/autotest/testtreemodel.h b/plugins/autotest/testtreemodel.h index 15a00ecb38..785606c36a 100644 --- a/plugins/autotest/testtreemodel.h +++ b/plugins/autotest/testtreemodel.h @@ -31,7 +31,8 @@ namespace { enum ItemRole { // AnnotationRole = Qt::UserRole + 1, LinkRole = Qt::UserRole + 2, // can be removed if AnnotationRole comes back - ItalicRole // used only inside the delegate + ItalicRole, // used only inside the delegate + TypeRole }; } @@ -71,6 +72,7 @@ public: bool hasTests() const; QList<TestConfiguration *> getAllTestCases() const; QList<TestConfiguration *> getSelectedTests() const; + TestConfiguration *getTestConfiguration(const TestTreeItem *item) const; QString getMainFileForUnnamedQuickTest(const QString &qmlFile) const; void qmlFilesForMainFile(const QString &mainFile, QSet<QString> *filePaths) const; QList<QString> getUnnamedQuickTestFunctions() const; |