forked from qt-creator/qt-creator
Renamed the ScriptEditorEditable to QmlEditorEditable.
This commit is contained in:
@@ -273,7 +273,7 @@ protected:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
ScriptEditorEditable::ScriptEditorEditable(QmlTextEditor *editor)
|
QmlEditorEditable::QmlEditorEditable(QmlTextEditor *editor)
|
||||||
: BaseTextEditorEditable(editor)
|
: BaseTextEditorEditable(editor)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ QmlTextEditor::~QmlTextEditor()
|
|||||||
QList<Declaration> QmlTextEditor::declarations() const
|
QList<Declaration> QmlTextEditor::declarations() const
|
||||||
{ return m_declarations; }
|
{ return m_declarations; }
|
||||||
|
|
||||||
Core::IEditor *ScriptEditorEditable::duplicate(QWidget *parent)
|
Core::IEditor *QmlEditorEditable::duplicate(QWidget *parent)
|
||||||
{
|
{
|
||||||
QmlTextEditor *newEditor = new QmlTextEditor(parent);
|
QmlTextEditor *newEditor = new QmlTextEditor(parent);
|
||||||
newEditor->duplicateFrom(editor());
|
newEditor->duplicateFrom(editor());
|
||||||
@@ -328,12 +328,12 @@ Core::IEditor *ScriptEditorEditable::duplicate(QWidget *parent)
|
|||||||
return newEditor->editableInterface();
|
return newEditor->editableInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ScriptEditorEditable::kind() const
|
const char *QmlEditorEditable::kind() const
|
||||||
{
|
{
|
||||||
return QmlEditor::Constants::C_QMLEDITOR;
|
return QmlEditor::Constants::C_QMLEDITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlTextEditor::Context ScriptEditorEditable::context() const
|
QmlTextEditor::Context QmlEditorEditable::context() const
|
||||||
{
|
{
|
||||||
return m_context;
|
return m_context;
|
||||||
}
|
}
|
||||||
@@ -612,12 +612,12 @@ void QmlTextEditor::indentBlock(QTextDocument *, QTextBlock block, QChar /*typed
|
|||||||
|
|
||||||
TextEditor::BaseTextEditorEditable *QmlTextEditor::createEditableInterface()
|
TextEditor::BaseTextEditorEditable *QmlTextEditor::createEditableInterface()
|
||||||
{
|
{
|
||||||
ScriptEditorEditable *editable = new ScriptEditorEditable(this);
|
QmlEditorEditable *editable = new QmlEditorEditable(this);
|
||||||
createToolBar(editable);
|
createToolBar(editable);
|
||||||
return editable;
|
return editable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlTextEditor::createToolBar(ScriptEditorEditable *editable)
|
void QmlTextEditor::createToolBar(QmlEditorEditable *editable)
|
||||||
{
|
{
|
||||||
m_methodCombo = new QComboBox;
|
m_methodCombo = new QComboBox;
|
||||||
m_methodCombo->setMinimumContentsLength(22);
|
m_methodCombo->setMinimumContentsLength(22);
|
||||||
|
@@ -56,12 +56,12 @@ namespace Internal {
|
|||||||
class QmlHighlighter;
|
class QmlHighlighter;
|
||||||
class QmlTextEditor;
|
class QmlTextEditor;
|
||||||
|
|
||||||
class ScriptEditorEditable : public TextEditor::BaseTextEditorEditable
|
class QmlEditorEditable : public TextEditor::BaseTextEditorEditable
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScriptEditorEditable(QmlTextEditor *);
|
QmlEditorEditable(QmlTextEditor *);
|
||||||
QList<int> context() const;
|
QList<int> context() const;
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
@@ -129,7 +129,7 @@ private slots:
|
|||||||
protected:
|
protected:
|
||||||
void contextMenuEvent(QContextMenuEvent *e);
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
TextEditor::BaseTextEditorEditable *createEditableInterface();
|
TextEditor::BaseTextEditorEditable *createEditableInterface();
|
||||||
void createToolBar(ScriptEditorEditable *editable);
|
void createToolBar(QmlEditorEditable *editable);
|
||||||
TextEditor::BaseTextEditor::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true);
|
TextEditor::BaseTextEditor::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -84,7 +84,7 @@ QmlHoverHandler::QmlHoverHandler(QObject *parent)
|
|||||||
|
|
||||||
void QmlHoverHandler::editorOpened(IEditor *editor)
|
void QmlHoverHandler::editorOpened(IEditor *editor)
|
||||||
{
|
{
|
||||||
ScriptEditorEditable *qmlEditor = qobject_cast<ScriptEditorEditable *>(editor);
|
QmlEditorEditable *qmlEditor = qobject_cast<QmlEditorEditable *>(editor);
|
||||||
if (!qmlEditor)
|
if (!qmlEditor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user