diff options
author | hjk <hjk@qt.io> | 2019-11-15 18:42:11 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-11-18 08:33:26 +0000 |
commit | 3c6c61d1c82d9de71c2c191e8ee8d28e3ac021ab (patch) | |
tree | 749da47c5183c5e818e79e1cd3d13af8ad8a69c4 /src/plugins/classview/classviewparser.cpp | |
parent | 3ecf3d95753bbfa6affe32ef84cf0727bdbca9be (diff) | |
download | qt-creator-3c6c61d1c82d9de71c2c191e8ee8d28e3ac021ab.tar.gz |
ClassView: Dissolve the internal 'Utils' class
It's regularly getting in my way, and it's rather a namespace anyway.
Also, move the functions that are only used once closer to their
place of use.
Change-Id: I97951aae1b69c04f391afbdd1b491a8a9173a977
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/classview/classviewparser.cpp')
-rw-r--r-- | src/plugins/classview/classviewparser.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp index 07892d04d5..c62bf93a8c 100644 --- a/src/plugins/classview/classviewparser.cpp +++ b/src/plugins/classview/classviewparser.cpp @@ -58,6 +58,7 @@ enum { debug = false }; using namespace ProjectExplorer; +using namespace Utils; namespace ClassView { namespace Internal { @@ -258,7 +259,7 @@ ParserTreeItem::ConstPtr Parser::findItemByRoot(const QStandardItem *item, bool while (uiList.count() > 0) { cur = uiList.last(); uiList.removeLast(); - const SymbolInformation &inf = Utils::symbolInformationFromItem(cur); + const SymbolInformation &inf = Internal::symbolInformationFromItem(cur); internal = internal->child(inf); if (internal.isNull()) break; @@ -586,7 +587,7 @@ void Parser::clearCache() void Parser::setFileList(const QStringList &fileList) { - d->fileList = ::Utils::toSet(fileList); + d->fileList = Utils::toSet(fileList); } /*! @@ -632,12 +633,12 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot) d->docLocker.unlock(); // recalculate file list - ::Utils::FilePathList fileList; + FilePathList fileList; // check all projects for (const Project *prj : SessionManager::projects()) fileList += prj->files(Project::SourceFiles); - setFileList(::Utils::transform(fileList, &::Utils::FilePath::toString)); + setFileList(Utils::transform(fileList, &FilePath::toString)); emit resetDataDone(); } @@ -719,7 +720,7 @@ QStringList Parser::addProjectTree(const ParserTreeItem::Ptr &item, const Projec if (cit != d->cachedPrjFileLists.constEnd()) { fileList = cit.value(); } else { - fileList = ::Utils::transform(project->files(Project::SourceFiles), &::Utils::FilePath::toString); + fileList = Utils::transform(project->files(Project::SourceFiles), &FilePath::toString); d->cachedPrjFileLists[projectPath] = fileList; } if (fileList.count() > 0) { @@ -744,7 +745,7 @@ QStringList Parser::getAllFiles(const Project *project) if (cit != d->cachedPrjFileLists.constEnd()) { fileList = cit.value(); } else { - fileList = ::Utils::transform(project->files(Project::SourceFiles), &::Utils::FilePath::toString); + fileList = Utils::transform(project->files(Project::SourceFiles), &FilePath::toString); d->cachedPrjFileLists[nodePath] = fileList; } return fileList; |