CppTools: Rename updateHelper -> updateImpl

Change-Id: If1a1fb97aa2bcfad186c013f2b2cc4b94c66001e
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-12-14 18:42:38 +01:00
parent 566ab175b3
commit 5421615070
6 changed files with 18 additions and 18 deletions

View File

@@ -35,9 +35,9 @@ ClangEditorDocumentParser::ClangEditorDocumentParser(const QString &filePath)
setConfiguration(config);
}
void ClangEditorDocumentParser::updateHelper(const QFutureInterface<void> &,
const CppTools::WorkingCopy &,
const ProjectExplorer::Project *activeProject)
void ClangEditorDocumentParser::updateImpl(const QFutureInterface<void> &,
const CppTools::WorkingCopy &,
const ProjectExplorer::Project *activeProject)
{
State state_ = state();
state_.projectPart = determineProjectPart(filePath(), configuration(), state_, activeProject);

View File

@@ -37,9 +37,9 @@ public:
ClangEditorDocumentParser(const QString &filePath);
private:
void updateHelper(const QFutureInterface<void> &future,
const CppTools::WorkingCopy &,
const ProjectExplorer::Project *activeProject) override;
void updateImpl(const QFutureInterface<void> &future,
const CppTools::WorkingCopy &,
const ProjectExplorer::Project *activeProject) override;
};
} // namespace ClangCodeModel

View File

@@ -41,13 +41,13 @@ namespace CppTools {
It's meant to be used in the C++ editor to get precise results by using
the "best" project part for a file.
Derived classes are expected to implement updateHelper() this way:
Derived classes are expected to implement updateImpl() this way:
\list
\li Get a copy of the configuration and the last state.
\li Work on the data and do whatever is necessary. At least, update
the project part with the help of determineProjectPart().
\li Ensure the new state is set before updateHelper() returns.
\li Ensure the new state is set before updateImpl() returns.
\endlist
*/
@@ -89,7 +89,7 @@ void BaseEditorDocumentParser::update(const QFutureInterface<void> &future,
const ProjectExplorer::Project *activeProject)
{
QMutexLocker locker(&m_updateIsRunning);
updateHelper(future, workingCopy, activeProject);
updateImpl(future, workingCopy, activeProject);
}
BaseEditorDocumentParser::State BaseEditorDocumentParser::state() const

View File

@@ -84,9 +84,9 @@ protected:
mutable QMutex m_stateAndConfigurationMutex;
private:
virtual void updateHelper(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject) = 0;
virtual void updateImpl(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject) = 0;
const QString m_filePath;
Configuration m_configuration;

View File

@@ -55,9 +55,9 @@ BuiltinEditorDocumentParser::BuiltinEditorDocumentParser(const QString &filePath
qRegisterMetaType<CPlusPlus::Snapshot>("CPlusPlus::Snapshot");
}
void BuiltinEditorDocumentParser::updateHelper(const QFutureInterface<void> &future,
const WorkingCopy &theWorkingCopy,
const ProjectExplorer::Project *activeProject)
void BuiltinEditorDocumentParser::updateImpl(const QFutureInterface<void> &future,
const WorkingCopy &theWorkingCopy,
const ProjectExplorer::Project *activeProject)
{
if (filePath().isEmpty())
return;

View File

@@ -58,9 +58,9 @@ public:
static Ptr get(const QString &filePath);
private:
void updateHelper(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject) override;
void updateImpl(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject) override;
void addFileAndDependencies(CPlusPlus::Snapshot *snapshot,
QSet<Utils::FileName> *toRemove,
const Utils::FileName &fileName) const;