From 67c3fed2c048c9b6841994fd723ee85eb97d94cb Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 3 Jun 2013 19:31:32 +0200 Subject: [PATCH] QmlJSEditor: Rename QmlJSEditorEditable into QmlJSEditor Change-Id: I710817ffd7bdf87aa6c0fed0f1f3cd4ea842fd01 Reviewed-by: Eike Ziller --- .../qmljseditor/qmljscompletionassist.cpp | 14 +++++++-- .../qmljscomponentfromobjectdef.cpp | 8 +++-- src/plugins/qmljseditor/qmljseditor.cpp | 29 ++++++++++++------- src/plugins/qmljseditor/qmljseditor.h | 4 +-- .../qmljseditor/qmljseditoreditable.cpp | 10 +++---- src/plugins/qmljseditor/qmljseditoreditable.h | 4 +-- .../qmljseditor/qmljseditorfactory.cpp | 14 +++++---- src/plugins/qmljseditor/qmljseditorplugin.cpp | 17 ++++++----- src/plugins/qmljseditor/qmljseditorplugin.h | 2 +- src/plugins/qmljseditor/qmljshoverhandler.cpp | 15 ++++++---- src/plugins/qmljseditor/qmljshoverhandler.h | 2 +- src/plugins/qmljseditor/qmljsoutline.cpp | 4 +-- src/plugins/qmljseditor/qmljsquickfix.cpp | 8 +++-- .../qmljseditor/qmljsquickfixassist.cpp | 10 +++++-- src/plugins/qmljseditor/qmljsquickfixes.cpp | 8 +++-- .../qmljseditor/qmljssemantichighlighter.cpp | 8 +++-- src/plugins/qmljseditor/qmljswrapinloader.cpp | 8 +++-- 17 files changed, 107 insertions(+), 58 deletions(-) diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp index 97168e06355..8cb43496e87 100644 --- a/src/plugins/qmljseditor/qmljscompletionassist.cpp +++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp @@ -66,11 +66,13 @@ #include using namespace QmlJS; -using namespace QmlJSEditor; using namespace QmlJSTools; -using namespace Internal; using namespace TextEditor; +namespace QmlJSEditor { + +using namespace Internal; + namespace { enum CompletionOrder { @@ -335,7 +337,11 @@ bool isLiteral(AST::Node *ast) } // Anonymous -Q_DECLARE_METATYPE(CompleteFunctionCall) +} // namesapce QmlJSEditor + +Q_DECLARE_METATYPE(QmlJSEditor::CompleteFunctionCall) + +namespace QmlJSEditor { // ----------------------- // QmlJSAssistProposalItem @@ -1028,3 +1034,5 @@ bool QmlJSAssistProposalModel::keepPerfectMatch(TextEditor::AssistReason reason) { return reason == ExplicitlyInvoked; } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp index 49976528880..63702d918f2 100644 --- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp +++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp @@ -47,10 +47,12 @@ #include using namespace QmlJS::AST; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSTools; +namespace QmlJSEditor { + +using namespace Internal; + namespace { class Operation: public QmlJSQuickFixOperation @@ -153,3 +155,5 @@ void ComponentFromObjectDef::match(const QmlJSQuickFixInterface &interface, Quic } } } + +} //namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index ba29abd3d8b..e1cb96f90e1 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -95,10 +95,11 @@ enum { using namespace QmlJS; using namespace QmlJS::AST; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSTools; +namespace QmlJSEditor { +using namespace Internal; + namespace { class FindIdDeclarations: protected Visitor @@ -577,7 +578,7 @@ QModelIndex QmlJSTextEditorWidget::outlineModelIndex() return m_outlineModelIndex; } -Core::IEditor *QmlJSEditorEditable::duplicate(QWidget *parent) +Core::IEditor *QmlJSEditor::duplicate(QWidget *parent) { QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget(parent); newEditor->duplicateFrom(editorWidget()); @@ -585,12 +586,12 @@ Core::IEditor *QmlJSEditorEditable::duplicate(QWidget *parent) return newEditor->editor(); } -Core::Id QmlJSEditorEditable::id() const +Core::Id QmlJSEditor::id() const { - return Core::Id(QmlJSEditor::Constants::C_QMLJSEDITOR_ID); + return Core::Id(Constants::C_QMLJSEDITOR_ID); } -bool QmlJSEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName) +bool QmlJSEditor::open(QString *errorString, const QString &fileName, const QString &realFileName) { bool b = TextEditor::BaseTextEditor::open(errorString, fileName, realFileName); editorWidget()->setMimeType(Core::ICore::mimeDatabase()->findByFile(QFileInfo(fileName)).type()); @@ -748,9 +749,13 @@ void QmlJSTextEditorWidget::updateOutlineIndexNow() } } +} // namespace QmlJSEditor + class QtQuickToolbarMarker {}; Q_DECLARE_METATYPE(QtQuickToolbarMarker) +namespace QmlJSEditor { + template static QList removeMarkersOfType(const QList &markers) { @@ -1025,12 +1030,12 @@ bool QmlJSTextEditorWidget::isClosingBrace(const QList &tokens) const TextEditor::BaseTextEditor *QmlJSTextEditorWidget::createEditor() { - QmlJSEditorEditable *editable = new QmlJSEditorEditable(this); + QmlJSEditor *editable = new QmlJSEditor(this); createToolBar(editable); return editable; } -void QmlJSTextEditorWidget::createToolBar(QmlJSEditorEditable *editor) +void QmlJSTextEditorWidget::createToolBar(QmlJSEditor *editor) { m_outlineCombo = new QComboBox; m_outlineCombo->setMinimumContentsLength(22); @@ -1209,13 +1214,13 @@ void QmlJSTextEditorWidget::contextMenuEvent(QContextMenuEvent *e) refactoringMenu->setEnabled(!refactoringMenu->isEmpty()); - if (Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(QmlJSEditor::Constants::M_CONTEXT)) { + if (Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(Constants::M_CONTEXT)) { QMenu *contextMenu = mcontext->menu(); foreach (QAction *action, contextMenu->actions()) { menu->addAction(action); - if (action->objectName() == QLatin1String(QmlJSEditor::Constants::M_REFACTORING_MENU_INSERTION_POINT)) + if (action->objectName() == QLatin1String(Constants::M_REFACTORING_MENU_INSERTION_POINT)) menu->addMenu(refactoringMenu); - if (action->objectName() == QLatin1String(QmlJSEditor::Constants::SHOW_QT_QUICK_HELPER)) { + if (action->objectName() == QLatin1String(Constants::SHOW_QT_QUICK_HELPER)) { bool enabled = m_contextPane->isAvailable(editor(), semanticInfo().document, m_semanticInfo.declaringMemberNoProperties(position())); action->setEnabled(enabled); } @@ -1448,3 +1453,5 @@ QString QmlJSTextEditorWidget::foldReplacementText(const QTextBlock &block) cons return TextEditor::BaseTextEditorWidget::foldReplacementText(block); } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h index a79dec90aaf..596bbcf4276 100644 --- a/src/plugins/qmljseditor/qmljseditor.h +++ b/src/plugins/qmljseditor/qmljseditor.h @@ -65,7 +65,7 @@ namespace AST { The top-level namespace of the QmlJSEditor plug-in. */ namespace QmlJSEditor { -class QmlJSEditorEditable; +class QmlJSEditor; class FindReferences; namespace Internal { @@ -160,7 +160,7 @@ protected: void resizeEvent(QResizeEvent *event); void scrollContentsBy(int dx, int dy); TextEditor::BaseTextEditor *createEditor(); - void createToolBar(QmlJSEditorEditable *editable); + void createToolBar(QmlJSEditor *editable); TextEditor::BaseTextEditorWidget::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true); QString foldReplacementText(const QTextBlock &block) const; diff --git a/src/plugins/qmljseditor/qmljseditoreditable.cpp b/src/plugins/qmljseditor/qmljseditoreditable.cpp index 8af4f1a5cba..0bbe3fd2439 100644 --- a/src/plugins/qmljseditor/qmljseditoreditable.cpp +++ b/src/plugins/qmljseditor/qmljseditoreditable.cpp @@ -43,15 +43,15 @@ namespace QmlJSEditor { -QmlJSEditorEditable::QmlJSEditorEditable(QmlJSTextEditorWidget *editor) +QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor) : BaseTextEditor(editor) { - m_context.add(QmlJSEditor::Constants::C_QMLJSEDITOR_ID); + m_context.add(Constants::C_QMLJSEDITOR_ID); m_context.add(TextEditor::Constants::C_TEXTEDITOR); m_context.add(ProjectExplorer::Constants::LANG_QMLJS); } -bool QmlJSEditorEditable::isDesignModePreferred() const +bool QmlJSEditor::isDesignModePreferred() const { // stay in design mode if we are there Core::IMode *mode = Core::ModeManager::currentMode(); @@ -60,14 +60,14 @@ bool QmlJSEditorEditable::isDesignModePreferred() const return false; } -void QmlJSEditorEditable::setTextCodec(QTextCodec *codec, TextCodecReason reason) +void QmlJSEditor::setTextCodec(QTextCodec *codec, TextCodecReason reason) { if (reason != TextCodecOtherReason) // qml is defined to be utf8 return; editorWidget()->setTextCodec(codec); } -const Utils::CommentDefinition *QmlJSEditorEditable::commentDefinition() const +const Utils::CommentDefinition *QmlJSEditor::commentDefinition() const { return &m_commentDefinition; } diff --git a/src/plugins/qmljseditor/qmljseditoreditable.h b/src/plugins/qmljseditor/qmljseditoreditable.h index 07550c50e45..7490e871778 100644 --- a/src/plugins/qmljseditor/qmljseditoreditable.h +++ b/src/plugins/qmljseditor/qmljseditoreditable.h @@ -37,12 +37,12 @@ namespace QmlJSEditor { class QmlJSTextEditorWidget; -class QMLJSEDITOR_EXPORT QmlJSEditorEditable : public TextEditor::BaseTextEditor +class QMLJSEDITOR_EXPORT QmlJSEditor : public TextEditor::BaseTextEditor { Q_OBJECT public: - explicit QmlJSEditorEditable(QmlJSTextEditorWidget *); + explicit QmlJSEditor(QmlJSTextEditorWidget *); bool duplicateSupported() const { return true; } Core::IEditor *duplicate(QWidget *parent); diff --git a/src/plugins/qmljseditor/qmljseditorfactory.cpp b/src/plugins/qmljseditor/qmljseditorfactory.cpp index a1554b4c26f..56f80661707 100644 --- a/src/plugins/qmljseditor/qmljseditorfactory.cpp +++ b/src/plugins/qmljseditor/qmljseditorfactory.cpp @@ -49,9 +49,8 @@ #include #include -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; -using namespace QmlJSEditor::Constants; +namespace QmlJSEditor { +namespace Internal { QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent) : Core::IEditorFactory(parent) @@ -68,17 +67,17 @@ QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent) Core::Id QmlJSEditorFactory::id() const { - return Core::Id(C_QMLJSEDITOR_ID); + return Core::Id(Constants::C_QMLJSEDITOR_ID); } QString QmlJSEditorFactory::displayName() const { - return qApp->translate("OpenWith::Editors", C_QMLJSEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Constants::C_QMLJSEDITOR_DISPLAY_NAME); } Core::IEditor *QmlJSEditorFactory::createEditor(QWidget *parent) { - QmlJSEditor::QmlJSTextEditorWidget *rc = new QmlJSEditor::QmlJSTextEditorWidget(parent); + QmlJSTextEditorWidget *rc = new QmlJSTextEditorWidget(parent); QmlJSEditorPlugin::instance()->initializeEditor(rc); return rc->editor(); } @@ -87,3 +86,6 @@ QStringList QmlJSEditorFactory::mimeTypes() const { return m_mimeTypes; } + +} // namespace Internal +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index afaafd6c331..bf3de646965 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -77,8 +77,6 @@ #include #include -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSEditor::Constants; using namespace ProjectExplorer; @@ -86,6 +84,9 @@ enum { QUICKFIX_INTERVAL = 20 }; +namespace QmlJSEditor { +using namespace Internal; + void registerQuickFixes(ExtensionSystem::IPlugin *plugIn); QmlJSEditorPlugin *QmlJSEditorPlugin::m_instance = 0; @@ -130,7 +131,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e connect(m_modelManager, SIGNAL(aboutToRemoveFiles(QStringList)), m_qmlTaskManager, SLOT(documentsRemoved(QStringList))); - Core::Context context(QmlJSEditor::Constants::C_QMLJSEDITOR_ID); + Core::Context context(Constants::C_QMLJSEDITOR_ID); m_editor = new QmlJSEditorFactory(this); addObject(m_editor); @@ -160,14 +161,14 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e jsWizardParameters.setId(QLatin1String("Z.Js")); addAutoReleasedObject(new JsFileWizard(jsWizardParameters, core)); - m_actionHandler = new TextEditor::TextEditorActionHandler(QmlJSEditor::Constants::C_QMLJSEDITOR_ID, + m_actionHandler = new TextEditor::TextEditorActionHandler(Constants::C_QMLJSEDITOR_ID, TextEditor::TextEditorActionHandler::Format | TextEditor::TextEditorActionHandler::UnCommentSelection | TextEditor::TextEditorActionHandler::UnCollapseAll | TextEditor::TextEditorActionHandler::FollowSymbolUnderCursor); m_actionHandler->initializeActions(); - Core::ActionContainer *contextMenu = Core::ActionManager::createMenu(QmlJSEditor::Constants::M_CONTEXT); + Core::ActionContainer *contextMenu = Core::ActionManager::createMenu(Constants::M_CONTEXT); Core::ActionContainer *qmlToolsMenu = Core::ActionManager::actionContainer(Core::Id(QmlJSTools::Constants::M_TOOLS_QMLJS)); Core::Context globalContext(Core::Constants::C_GLOBAL); @@ -259,7 +260,7 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlJSEditorPlugin::aboutToShutdown() return IPlugin::aboutToShutdown(); } -void QmlJSEditorPlugin::initializeEditor(QmlJSEditor::QmlJSTextEditorWidget *editor) +void QmlJSEditorPlugin::initializeEditor(QmlJSTextEditorWidget *editor) { QTC_CHECK(m_instance); @@ -358,4 +359,6 @@ void QmlJSEditorPlugin::checkCurrentEditorSemanticInfoUpToDate() m_reformatFileAction->setEnabled(semanticInfoUpToDate); } -Q_EXPORT_PLUGIN(QmlJSEditorPlugin) +} // namespace QmlJSEditor + +Q_EXPORT_PLUGIN(QmlJSEditor::Internal::QmlJSEditorPlugin) diff --git a/src/plugins/qmljseditor/qmljseditorplugin.h b/src/plugins/qmljseditor/qmljseditorplugin.h index 53fed0cf1ba..45f22401238 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.h +++ b/src/plugins/qmljseditor/qmljseditorplugin.h @@ -92,7 +92,7 @@ public: QmlJSQuickFixAssistProvider *quickFixAssistProvider() const; - void initializeEditor(QmlJSEditor::QmlJSTextEditorWidget *editor); + void initializeEditor(QmlJSTextEditorWidget *editor); Utils::JsonSchemaManager *jsonManager() const; diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index c33c1d13cdd..6f91d6b0f34 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -56,8 +56,9 @@ using namespace Core; using namespace QmlJS; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; + +namespace QmlJSEditor { +namespace Internal { namespace { @@ -97,7 +98,7 @@ HoverHandler::HoverHandler(QObject *parent) : BaseHoverHandler(parent), m_modelM bool HoverHandler::acceptEditor(IEditor *editor) { - QmlJSEditorEditable *qmlEditor = qobject_cast(editor); + QmlJSEditor *qmlEditor = qobject_cast(editor); if (qmlEditor) return true; return false; @@ -189,7 +190,7 @@ void HoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos) if (!m_modelManager) return; - QmlJSEditor::QmlJSTextEditorWidget *qmlEditor = qobject_cast(editor->widget()); + QmlJSTextEditorWidget *qmlEditor = qobject_cast(editor->widget()); if (!qmlEditor) return; @@ -256,7 +257,7 @@ void HoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos) setQmlHelpItem(scopeChain, qmlDocument, node); } -bool HoverHandler::matchDiagnosticMessage(QmlJSEditor::QmlJSTextEditorWidget *qmlEditor, int pos) +bool HoverHandler::matchDiagnosticMessage(QmlJSTextEditorWidget *qmlEditor, int pos) { foreach (const QTextEdit::ExtraSelection &sel, qmlEditor->extraSelections(TextEditor::BaseTextEditorWidget::CodeWarningsSelection)) { @@ -521,3 +522,7 @@ bool HoverHandler::setQmlHelpItem(const ScopeChain &scopeChain, } return false; } + +} // namespace Internal +} // namespace QmlJSEditor + diff --git a/src/plugins/qmljseditor/qmljshoverhandler.h b/src/plugins/qmljseditor/qmljshoverhandler.h index 057833ea913..c6128803fdf 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.h +++ b/src/plugins/qmljseditor/qmljshoverhandler.h @@ -73,7 +73,7 @@ private: virtual void identifyMatch(TextEditor::ITextEditor *editor, int pos); virtual void operateTooltip(TextEditor::ITextEditor *editor, const QPoint &point); - bool matchDiagnosticMessage(QmlJSEditor::QmlJSTextEditorWidget *qmlEditor, int pos); + bool matchDiagnosticMessage(QmlJSTextEditorWidget *qmlEditor, int pos); bool matchColorItem(const QmlJS::ScopeChain &lookupContext, const QmlJS::Document::Ptr &qmlDocument, const QList &astPath, diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp index e8f4a41c53a..544f5419c73 100644 --- a/src/plugins/qmljseditor/qmljsoutline.cpp +++ b/src/plugins/qmljseditor/qmljsoutline.cpp @@ -244,7 +244,7 @@ bool QmlJSOutlineWidget::syncCursor() bool QmlJSOutlineWidgetFactory::supportsEditor(Core::IEditor *editor) const { - if (qobject_cast(editor)) + if (qobject_cast(editor)) return true; return false; } @@ -253,7 +253,7 @@ TextEditor::IOutlineWidget *QmlJSOutlineWidgetFactory::createWidget(Core::IEdito { QmlJSOutlineWidget *widget = new QmlJSOutlineWidget; - QmlJSEditorEditable *qmlJSEditable = qobject_cast(editor); + QmlJSEditor *qmlJSEditable = qobject_cast(editor); QmlJSTextEditorWidget *qmlJSEditor = qobject_cast(qmlJSEditable->widget()); Q_ASSERT(qmlJSEditor); diff --git a/src/plugins/qmljseditor/qmljsquickfix.cpp b/src/plugins/qmljseditor/qmljsquickfix.cpp index e1ece15032f..12828c73256 100644 --- a/src/plugins/qmljseditor/qmljsquickfix.cpp +++ b/src/plugins/qmljseditor/qmljsquickfix.cpp @@ -42,11 +42,13 @@ using namespace QmlJS; using namespace QmlJS::AST; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSTools; using TextEditor::RefactoringChanges; +namespace QmlJSEditor { + +using namespace Internal; + QmlJSQuickFixOperation::QmlJSQuickFixOperation(const QmlJSQuickFixInterface &interface, int priority) : QuickFixOperation(priority) @@ -79,3 +81,5 @@ void QmlJSQuickFixFactory::matchingOperations(const QuickFixInterface &interface { match(interface.staticCast(), result); } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljsquickfixassist.cpp b/src/plugins/qmljseditor/qmljsquickfixassist.cpp index 8c705c743c6..28757dafa5b 100644 --- a/src/plugins/qmljseditor/qmljsquickfixassist.cpp +++ b/src/plugins/qmljseditor/qmljsquickfixassist.cpp @@ -35,11 +35,13 @@ #include -using namespace QmlJSEditor; -using namespace Internal; using namespace QmlJSTools; using namespace TextEditor; +namespace QmlJSEditor { + +using namespace Internal; + // ----------------------- // QuickFixAssistInterface // ----------------------- @@ -107,7 +109,9 @@ IAssistProcessor *QmlJSQuickFixAssistProvider::createProcessor() const QList QmlJSQuickFixAssistProvider::quickFixFactories() const { QList results; - foreach (QmlJSQuickFixFactory *f, ExtensionSystem::PluginManager::getObjects()) + foreach (QmlJSQuickFixFactory *f, ExtensionSystem::PluginManager::getObjects()) results.append(f); return results; } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljsquickfixes.cpp b/src/plugins/qmljseditor/qmljsquickfixes.cpp index 3bb16e826b0..94734e496d0 100644 --- a/src/plugins/qmljseditor/qmljsquickfixes.cpp +++ b/src/plugins/qmljseditor/qmljsquickfixes.cpp @@ -42,11 +42,13 @@ using namespace QmlJS; using namespace QmlJS::AST; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSTools; using TextEditor::RefactoringChanges; +namespace QmlJSEditor { + +using namespace Internal; + namespace { /* @@ -179,3 +181,5 @@ void registerQuickFixes(ExtensionSystem::IPlugin *plugIn) plugIn->addAutoReleasedObject(new WrapInLoader); plugIn->addAutoReleasedObject(new AddAnalysisMessageSuppressionComment); } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp index 5b040450f16..7350583abb9 100644 --- a/src/plugins/qmljseditor/qmljssemantichighlighter.cpp +++ b/src/plugins/qmljseditor/qmljssemantichighlighter.cpp @@ -51,11 +51,13 @@ #include #include -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJS; using namespace QmlJS::AST; +namespace QmlJSEditor { + +using namespace Internal; + namespace { template @@ -624,3 +626,5 @@ int SemanticHighlighter::startRevision() const { return m_startRevision; } + +} // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljswrapinloader.cpp b/src/plugins/qmljseditor/qmljswrapinloader.cpp index ffb204ffdd7..d7ee184eb1f 100644 --- a/src/plugins/qmljseditor/qmljswrapinloader.cpp +++ b/src/plugins/qmljseditor/qmljswrapinloader.cpp @@ -44,10 +44,12 @@ using namespace QmlJS; using namespace QmlJS::AST; -using namespace QmlJSEditor; -using namespace QmlJSEditor::Internal; using namespace QmlJSTools; +namespace QmlJSEditor { + +using namespace Internal; + namespace { class FindIds : protected Visitor @@ -191,3 +193,5 @@ void WrapInLoader::match(const QmlJSQuickFixInterface &interface, QuickFixOperat } } } + +} // namespace QmlJSEditor