diff options
author | hjk <[email protected]> | 2020-07-06 15:49:35 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2020-07-06 15:12:28 +0000 |
commit | f0628cca2932f47f3c96ee889b88c8310db7a291 (patch) | |
tree | 497c630e7d6bfba5a3fb754daefafe21e4d851c0 /src/plugins/clangcodemodel/clangoverviewmodel.cpp | |
parent | 5671b3a7be0eeb94fa5fd273e1e23cd362647335 (diff) |
ClangCodeModel: Replace nested ClangCodeModel::Utils namespace
... by the customary ::Internal.
It adds only noise on the user side and conflicts regularly with
the top-level ::Utils namespace.
Remove a (now) duplicated definition of setLastSentDocumentRevision().
Plus minor namespace related fixes.
There are still minor conflicts between Utils::Text and
ClangCodeModel::Text
Change-Id: I2e8df6b3c6c3599192774032822ee7e778355bba
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/clangoverviewmodel.cpp')
-rw-r--r-- | src/plugins/clangcodemodel/clangoverviewmodel.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/clangcodemodel/clangoverviewmodel.cpp b/src/plugins/clangcodemodel/clangoverviewmodel.cpp index 8c92e2f2461..baa125f17f9 100644 --- a/src/plugins/clangcodemodel/clangoverviewmodel.cpp +++ b/src/plugins/clangcodemodel/clangoverviewmodel.cpp @@ -37,6 +37,8 @@ using TokenContainer = ClangBackEnd::TokenInfoContainer; using TokenContainers = QVector<TokenContainer>; +using namespace Utils; + namespace ClangCodeModel { namespace Internal { @@ -171,7 +173,7 @@ QVariant TokenTreeItem::data(int column, int role) const } case Qt::DecorationRole: { - return ::Utils::CodeModelIcon::iconForType(ClangCodeModel::Utils::iconTypeForToken(token)); + return CodeModelIcon::iconForType(iconTypeForToken(token)); } case CppTools::AbstractOverviewModel::FileNameRole: { @@ -219,16 +221,16 @@ bool OverviewModel::isGenerated(const QModelIndex &) const return false; } -::Utils::Link OverviewModel::linkFromIndex(const QModelIndex &sourceIndex) const +Link OverviewModel::linkFromIndex(const QModelIndex &sourceIndex) const { auto item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex)); if (!item) return {}; - return ::Utils::Link(m_filePath, static_cast<int>(item->token.line), - static_cast<int>(item->token.column) - 1); + return Link(m_filePath, static_cast<int>(item->token.line), + static_cast<int>(item->token.column) - 1); } -::Utils::LineColumn OverviewModel::lineColumnFromIndex(const QModelIndex &sourceIndex) const +LineColumn OverviewModel::lineColumnFromIndex(const QModelIndex &sourceIndex) const { auto item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex)); if (!item) @@ -243,10 +245,10 @@ OverviewModel::Range OverviewModel::rangeFromIndex(const QModelIndex &sourceInde if (!item) return {}; const ClangBackEnd::SourceRangeContainer &range = item->token.extraInfo.cursorRange; - return std::make_pair(::Utils::LineColumn(static_cast<int>(range.start.line), - static_cast<int>(range.start.column)), - ::Utils::LineColumn(static_cast<int>(range.end.line), - static_cast<int>(range.end.column))); + return std::make_pair(LineColumn(static_cast<int>(range.start.line), + static_cast<int>(range.start.column)), + LineColumn(static_cast<int>(range.end.line), + static_cast<int>(range.end.column))); } } // namespace Internal |