Commit 1b11f9b3 authored by Daniel Teske's avatar Daniel Teske

QmakePriFile::update: Don't call buildDir() all the time.

Instead call it once per .pro file and pass that to all .pri file parses
and other functions. This cuts down the number of calls for opening from ~3000 to ~700 and speeds up opening
by roughly 3%.

Change-Id: Iffd46d4bbedc9c380f70e916dae7151495990b39
Reviewed-by: default avatarTobias Hunger <>
parent 0b3d05ae
......@@ -142,7 +142,7 @@ public:
QmakePriFileNode(QmakeProject *project, QmakeProFileNode *qmakeProFileNode, const QString &filePath);
void update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumalative);
void update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumalative, const QString &buildDir);
// ProjectNode interface
......@@ -385,7 +385,7 @@ public:
QString sourceDir() const;
QString buildDir(QmakeBuildConfiguration *bc = 0) const;
QString uiDirectory() const;
QString uiDirectory(const QString &buildDir) const;
static QString uiHeaderFile(const QString &uiDir, const QString &formFile);
QHash<QString, QString> uiFiles() const;
......@@ -432,17 +432,17 @@ private:
typedef QHash<QmakeVariable, QStringList> QmakeVariablesHash;
void updateUiFiles();
void updateUiFiles(const QString &buildDir);
QStringList fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
const QString &varName, const QString &projectDir, const QString &buildDir) const;
QString uiDirPath(QtSupport::ProFileReader *reader) const;
QString mocDirPath(QtSupport::ProFileReader *reader) const;
QStringList includePaths(QtSupport::ProFileReader *reader) const;
QString uiDirPath(QtSupport::ProFileReader *reader, const QString &buildDir) const;
QString mocDirPath(QtSupport::ProFileReader *reader, const QString &buildDir) const;
QStringList includePaths(QtSupport::ProFileReader *reader, const QString &buildDir) const;
QStringList libDirectories(QtSupport::ProFileReader *reader) const;
QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, bool silent) const;
TargetInformation targetInformation(QtSupport::ProFileReader *reader, QtSupport::ProFileReader *readerBuildPass) const;
TargetInformation targetInformation(QtSupport::ProFileReader *reader, QtSupport::ProFileReader *readerBuildPass, const QString &buildDir) const;
void setupInstallsList(const QtSupport::ProFileReader *reader);
bool m_isDeployable;
......@@ -976,7 +976,7 @@ QString QmakeProject::generatedUiHeader(const QString &formFile) const
// the top-level project only.
if (m_rootProjectNode)
if (const QmakeProFileNode *pro = proFileNodeOf(m_rootProjectNode, FormType, formFile))
return QmakeProFileNode::uiHeaderFile(pro->uiDirectory(), formFile);
return QmakeProFileNode::uiHeaderFile(pro->uiDirectory(pro->buildDir()), formFile);
return QString();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment