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:
@@ -27,6 +27,10 @@
|
||||
|
||||
#include "../itestparser.h"
|
||||
|
||||
#include "qttesttreeitem.h"
|
||||
|
||||
namespace CppTools { class CppModelManager; }
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
|
||||
@@ -52,6 +56,8 @@ public:
|
||||
const QString &fileName) override;
|
||||
|
||||
private:
|
||||
QString testClass(const CppTools::CppModelManager *modelManager, const QString &fileName) const;
|
||||
QHash<QString, QtTestCodeLocationList> checkForDataTags(const QString &fileName) const;
|
||||
QHash<QString, QString> m_testCaseNames;
|
||||
QMultiHash<QString, QString> m_alternativeFiles;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user