Make QmlJSEditor and QmlJSEditorWidget internal

Change-Id: I5afe67db927d735727beafe972965855bde39faa
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Eike Ziller
2014-02-07 14:21:58 +01:00
parent 6944dc7af8
commit deb1a742e1
7 changed files with 21 additions and 10 deletions

View File

@@ -387,7 +387,7 @@ void QmlLiveTextPreview::associateEditor(Core::IEditor *editor)
using namespace TextEditor; using namespace TextEditor;
if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) { if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
QTC_ASSERT(QLatin1String(editor->widget()->metaObject()->className()) == QTC_ASSERT(QLatin1String(editor->widget()->metaObject()->className()) ==
QLatin1String("QmlJSEditor::QmlJSTextEditorWidget"), QLatin1String("QmlJSEditor::Internal::QmlJSTextEditorWidget"),
return); return);
BaseTextEditorWidget *editWidget BaseTextEditorWidget *editWidget

View File

@@ -96,7 +96,7 @@ using namespace QmlJS::AST;
using namespace QmlJSTools; using namespace QmlJSTools;
namespace QmlJSEditor { namespace QmlJSEditor {
using namespace Internal; namespace Internal {
QmlJSTextEditorWidget::QmlJSTextEditorWidget(QWidget *parent) : QmlJSTextEditorWidget::QmlJSTextEditorWidget(QWidget *parent) :
TextEditor::BaseTextEditorWidget(new QmlJSEditorDocument, parent) TextEditor::BaseTextEditorWidget(new QmlJSEditorDocument, parent)
@@ -293,13 +293,14 @@ void QmlJSTextEditorWidget::updateOutlineIndexNow()
m_outlineCombo->blockSignals(blocked); m_outlineCombo->blockSignals(blocked);
} }
} }
} // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor
class QtQuickToolbarMarker {}; class QtQuickToolbarMarker {};
Q_DECLARE_METATYPE(QtQuickToolbarMarker) Q_DECLARE_METATYPE(QtQuickToolbarMarker)
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal {
template <class T> template <class T>
static QList<TextEditor::RefactorMarker> removeMarkersOfType(const QList<TextEditor::RefactorMarker> &markers) static QList<TextEditor::RefactorMarker> removeMarkersOfType(const QList<TextEditor::RefactorMarker> &markers)
@@ -900,4 +901,5 @@ QString QmlJSTextEditorWidget::foldReplacementText(const QTextBlock &block) cons
return TextEditor::BaseTextEditorWidget::foldReplacementText(block); return TextEditor::BaseTextEditorWidget::foldReplacementText(block);
} }
} // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor

View File

@@ -65,15 +65,15 @@ namespace AST {
The top-level namespace of the QmlJSEditor plug-in. The top-level namespace of the QmlJSEditor plug-in.
*/ */
namespace QmlJSEditor { namespace QmlJSEditor {
class QmlJSEditor;
class QmlJSEditorDocument; class QmlJSEditorDocument;
class FindReferences; class FindReferences;
namespace Internal { namespace Internal {
class QmlOutlineModel;
} // namespace Internal
class QMLJSEDITOR_EXPORT QmlJSTextEditorWidget : public TextEditor::BaseTextEditorWidget class QmlJSEditor;
class QmlOutlineModel;
class QmlJSTextEditorWidget : public TextEditor::BaseTextEditorWidget
{ {
Q_OBJECT Q_OBJECT
@@ -156,6 +156,7 @@ private:
FindReferences *m_findReferences; FindReferences *m_findReferences;
}; };
} // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor
#endif // QMLJSEDITOR_H #endif // QMLJSEDITOR_H

View File

@@ -45,6 +45,7 @@
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal {
QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor) QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor)
: BaseTextEditor(editor) : BaseTextEditor(editor)
@@ -73,4 +74,5 @@ TextEditor::CompletionAssistProvider *QmlJSEditor::completionAssistProvider()
return ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>(); return ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>();
} }
} // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor

View File

@@ -35,9 +35,11 @@
#include <texteditor/basetexteditor.h> #include <texteditor/basetexteditor.h>
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal {
class QmlJSTextEditorWidget; class QmlJSTextEditorWidget;
class QMLJSEDITOR_EXPORT QmlJSEditor : public TextEditor::BaseTextEditor class QmlJSEditor : public TextEditor::BaseTextEditor
{ {
Q_OBJECT Q_OBJECT
@@ -57,6 +59,7 @@ private:
Utils::CommentDefinition m_commentDefinition; Utils::CommentDefinition m_commentDefinition;
}; };
} // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor
#endif // QMLJSEDITOREDITABLE_H #endif // QMLJSEDITOREDITABLE_H

View File

@@ -56,10 +56,11 @@ class ObjectValue;
} }
namespace QmlJSEditor { namespace QmlJSEditor {
class QmlJSTextEditorWidget;
namespace Internal { namespace Internal {
class QmlJSTextEditorWidget;
class HoverHandler : public TextEditor::BaseHoverHandler class HoverHandler : public TextEditor::BaseHoverHandler
{ {
Q_OBJECT Q_OBJECT

View File

@@ -42,8 +42,10 @@
#include <QTimer> #include <QTimer>
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal {
class QmlJSTextEditorWidget; class QmlJSTextEditorWidget;
} } // Internal
} // QmlJSEditor
namespace ProjectExplorer { namespace ProjectExplorer {
class TaskHub; class TaskHub;