ExtraCompiler: Hide some methods in protected section

Replace setCompileTime() with updateCompileTime().

Change-Id: I0ab2262787fc1a6c374e8e2b524f1cfad05fcbbf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-03 15:12:25 +01:00
parent d2f1ac542f
commit 2afb31f371
2 changed files with 6 additions and 16 deletions

View File

@@ -134,14 +134,9 @@ void ExtraCompiler::forEachTarget(std::function<void (const FilePath &)> func)
func(it.key());
}
void ExtraCompiler::setCompileTime(const QDateTime &time)
void ExtraCompiler::updateCompileTime()
{
d->compileTime = time;
}
QDateTime ExtraCompiler::compileTime() const
{
return d->compileTime;
d->compileTime = QDateTime::currentDateTime();
}
QThreadPool *ExtraCompiler::extraCompilerThreadPool()
@@ -427,7 +422,7 @@ void ProcessExtraCompiler::cleanUp()
for (auto it = data.constBegin(), end = data.constEnd(); it != end; ++it)
setContent(it.key(), it.value());
setCompileTime(QDateTime::currentDateTime());
updateCompileTime();
}
} // namespace ProjectExplorer

View File

@@ -45,19 +45,11 @@ public:
const Project *project() const;
Utils::FilePath source() const;
// You can set the contents from the outside. This is done if the file has been (re)created by
// the regular build process.
void setContent(const Utils::FilePath &file, const QByteArray &content);
QByteArray content(const Utils::FilePath &file) const;
Utils::FilePaths targets() const;
void forEachTarget(std::function<void(const Utils::FilePath &)> func);
void setCompileTime(const QDateTime &time);
QDateTime compileTime() const;
static QThreadPool *extraCompilerThreadPool();
virtual QFuture<FileNameToContentsHash> run() = 0;
bool isDirty() const;
@@ -65,6 +57,9 @@ signals:
void contentsChanged(const Utils::FilePath &file);
protected:
static QThreadPool *extraCompilerThreadPool();
void setContent(const Utils::FilePath &file, const QByteArray &content);
void updateCompileTime();
Utils::Environment buildEnvironment() const;
void setCompileIssues(const Tasks &issues);