forked from qt-creator/qt-creator
texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
This commit is contained in:
@@ -204,8 +204,8 @@ void InspectorUi::showDebuggerTooltip(const QPoint &mousePos, TextEditor::ITextE
|
||||
{
|
||||
Q_UNUSED(mousePos);
|
||||
if (m_clientProxy && editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::QmlJSTextEditor *qmlEditor =
|
||||
static_cast<QmlJSEditor::QmlJSTextEditor*>(editor->widget());
|
||||
QmlJSEditor::QmlJSTextEditorWidget *qmlEditor =
|
||||
static_cast<QmlJSEditor::QmlJSTextEditorWidget*>(editor->widget());
|
||||
|
||||
QTextCursor tc(qmlEditor->document());
|
||||
tc.setPosition(cursorPos);
|
||||
@@ -654,8 +654,8 @@ QDeclarativeDebugObjectReference InspectorUi::objectReferenceForLocation(const Q
|
||||
if (textEditor && m_clientProxy && textEditor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
if (cursorPosition == -1)
|
||||
cursorPosition = textEditor->position();
|
||||
QmlJSEditor::QmlJSTextEditor *qmlEditor =
|
||||
static_cast<QmlJSEditor::QmlJSTextEditor*>(textEditor->widget());
|
||||
QmlJSEditor::QmlJSTextEditorWidget *qmlEditor =
|
||||
static_cast<QmlJSEditor::QmlJSTextEditorWidget*>(textEditor->widget());
|
||||
|
||||
if (QmlJS::AST::Node *node
|
||||
= qmlEditor->semanticInfo().declaringMemberNoProperties(cursorPosition)) {
|
||||
|
||||
@@ -143,7 +143,7 @@ QmlJS::ModelManagerInterface *QmlJSLiveTextPreview::modelManager()
|
||||
void QmlJSLiveTextPreview::associateEditor(Core::IEditor *editor)
|
||||
{
|
||||
if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditor*>(editor->widget());
|
||||
QmlJSEditor::QmlJSTextEditorWidget* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditorWidget*>(editor->widget());
|
||||
if (qmljsEditor && !m_editors.contains(qmljsEditor)) {
|
||||
qmljsEditor->setUpdateSelectedElements(true);
|
||||
m_editors << qmljsEditor;
|
||||
@@ -157,7 +157,7 @@ void QmlJSLiveTextPreview::associateEditor(Core::IEditor *editor)
|
||||
void QmlJSLiveTextPreview::unassociateEditor(Core::IEditor *oldEditor)
|
||||
{
|
||||
if (oldEditor && oldEditor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditor*>(oldEditor->widget());
|
||||
QmlJSEditor::QmlJSTextEditorWidget* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditorWidget*>(oldEditor->widget());
|
||||
if (qmljsEditor && m_editors.contains(qmljsEditor)) {
|
||||
m_editors.removeOne(qmljsEditor);
|
||||
qmljsEditor->setUpdateSelectedElements(false);
|
||||
@@ -639,12 +639,12 @@ void QmlJSLiveTextPreview::setClientProxy(ClientProxy *clientProxy)
|
||||
connect(m_clientProxy.data(), SIGNAL(objectTreeUpdated()),
|
||||
SLOT(updateDebugIds()));
|
||||
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditorWidget> qmlEditor, m_editors) {
|
||||
if (qmlEditor)
|
||||
qmlEditor.data()->setUpdateSelectedElements(true);
|
||||
}
|
||||
} else {
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditorWidget> qmlEditor, m_editors) {
|
||||
if (qmlEditor)
|
||||
qmlEditor.data()->setUpdateSelectedElements(false);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace QmlJS {
|
||||
}
|
||||
|
||||
namespace QmlJSEditor {
|
||||
class QmlJSTextEditor;
|
||||
class QmlJSTextEditorWidget;
|
||||
}
|
||||
|
||||
namespace QmlJSInspector {
|
||||
@@ -116,7 +116,7 @@ private:
|
||||
QmlJS::Document::Ptr m_initialDoc; //the document that was loaded by the server
|
||||
QString m_filename;
|
||||
|
||||
QList<QWeakPointer<QmlJSEditor::QmlJSTextEditor> > m_editors;
|
||||
QList<QWeakPointer<QmlJSEditor::QmlJSTextEditorWidget> > m_editors;
|
||||
|
||||
bool m_applyChangesToQmlObserver;
|
||||
QmlJS::Document::Ptr m_docWithUnappliedChanges;
|
||||
|
||||
Reference in New Issue
Block a user