summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor/qmljseditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmljseditor/qmljseditor.cpp')
-rw-r--r--src/plugins/qmljseditor/qmljseditor.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp
index 13eab82ce4..c260c2f708 100644
--- a/src/plugins/qmljseditor/qmljseditor.cpp
+++ b/src/plugins/qmljseditor/qmljseditor.cpp
@@ -86,6 +86,7 @@
#include <QTextCodec>
#include <QTimer>
#include <QTreeView>
+#include <QDebug>
enum {
UPDATE_USES_DEFAULT_INTERVAL = 150,
@@ -230,7 +231,7 @@ bool QmlJSEditorWidget::isOutlineCursorChangesBlocked()
void QmlJSEditorWidget::jumpToOutlineElement(int /*index*/)
{
QModelIndex index = m_outlineCombo->view()->currentIndex();
- AST::SourceLocation location = m_qmlJsEditorDocument->outlineModel()->sourceLocation(index);
+ SourceLocation location = m_qmlJsEditorDocument->outlineModel()->sourceLocation(index);
if (!location.isValid())
return;
@@ -332,7 +333,7 @@ void QmlJSEditorWidget::updateUses()
return;
QList<QTextEdit::ExtraSelection> selections;
- foreach (const AST::SourceLocation &loc,
+ foreach (const SourceLocation &loc,
m_qmlJsEditorDocument->semanticInfo().idLocations.value(wordUnderCursor())) {
if (! loc.isValid())
continue;
@@ -432,6 +433,11 @@ protected:
}
}
}
+
+ void throwRecursionDepthError() override
+ {
+ qWarning("Warning: Hit maximum recursion depth visiting AST in SelectedElement");
+ }
};
void QmlJSEditorWidget::setSelectedElements()
@@ -941,7 +947,7 @@ QModelIndex QmlJSEditorWidget::indexForPosition(unsigned cursorPosition, const Q
const int rowCount = model->rowCount(rootIndex);
for (int i = 0; i < rowCount; ++i) {
QModelIndex childIndex = model->index(i, 0, rootIndex);
- AST::SourceLocation location = model->sourceLocation(childIndex);
+ SourceLocation location = model->sourceLocation(childIndex);
if ((cursorPosition >= location.offset)
&& (cursorPosition <= location.offset + location.length)) {