AutoTest: Use Utils::FilePath for files and directories

Still some missing bits as some QString members had different meanings
depending on their context.

Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-05-26 15:50:03 +02:00
parent e8286088b1
commit 5525f2b112
70 changed files with 376 additions and 371 deletions

View File

@@ -52,16 +52,17 @@ class QtTestParser : public CppParser
public:
explicit QtTestParser(ITestFramework *framework) : CppParser(framework) {}
void init(const QStringList &filesToParse, bool fullParse) override;
void init(const Utils::FilePaths &filesToParse, bool fullParse) override;
void release() override;
bool processDocument(QFutureInterface<TestParseResultPtr> futureInterface,
const QString &fileName) override;
const Utils::FilePath &fileName) override;
private:
QString testClass(const CppTools::CppModelManager *modelManager, const QString &fileName) const;
QString testClass(const CppTools::CppModelManager *modelManager,
const Utils::FilePath &fileName) const;
QHash<QString, QtTestCodeLocationList> checkForDataTags(const QString &fileName) const;
struct TestCaseData {
QString fileName;
Utils::FilePath fileName;
int line = 0;
int column = 0;
QMap<QString, QtTestCodeLocationAndType> testFunctions;
@@ -74,8 +75,8 @@ private:
TestCaseData &data) const;
QtTestParseResult *createParseResult(const QString &testCaseName, const TestCaseData &data,
const QString &projectFile) const;
QHash<QString, QString> m_testCaseNames;
QMultiHash<QString, QString> m_alternativeFiles;
QHash<Utils::FilePath, QString> m_testCaseNames;
QMultiHash<Utils::FilePath, Utils::FilePath> m_alternativeFiles;
};
} // namespace Internal