Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
profileevaluator.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef PROFILEEVALUATOR_H
5#define PROFILEEVALUATOR_H
6
7#include "qmake_global.h"
8#include "qmakeglobals.h"
10#include "proitems.h"
11
12#include <QHash>
13#include <QStringList>
14
15QT_BEGIN_NAMESPACE
16
17class QMakeVfs;
18class QMakeParser;
19class QMakeEvaluator;
20class QMakeHandler;
21
23{
24public:
25 QString sysroot;
26};
27
29{
30public:
39
40 // Call this from a concurrency-free context
41 static void initialize();
42
44 QMakeHandler *handler);
46
48#ifdef PROEVALUATOR_CUMULATIVE
49 void setCumulative(bool on); // Default is false
50#endif
51 void setExtraVars(const QHash<QString, QStringList> &extraVars);
52 void setExtraConfigs(const QStringList &extraConfigs);
53 void setOutputDir(const QString &dir); // Default is empty
54
55 bool loadNamedSpec(const QString &specDir, bool hostSpec);
56
57 bool accept(ProFile *pro, QMakeEvaluator::LoadFlags flags = QMakeEvaluator::LoadAll);
58
59 bool contains(const QString &variableName) const;
60 QString value(const QString &variableName) const;
61 QStringList values(const QString &variableName) const;
62 QStringList values(const QString &variableName, const ProFile *pro) const;
63 QStringList absolutePathValues(const QString &variable, const QString &baseDirectory) const;
65 const QString &variable, const QString &baseDirectory, const QStringList &searchDirs,
66 const ProFile *pro) const;
67 QString propertyValue(const QString &val) const;
68
69 QString resolvedMkSpec() const;
70
71private:
72 QString sysrootify(const QString &path, const QString &baseDir) const;
73
75};
76
77QT_END_NAMESPACE
78
79#endif // PROFILEEVALUATOR_H
int main(int argc, char *argv[])
[2]
Definition buffer.cpp:77
void message(int type, const QString &msg, const QString &fileName, int lineNo) override
Definition main.cpp:100
void fileMessage(int type, const QString &msg) override
Definition main.cpp:106
void doneWithEval(ProFile *) override
Definition main.cpp:115
void aboutToEval(ProFile *, ProFile *, EvalFileType) override
Definition main.cpp:114
bool verbose
Definition main.cpp:117
ProFileEvaluator::TemplateType templateType() const
ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeVfs *vfs, QMakeHandler *handler)
void setExtraConfigs(const QStringList &extraConfigs)
void setExtraVars(const QHash< QString, QStringList > &extraVars)
QStringList values(const QString &variableName, const ProFile *pro) const
QString value(const QString &variableName) const
bool contains(const QString &variableName) const
QString resolvedMkSpec() const
static void initialize()
bool accept(ProFile *pro, QMakeEvaluator::LoadFlags flags=QMakeEvaluator::LoadAll)
QStringList absoluteFileValues(const QString &variable, const QString &baseDirectory, const QStringList &searchDirs, const ProFile *pro) const
void setOutputDir(const QString &dir)
QStringList absolutePathValues(const QString &variable, const QString &baseDirectory) const
QStringList values(const QString &variableName) const
QString propertyValue(const QString &val) const
bool loadNamedSpec(const QString &specDir, bool hostSpec)
\inmodule QtCore
Definition qhash.h:821
ReadResult readFile(int id, QString *contents, QString *errStr)
Definition qmakevfs.cpp:165
@ VfsCumulative
Definition qmakevfs.h:41
bool hasError() const
Definition qrcreader.h:17
const QString & asString(const QString &s)
Definition qstring.h:1547
Definition qcompare.h:72
#define QMAKE_EXPORT
#define qPrintable(string)
Definition qstring.h:1552
static void printOut(const QString &out)
Definition main.cpp:29
static void printUsage()
Definition main.cpp:60
QStringList getExcludes(const ProFileEvaluator &visitor, const QString &projectDirPath)
Definition main.cpp:207
static QStringList getSources(const ProFileEvaluator &visitor, const QString &projectDir, QMakeVfs *vfs)
Definition main.cpp:151
static void excludeProjects(const ProFileEvaluator &visitor, QStringList *subProjects)
Definition main.cpp:218
void setValue(QJsonObject &obj, const char *key, T value)
Definition main.cpp:55
static void print(const QString &fileName, int lineNo, const QString &msg)
Definition main.cpp:88
static QJsonValue toJsonValue(const QString &s)
Definition main.cpp:44
static QJsonObject processProject(const QString &proFile, const QStringList &translationsVariables, ProFileGlobals *option, QMakeVfs *vfs, QMakeParser *parser, ProFileEvaluator &visitor)
Definition main.cpp:237
static EvalHandler evalHandler
Definition main.cpp:120
static QJsonValue toJsonValue(const QJsonValue &v)
Definition main.cpp:39
static QStringList getSources(const char *var, const char *vvar, const QStringList &baseVPaths, const QString &projectDir, const ProFileEvaluator &visitor)
Definition main.cpp:142
static QJsonArray processProjects(bool topLevel, const QStringList &proFiles, const QStringList &translationsVariables, const QHash< QString, QString > &outDirMap, ProFileGlobals *option, QMakeVfs *vfs, QMakeParser *parser, bool *fail)
Definition main.cpp:281
static QStringList getResources(const QString &resourceFile, QMakeVfs *vfs)
Definition main.cpp:122
static void printErr(const QString &out)
Definition main.cpp:34