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 <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-07-06 15:49:35 +02:00
parent 5671b3a7be
commit f0628cca29
16 changed files with 137 additions and 154 deletions

View File

@@ -43,9 +43,8 @@
#include <QTextDocument>
#include <QUrl>
using namespace ClangCodeModel;
using Internal::ClangDiagnosticWidget;
using Internal::ClangFixItOperation;
namespace ClangCodeModel {
namespace Internal {
namespace {
@@ -184,7 +183,6 @@ private:
ClangBackEnd::DiagnosticContainer supplementedDiagnostic = diagnostic;
using namespace ClangCodeModel::Utils;
DiagnosticTextInfo info(diagnostic.text);
supplementedDiagnostic.enableOption = info.option();
supplementedDiagnostic.category = info.category();
@@ -221,7 +219,7 @@ private:
QString option = optionAsUtf8String.toString();
// Clazy
if (ClangCodeModel::Utils::DiagnosticTextInfo::isClazyOption(option)) {
if (DiagnosticTextInfo::isClazyOption(option)) {
option = optionAsUtf8String.mid(8); // Remove "-Wclazy-" prefix.
return QString::fromUtf8(CppTools::Constants::CLAZY_DOCUMENTATION_URL_TEMPLATE)
.arg(option);
@@ -422,9 +420,6 @@ WidgetFromDiagnostics::DisplayHints toHints(const ClangDiagnosticWidget::Destina
} // anonymous namespace
namespace ClangCodeModel {
namespace Internal {
QString ClangDiagnosticWidget::createText(
const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics,
const ClangDiagnosticWidget::Destination &destination)