forked from qt-creator/qt-creator
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:
@@ -134,14 +134,9 @@ void ExtraCompiler::forEachTarget(std::function<void (const FilePath &)> func)
|
|||||||
func(it.key());
|
func(it.key());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtraCompiler::setCompileTime(const QDateTime &time)
|
void ExtraCompiler::updateCompileTime()
|
||||||
{
|
{
|
||||||
d->compileTime = time;
|
d->compileTime = QDateTime::currentDateTime();
|
||||||
}
|
|
||||||
|
|
||||||
QDateTime ExtraCompiler::compileTime() const
|
|
||||||
{
|
|
||||||
return d->compileTime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QThreadPool *ExtraCompiler::extraCompilerThreadPool()
|
QThreadPool *ExtraCompiler::extraCompilerThreadPool()
|
||||||
@@ -427,7 +422,7 @@ void ProcessExtraCompiler::cleanUp()
|
|||||||
for (auto it = data.constBegin(), end = data.constEnd(); it != end; ++it)
|
for (auto it = data.constBegin(), end = data.constEnd(); it != end; ++it)
|
||||||
setContent(it.key(), it.value());
|
setContent(it.key(), it.value());
|
||||||
|
|
||||||
setCompileTime(QDateTime::currentDateTime());
|
updateCompileTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -45,19 +45,11 @@ public:
|
|||||||
const Project *project() const;
|
const Project *project() const;
|
||||||
Utils::FilePath source() 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;
|
QByteArray content(const Utils::FilePath &file) const;
|
||||||
|
|
||||||
Utils::FilePaths targets() const;
|
Utils::FilePaths targets() const;
|
||||||
void forEachTarget(std::function<void(const Utils::FilePath &)> func);
|
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;
|
virtual QFuture<FileNameToContentsHash> run() = 0;
|
||||||
bool isDirty() const;
|
bool isDirty() const;
|
||||||
|
|
||||||
@@ -65,6 +57,9 @@ signals:
|
|||||||
void contentsChanged(const Utils::FilePath &file);
|
void contentsChanged(const Utils::FilePath &file);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static QThreadPool *extraCompilerThreadPool();
|
||||||
|
void setContent(const Utils::FilePath &file, const QByteArray &content);
|
||||||
|
void updateCompileTime();
|
||||||
Utils::Environment buildEnvironment() const;
|
Utils::Environment buildEnvironment() const;
|
||||||
void setCompileIssues(const Tasks &issues);
|
void setCompileIssues(const Tasks &issues);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user