forked from qt-creator/qt-creator
AutoTest: Remove some unused member
Change-Id: Iea332afc23c58aa0a3de1f3364eea519a422d524 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -36,12 +36,9 @@ namespace Internal {
|
||||
|
||||
using namespace CPlusPlus;
|
||||
|
||||
CatchCodeParser::CatchCodeParser(const QByteArray &source, const LanguageFeatures &features,
|
||||
const Document::Ptr &doc, const Snapshot &snapshot)
|
||||
CatchCodeParser::CatchCodeParser(const QByteArray &source, const LanguageFeatures &features)
|
||||
: m_source(source)
|
||||
, m_features(features)
|
||||
, m_doc(doc)
|
||||
, m_snapshot(snapshot)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "catchtreeitem.h"
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/SimpleLexer.h>
|
||||
|
||||
#include <QByteArray>
|
||||
@@ -38,8 +37,7 @@ namespace Internal {
|
||||
class CatchCodeParser
|
||||
{
|
||||
public:
|
||||
CatchCodeParser(const QByteArray &source, const CPlusPlus::LanguageFeatures &features,
|
||||
const CPlusPlus::Document::Ptr &doc, const CPlusPlus::Snapshot &snapshot);
|
||||
CatchCodeParser(const QByteArray &source, const CPlusPlus::LanguageFeatures &features);
|
||||
virtual ~CatchCodeParser() = default;
|
||||
CatchTestCodeLocationList findTests();
|
||||
private:
|
||||
@@ -56,12 +54,9 @@ private:
|
||||
|
||||
const QByteArray &m_source;
|
||||
const CPlusPlus::LanguageFeatures &m_features;
|
||||
const CPlusPlus::Document::Ptr &m_doc;
|
||||
const CPlusPlus::Snapshot &m_snapshot;
|
||||
CPlusPlus::Tokens m_tokens;
|
||||
int m_currentIndex = 0;
|
||||
CatchTestCodeLocationList m_testCases;
|
||||
int m_lineNo = 0;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -97,7 +97,6 @@ static bool hasCatchNames(const CPlusPlus::Document::Ptr &document)
|
||||
|
||||
static bool handleCatchDocument(QFutureInterface<TestParseResultPtr> futureInterface,
|
||||
const CPlusPlus::Document::Ptr &doc,
|
||||
const CPlusPlus::Snapshot &snapshot,
|
||||
ITestFramework *framework)
|
||||
{
|
||||
const CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance();
|
||||
@@ -111,7 +110,7 @@ static bool handleCatchDocument(QFutureInterface<TestParseResultPtr> futureInter
|
||||
const CppTools::ProjectPart::Ptr projectPart = projectParts.first();
|
||||
proFile = projectPart->projectFile;
|
||||
|
||||
CatchCodeParser codeParser(fileContent, projectPart->languageFeatures, doc, snapshot);
|
||||
CatchCodeParser codeParser(fileContent, projectPart->languageFeatures);
|
||||
const CatchTestCodeLocationList foundTests = codeParser.findTests();
|
||||
|
||||
CatchParseResult *parseResult = new CatchParseResult(framework);
|
||||
@@ -145,7 +144,7 @@ bool CatchTestParser::processDocument(QFutureInterface<TestParseResultPtr> futur
|
||||
if (doc.isNull() || !includesCatchHeader(doc, m_cppSnapshot) || !hasCatchNames(doc))
|
||||
return false;
|
||||
|
||||
return handleCatchDocument(futureInterface, doc, m_cppSnapshot, framework());
|
||||
return handleCatchDocument(futureInterface, doc, framework());
|
||||
}
|
||||
|
||||
TestTreeItem *CatchParseResult::createTestTreeItem() const
|
||||
|
Reference in New Issue
Block a user