ClangTools: Cache information about the clazy executable

Fixes: QTCREATORBUG-26237
Change-Id: I43203d58b8ed278664427e3b4112a7c7848354b9
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-08 12:08:55 +02:00
parent 2d77922856
commit bf275331dd
5 changed files with 32 additions and 5 deletions

View File

@@ -27,6 +27,8 @@
#include <utils/fileutils.h>
#include <QDateTime>
#include <QHash>
#include <QPair>
#include <QStringList>
#include <QVector>
@@ -60,11 +62,16 @@ using ClazyChecks = QVector<ClazyCheck>;
class ClazyStandaloneInfo
{
public:
ClazyStandaloneInfo(const QString &executablePath);
static ClazyStandaloneInfo getInfo(const QString &executablePath);
QVersionNumber version;
QStringList defaultChecks;
ClazyChecks supportedChecks;
private:
ClazyStandaloneInfo(const QString &executablePath);
static QHash<Utils::FilePath, QPair<QDateTime, ClazyStandaloneInfo>> cache;
};
} // namespace Internal