forked from qt-creator/qt-creator
Exported Header cleanup: QmlJSEditor
Move internal classes QmlJSEditorEditable/SemanticHighlighter out of qmljseditor.h. Move QmlJSEditor from namespace QmlJSEditor::Internal to QmlJSEditor. Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -187,7 +187,7 @@ void InspectorUi::showDebuggerTooltip(const QPoint &mousePos, TextEditor::ITextE
|
||||
{
|
||||
Q_UNUSED(mousePos);
|
||||
if (m_clientProxy && editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::Internal::QmlJSTextEditor *qmlEditor = static_cast<QmlJSEditor::Internal::QmlJSTextEditor*>(editor->widget());
|
||||
QmlJSEditor::QmlJSTextEditor *qmlEditor = static_cast<QmlJSEditor::QmlJSTextEditor*>(editor->widget());
|
||||
|
||||
QTextCursor tc(qmlEditor->document());
|
||||
tc.setPosition(cursorPos);
|
||||
|
||||
@@ -128,7 +128,7 @@ QmlJS::ModelManagerInterface *QmlJSLiveTextPreview::modelManager()
|
||||
void QmlJSLiveTextPreview::associateEditor(Core::IEditor *editor)
|
||||
{
|
||||
if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::Internal::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::Internal::QmlJSTextEditor*>(editor->widget());
|
||||
QmlJSEditor::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditor*>(editor->widget());
|
||||
if (qmljsEditor && !m_editors.contains(qmljsEditor)) {
|
||||
qmljsEditor->setUpdateSelectedElements(true);
|
||||
m_editors << qmljsEditor;
|
||||
@@ -142,7 +142,7 @@ void QmlJSLiveTextPreview::associateEditor(Core::IEditor *editor)
|
||||
void QmlJSLiveTextPreview::unassociateEditor(Core::IEditor *oldEditor)
|
||||
{
|
||||
if (oldEditor && oldEditor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
|
||||
QmlJSEditor::Internal::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::Internal::QmlJSTextEditor*>(oldEditor->widget());
|
||||
QmlJSEditor::QmlJSTextEditor* qmljsEditor = qobject_cast<QmlJSEditor::QmlJSTextEditor*>(oldEditor->widget());
|
||||
if (qmljsEditor && m_editors.contains(qmljsEditor)) {
|
||||
m_editors.removeOne(qmljsEditor);
|
||||
qmljsEditor->setUpdateSelectedElements(false);
|
||||
@@ -630,12 +630,12 @@ void QmlJSLiveTextPreview::setClientProxy(ClientProxy *clientProxy)
|
||||
connect(m_clientProxy.data(), SIGNAL(objectTreeUpdated()),
|
||||
SLOT(updateDebugIds()));
|
||||
|
||||
foreach(QWeakPointer<QmlJSEditor::Internal::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
if (qmlEditor)
|
||||
qmlEditor.data()->setUpdateSelectedElements(true);
|
||||
}
|
||||
} else {
|
||||
foreach(QWeakPointer<QmlJSEditor::Internal::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
foreach(QWeakPointer<QmlJSEditor::QmlJSTextEditor> qmlEditor, m_editors) {
|
||||
if (qmlEditor)
|
||||
qmlEditor.data()->setUpdateSelectedElements(false);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,8 @@ namespace QmlJS {
|
||||
}
|
||||
|
||||
namespace QmlJSEditor {
|
||||
namespace Internal {
|
||||
class QmlJSTextEditor;
|
||||
}
|
||||
}
|
||||
|
||||
namespace QmlJSInspector {
|
||||
namespace Internal {
|
||||
@@ -114,7 +112,7 @@ private:
|
||||
QmlJS::Document::Ptr m_initialDoc; //the document that was loaded by the server
|
||||
QString m_filename;
|
||||
|
||||
QList<QWeakPointer<QmlJSEditor::Internal::QmlJSTextEditor> > m_editors;
|
||||
QList<QWeakPointer<QmlJSEditor::QmlJSTextEditor> > m_editors;
|
||||
|
||||
bool m_applyChangesToQmlObserver;
|
||||
QmlJS::Document::Ptr m_docWithUnappliedChanges;
|
||||
|
||||
Reference in New Issue
Block a user