AutoTest: Take precompiled headers into account

Test frameworks might be added to the precompiled
headers. This in turn would make some pre-checks
whether a file has to be processed or not fail.

Fixes: QTCREATORBUG-25821
Change-Id: Iff69c1a83889cb6f79a3e3f9b2e59c5383989ccd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-06-04 14:28:03 +02:00
parent 684c5f7529
commit 9db6569c43
7 changed files with 143 additions and 12 deletions

View File

@@ -33,6 +33,10 @@
#include <QFutureInterface>
QT_BEGIN_NAMESPACE
class QRegularExpression;
QT_END_NAMESPACE
namespace Autotest {
class ITestFramework;
@@ -85,6 +89,12 @@ public:
CPlusPlus::Document::Ptr document(const Utils::FilePath &fileName);
static bool precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
const Utils::FilePath &filePath,
const QString &headerFilePath);
static bool precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
const Utils::FilePath &filePath,
const QRegularExpression &headerFileRegex);
protected:
CPlusPlus::Snapshot m_cppSnapshot;
CppTools::WorkingCopy m_workingCopy;