forked from qt-creator/qt-creator
AutoTest: Use working copy of own parser
In TestCodeParser::syncTestFrameworks(), a parser is created for every test framework. As a result, the last parser being created would "win" the global s_parserInstance variable, which is not predictable and probably not intended. So turn CppParser::getFileContent() into a non- static method, avoiding the global variable altogether. Change-Id: I9f7560f1185bc4a3bc7b2b36e89280351998465e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
explicit CppParser(ITestFramework *framework);
|
||||
void init(const QStringList &filesToParse, bool fullParse) override;
|
||||
static bool selectedForBuilding(const QString &fileName);
|
||||
static QByteArray getFileContent(const QString &filePath);
|
||||
QByteArray getFileContent(const QString &filePath) const;
|
||||
void release() override;
|
||||
|
||||
CPlusPlus::Document::Ptr document(const QString &fileName);
|
||||
|
||||
Reference in New Issue
Block a user