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:
Eike Ziller
2013-05-30 17:26:51 +02:00
parent 97ce8e4098
commit 2125525e77
25 changed files with 84 additions and 98 deletions

View File

@@ -62,7 +62,7 @@
#include <cplusplus/Overview.h>
#include <cppeditor/cppeditorconstants.h>
#include <extensionsystem/iplugin.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/itexteditor.h>
#include <utils/qtcassert.h>
#include <utils/fancymainwindow.h>
@@ -322,7 +322,7 @@ void CallgrindToolPrivate::selectFunction(const Function *func)
if (QFile::exists(func->file())) {
///TODO: custom position support?
int line = func->lineNumber();
TextEditor::BaseTextEditorWidget::openEditorAt(func->file(), qMax(line, 0));
Core::EditorManager::openEditorAt(func->file(), qMax(line, 0));
}
}

View File

@@ -41,9 +41,9 @@
#include "xmlprotocol/suppression.h"
#include <coreplugin/coreconstants.h>
#include <projectexplorer/projectexplorer.h>
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/project.h>
#include <texteditor/basetexteditor.h>
#include <projectexplorer/projectexplorer.h>
#include <utils/qtcassert.h>
#include <QDir>
@@ -52,6 +52,7 @@
#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QContextMenuEvent>
#include <QLabel>
#include <QListView>
#include <QMenu>
@@ -432,7 +433,7 @@ void MemcheckErrorDelegate::openLinkInEditor(const QString &link)
const int pathEnd = link.lastIndexOf(QLatin1Char(':'));
const QString path = link.mid(pathStart, pathEnd - pathStart);
const int line = link.mid(pathEnd + 1).toInt(0);
TextEditor::BaseTextEditorWidget::openEditorAt(path, qMax(line, 0));
Core::EditorManager::openEditorAt(path, qMax(line, 0));
}
MemcheckErrorView::MemcheckErrorView(QWidget *parent)

View File

@@ -54,15 +54,14 @@
#include <projectexplorer/session.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
#include <texteditor/basetexteditor.h>
#include <utils/fancymainwindow.h>
#include <utils/styledbar.h>
#include <utils/qtcassert.h>
@@ -502,7 +501,7 @@ void MemcheckTool::suppressionActionTriggered()
const QString file = action->data().toString();
QTC_ASSERT(!file.isEmpty(), return);
TextEditor::BaseTextEditorWidget::openEditorAt(file, 0);
Core::EditorManager::openEditorAt(file, 0);
}
void MemcheckTool::parserError(const Valgrind::XmlProtocol::Error &error)