forked from qt-creator/qt-creator
QmlJSEditor: Remove functions from widget that delegate to document
Instead access document directly. Needs to export document. Change-Id: I8fa86832982d2793ea951e88a5b6e3925b7cd281 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -166,31 +166,6 @@ QmlJSTextEditorWidget::~QmlJSTextEditorWidget()
|
||||
{
|
||||
}
|
||||
|
||||
SemanticInfo QmlJSTextEditorWidget::semanticInfo() const
|
||||
{
|
||||
return m_qmlJsEditorDocument->semanticInfo();
|
||||
}
|
||||
|
||||
int QmlJSTextEditorWidget::editorRevision() const
|
||||
{
|
||||
return document()->revision();
|
||||
}
|
||||
|
||||
QVector<QTextLayout::FormatRange> QmlJSTextEditorWidget::diagnosticRanges() const
|
||||
{
|
||||
return m_qmlJsEditorDocument->diagnosticRanges();
|
||||
}
|
||||
|
||||
bool QmlJSTextEditorWidget::isSemanticInfoOutdated() const
|
||||
{
|
||||
return m_qmlJsEditorDocument->isSemanticInfoOutdated();
|
||||
}
|
||||
|
||||
QmlOutlineModel *QmlJSTextEditorWidget::outlineModel() const
|
||||
{
|
||||
return m_qmlJsEditorDocument->outlineModel();
|
||||
}
|
||||
|
||||
QModelIndex QmlJSTextEditorWidget::outlineModelIndex()
|
||||
{
|
||||
if (!m_outlineModelIndex.isValid()) {
|
||||
@@ -299,7 +274,7 @@ void QmlJSTextEditorWidget::updateOutlineIndexNow()
|
||||
if (!m_qmlJsEditorDocument->outlineModel()->document())
|
||||
return;
|
||||
|
||||
if (m_qmlJsEditorDocument->outlineModel()->document()->editorRevision() != editorRevision()) {
|
||||
if (m_qmlJsEditorDocument->outlineModel()->document()->editorRevision() != document()->revision()) {
|
||||
m_updateOutlineIndexTimer->start();
|
||||
return;
|
||||
}
|
||||
@@ -832,6 +807,11 @@ void QmlJSTextEditorWidget::unCommentSelection()
|
||||
Utils::unCommentSelection(this);
|
||||
}
|
||||
|
||||
QmlJSEditorDocument *QmlJSTextEditorWidget::qmlJsEditorDocument() const
|
||||
{
|
||||
return m_qmlJsEditorDocument;
|
||||
}
|
||||
|
||||
void QmlJSTextEditorWidget::semanticInfoUpdated(const SemanticInfo &semanticInfo)
|
||||
{
|
||||
if (isVisible()) {
|
||||
|
||||
Reference in New Issue
Block a user