AutoTest: Use using namespace Utils more often

Change-Id: I9d20cd3496c4719d58a977f8fd53253c86d55463
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-01-16 15:00:15 +01:00
parent d05c5b7d07
commit bc3ebef7ce
41 changed files with 343 additions and 310 deletions

View File

@@ -24,7 +24,7 @@ CppParser::CppParser(ITestFramework *framework)
{
}
void CppParser::init(const Utils::FilePaths &filesToParse, bool fullParse)
void CppParser::init(const FilePaths &filesToParse, bool fullParse)
{
Q_UNUSED(filesToParse)
Q_UNUSED(fullParse)
@@ -32,7 +32,7 @@ void CppParser::init(const Utils::FilePaths &filesToParse, bool fullParse)
m_workingCopy = CppEditor::CppModelManager::instance()->workingCopy();
}
bool CppParser::selectedForBuilding(const Utils::FilePath &fileName)
bool CppParser::selectedForBuilding(const FilePath &fileName)
{
QList<CppEditor::ProjectPart::ConstPtr> projParts =
CppEditor::CppModelManager::instance()->projectPart(fileName);
@@ -40,7 +40,7 @@ bool CppParser::selectedForBuilding(const Utils::FilePath &fileName)
return !projParts.isEmpty() && projParts.at(0)->selectedForBuilding;
}
QByteArray CppParser::getFileContent(const Utils::FilePath &filePath) const
QByteArray CppParser::getFileContent(const FilePath &filePath) const
{
QByteArray fileContent;
if (m_workingCopy.contains(filePath)) {
@@ -48,8 +48,8 @@ QByteArray CppParser::getFileContent(const Utils::FilePath &filePath) const
} else {
QString error;
const QTextCodec *codec = Core::EditorManager::defaultTextCodec();
if (Utils::TextFileFormat::readFileUTF8(filePath, codec, &fileContent, &error)
!= Utils::TextFileFormat::ReadSuccess) {
if (TextFileFormat::readFileUTF8(filePath, codec, &fileContent, &error)
!= TextFileFormat::ReadSuccess) {
qDebug() << "Failed to read file" << filePath << ":" << error;
}
}
@@ -58,7 +58,7 @@ QByteArray CppParser::getFileContent(const Utils::FilePath &filePath) const
}
bool precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
const Utils::FilePath &filePath,
const FilePath &filePath,
const QString &cacheString,
const std::function<bool(const FilePath &)> &checker)
{
@@ -82,7 +82,7 @@ bool precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
}
bool CppParser::precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
const Utils::FilePath &filePath,
const FilePath &filePath,
const QString &headerFilePath)
{
return Autotest::precompiledHeaderContains(snapshot,
@@ -94,7 +94,7 @@ bool CppParser::precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
}
bool CppParser::precompiledHeaderContains(const CPlusPlus::Snapshot &snapshot,
const Utils::FilePath &filePath,
const FilePath &filePath,
const QRegularExpression &headerFileRegex)
{
return Autotest::precompiledHeaderContains(snapshot,
@@ -113,7 +113,7 @@ void CppParser::release()
s_pchLookupCache.clear();
}
CPlusPlus::Document::Ptr CppParser::document(const Utils::FilePath &fileName)
CPlusPlus::Document::Ptr CppParser::document(const FilePath &fileName)
{
return selectedForBuilding(fileName) ? m_cppSnapshot.document(fileName) : nullptr;
}