forked from qt-creator/qt-creator
Move openEditorAt from BaseTextEditorWidget to EditorManager
More sensible place, gotoLine is a method in IEditor anyhow. Change-Id: I420a6bf17060c16e6f1a4f45e0bef89379fb6bf8 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "qmlconsoleitemdelegate.h"
|
||||
#include "qmlconsoleitemmodel.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/manhattanstyle.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
@@ -231,7 +231,7 @@ void QmlConsoleView::onRowActivated(const QModelIndex &index)
|
||||
QFileInfo fi(filePath);
|
||||
if (fi.exists() && fi.isFile() && fi.isReadable()) {
|
||||
int line = model()->data(index, QmlConsoleItemModel::LineRole).toInt();
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(fi.canonicalFilePath(), line);
|
||||
Core::EditorManager::openEditorAt(fi.canonicalFilePath(), line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "qmljsfunctionfilter.h"
|
||||
#include "qmljslocatordata.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <QStringMatcher>
|
||||
|
||||
@@ -111,6 +111,6 @@ QList<Locator::FilterEntry> FunctionFilter::matchesFor(QFutureInterface<Locator:
|
||||
void FunctionFilter::accept(Locator::FilterEntry selection) const
|
||||
{
|
||||
const LocatorData::Entry entry = qvariant_cast<LocatorData::Entry>(selection.internalData);
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(entry.fileName, entry.line, entry.column,
|
||||
Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
Core::EditorManager::openEditorAt(entry.fileName, entry.line, entry.column,
|
||||
Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user