Commit bf5e43be authored by hjk's avatar hjk

TextEditor: Merge ITextEditor and BaseTextEditor

Adjust all callers, de-export BaseTextEditorAnimator

Change-Id: I2329d976c1398e2449844bb480a4d4ed29859506
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 15421995
......@@ -65,20 +65,16 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
IEditor *editor = EditorManager::currentEditor();
if (!editor)
return 0;
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor *>(editor);
TextEditor::BaseTextEditor *textEditor = qobject_cast<TextEditor::BaseTextEditor *>(editor);
if (!textEditor)
return 0;
TextEditor::BaseTextEditorWidget *editorWidget = qobject_cast<TextEditor::BaseTextEditorWidget *>(editor->widget());
TextEditor::BaseTextEditorWidget *editorWidget = textEditor->editorWidget();
if (!editorWidget)
return 0;
QPlainTextEdit *ptEdit = qobject_cast<QPlainTextEdit *>(editor->widget());
if (!ptEdit)
return 0;
QTextCursor tc;
tc = ptEdit->textCursor();
tc = editorWidget->textCursor();
int line = 0;
int column = 0;
const int pos = tc.position();
......
......@@ -39,7 +39,7 @@
#include <coreplugin/actionmanager/command.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <utils/tooltip/tooltip.h>
#include <utils/tooltip/tipcontents.h>
#include <utils/qtcassert.h>
......@@ -410,7 +410,7 @@ QVariant BookmarkManager::data(const QModelIndex &index, int role) const
void BookmarkManager::toggleBookmark()
{
ITextEditor *editor = ITextEditor::currentTextEditor();
BaseTextEditor *editor = BaseTextEditor::currentTextEditor();
if (!editor)
return;
......@@ -524,7 +524,7 @@ void BookmarkManager::prevInDocument()
void BookmarkManager::documentPrevNext(bool next)
{
ITextEditor *editor = ITextEditor::currentTextEditor();
BaseTextEditor *editor = BaseTextEditor::currentTextEditor();
int editorLine = editor->currentLine();
QFileInfo fi(editor->document()->filePath());
if (!m_bookmarksMap.contains(fi.path()))
......@@ -613,7 +613,7 @@ BookmarkManager::State BookmarkManager::state() const
if (m_bookmarksMap.empty())
return NoBookMarks;
ITextEditor *editor = ITextEditor::currentTextEditor();
BaseTextEditor *editor = BaseTextEditor::currentTextEditor();
if (!editor)
return HasBookMarks;
......@@ -795,7 +795,7 @@ void BookmarkManager::saveBookmarks()
SessionManager::setValue(QLatin1String("Bookmarks"), list);
}
void BookmarkManager::operateTooltip(ITextEditor *textEditor, const QPoint &pos, Bookmark *mark)
void BookmarkManager::operateTooltip(BaseTextEditor *textEditor, const QPoint &pos, Bookmark *mark)
{
if (!mark)
return;
......@@ -817,15 +817,15 @@ void BookmarkManager::loadBookmarks()
updateActionStatus();
}
void BookmarkManager::handleBookmarkRequest(ITextEditor *textEditor,
void BookmarkManager::handleBookmarkRequest(BaseTextEditor *textEditor,
int line,
ITextEditor::MarkRequestKind kind)
BaseTextEditor::MarkRequestKind kind)
{
if (kind == ITextEditor::BookmarkRequest && textEditor->document())
if (kind == BaseTextEditor::BookmarkRequest && textEditor->document())
toggleBookmark(textEditor->document()->filePath(), line);
}
void BookmarkManager::handleBookmarkTooltipRequest(ITextEditor *textEditor, const QPoint &pos,
void BookmarkManager::handleBookmarkTooltipRequest(BaseTextEditor *textEditor, const QPoint &pos,
int line)
{
if (textEditor->document()) {
......
......@@ -34,7 +34,7 @@
#include <coreplugin/icontext.h>
#include <coreplugin/inavigationwidgetfactory.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <QAbstractItemModel>
#include <QMultiMap>
......@@ -108,10 +108,10 @@ signals:
private slots:
void updateActionStatus();
void loadBookmarks();
void handleBookmarkRequest(TextEditor::ITextEditor * textEditor,
void handleBookmarkRequest(TextEditor::BaseTextEditor * textEditor,
int line,
TextEditor::ITextEditor::MarkRequestKind kind);
void handleBookmarkTooltipRequest(TextEditor::ITextEditor *textEditor,
TextEditor::BaseTextEditor::MarkRequestKind kind);
void handleBookmarkTooltipRequest(TextEditor::BaseTextEditor *textEditor,
const QPoint &pos,
int line);
......@@ -123,7 +123,7 @@ private:
void addBookmark(const QString &s);
static QString bookmarkToString(const Bookmark *b);
void saveBookmarks();
void operateTooltip(TextEditor::ITextEditor *textEditor, const QPoint &pos, Bookmark *mark);
void operateTooltip(TextEditor::BaseTextEditor *textEditor, const QPoint &pos, Bookmark *mark);
typedef QMultiMap<QString, Bookmark *> FileNameBookmarksMap;
typedef QMap<QString, FileNameBookmarksMap *> DirectoryFileBookmarksMap;
......
......@@ -40,7 +40,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/id.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/texteditorconstants.h>
#include <QtPlugin>
......@@ -152,32 +152,32 @@ void BookmarksPlugin::updateActions(int state)
void BookmarksPlugin::editorOpened(Core::IEditor *editor)
{
if (qobject_cast<ITextEditor *>(editor)) {
connect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
if (qobject_cast<BaseTextEditor *>(editor)) {
connect(editor, SIGNAL(markContextMenuRequested(TextEditor::BaseTextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::BaseTextEditor*,int,QMenu*)));
connect(editor,
SIGNAL(markRequested(TextEditor::ITextEditor*,int,
TextEditor::ITextEditor::MarkRequestKind)),
SIGNAL(markRequested(TextEditor::BaseTextEditor*,int,
TextEditor::BaseTextEditor::MarkRequestKind)),
m_bookmarkManager,
SLOT(handleBookmarkRequest(TextEditor::ITextEditor*,int,
TextEditor::ITextEditor::MarkRequestKind)));
SLOT(handleBookmarkRequest(TextEditor::BaseTextEditor*,int,
TextEditor::BaseTextEditor::MarkRequestKind)));
connect(editor,
SIGNAL(markTooltipRequested(TextEditor::ITextEditor*,QPoint,int)),
SIGNAL(markTooltipRequested(TextEditor::BaseTextEditor*,QPoint,int)),
m_bookmarkManager,
SLOT(handleBookmarkTooltipRequest(TextEditor::ITextEditor*,QPoint,int)));
SLOT(handleBookmarkTooltipRequest(TextEditor::BaseTextEditor*,QPoint,int)));
}
}
void BookmarksPlugin::editorAboutToClose(Core::IEditor *editor)
{
if (qobject_cast<ITextEditor *>(editor)) {
disconnect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
if (qobject_cast<BaseTextEditor *>(editor)) {
disconnect(editor, SIGNAL(markContextMenuRequested(TextEditor::BaseTextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::BaseTextEditor*,int,QMenu*)));
}
}
void BookmarksPlugin::requestContextMenu(TextEditor::ITextEditor *editor,
void BookmarksPlugin::requestContextMenu(TextEditor::BaseTextEditor *editor,
int lineNumber, QMenu *menu)
{
// Don't set bookmarks in disassembler views.
......
......@@ -42,7 +42,7 @@ QT_END_NAMESPACE
namespace Core { class IEditor; }
namespace TextEditor { class ITextEditor; }
namespace TextEditor { class BaseTextEditor; }
namespace Bookmarks {
namespace Internal {
......@@ -67,7 +67,7 @@ public slots:
private slots:
void editorOpened(Core::IEditor *editor);
void editorAboutToClose(Core::IEditor *editor);
void requestContextMenu(TextEditor::ITextEditor *editor,
void requestContextMenu(TextEditor::BaseTextEditor *editor,
int lineNumber, QMenu *menu);
void bookmarkMarginActionTriggered();
void editBookmarkActionTriggered();
......
......@@ -509,7 +509,7 @@ void ClangAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor
}
// Avoid inserting characters that are already there
const int endsPosition = editor->position(TextEditor::ITextEditor::EndOfLine);
const int endsPosition = editor->position(TextEditor::BaseTextEditor::EndOfLine);
const QString existingText = editor->textDocument()->textAt(editor->position(),
endsPosition - editor->position());
int existLength = 0;
......
......@@ -41,7 +41,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <QThread>
#include <QMutex>
......@@ -458,7 +458,7 @@ void Manager::gotoLocations(const QList<QVariant> &list)
fileName = document->filePath();
// if text file - what is current position?
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor *>(editor);
TextEditor::BaseTextEditor *textEditor = qobject_cast<TextEditor::BaseTextEditor *>(editor);
if (textEditor) {
// there is open currently text editor
int position = textEditor->position();
......
......@@ -109,7 +109,7 @@ void CMakeEditor::build()
QString CMakeEditor::contextHelpId() const
{
int pos = position();
TextEditor::ITextEditorDocument* doc = const_cast<CMakeEditor*>(this)->textDocument();
TextEditor::BaseTextEditorDocument* doc = const_cast<CMakeEditor*>(this)->textDocument();
QChar chr;
do {
......
......@@ -50,7 +50,7 @@
#include <coreplugin/messagemanager.h>
#include <utils/qtcassert.h>
#include <utils/fileutils.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <QtPlugin>
#include <QDebug>
......@@ -211,10 +211,10 @@ void CodepasterPlugin::postEditor()
const IDocument *document = editor->document();
const QString mimeType = document->mimeType();
QString data;
if (const ITextEditor *textEditor = qobject_cast<const ITextEditor *>(editor))
if (const BaseTextEditor *textEditor = qobject_cast<const BaseTextEditor *>(editor))
data = textEditor->selectedText();
if (data.isEmpty()) {
if (const ITextEditorDocument *textDocument = qobject_cast<const ITextEditorDocument *>(document))
if (const BaseTextEditorDocument *textDocument = qobject_cast<const BaseTextEditorDocument *>(document))
data = textDocument->plainText();
}
post(data, mimeType);
......
......@@ -1054,7 +1054,7 @@ void CPPEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL
Core::IDocument *targetDocument
= Core::DocumentModel::documentForFilePath( d->m_declDefLink->targetFile->fileName());
if (baseTextDocument() != targetDocument) {
if (TextEditor::ITextEditorDocument *textEditorDocument = qobject_cast<TextEditor::ITextEditorDocument *>(targetDocument))
if (TextEditor::BaseTextEditorDocument *textEditorDocument = qobject_cast<TextEditor::BaseTextEditorDocument *>(targetDocument))
connect(textEditorDocument, SIGNAL(contentsChanged()),
this, SLOT(abortDeclDefLink()));
}
......@@ -1103,7 +1103,7 @@ void CPPEditorWidget::abortDeclDefLink()
Core::IDocument *targetDocument
= Core::DocumentModel::documentForFilePath(d->m_declDefLink->targetFile->fileName());
if (baseTextDocument() != targetDocument) {
if (TextEditor::ITextEditorDocument *textEditorDocument = qobject_cast<TextEditor::ITextEditorDocument *>(targetDocument))
if (TextEditor::BaseTextEditorDocument *textEditorDocument = qobject_cast<TextEditor::BaseTextEditorDocument *>(targetDocument))
disconnect(textEditorDocument, SIGNAL(contentsChanged()),
this, SLOT(abortDeclDefLink()));
}
......
......@@ -37,7 +37,7 @@
#include <QtPlugin>
#include <QAction>
namespace TextEditor { class ITextEditor; }
namespace TextEditor { class BaseTextEditor; }
namespace CppEditor {
namespace Internal {
......@@ -243,7 +243,7 @@ private:
QPointer<CppCodeModelInspectorDialog> m_cppCodeModelInspectorDialog;
QPointer<TextEditor::ITextEditor> m_currentEditor;
QPointer<TextEditor::BaseTextEditor> m_currentEditor;
};
class CppEditorFactory : public Core::IEditorFactory
......
......@@ -54,7 +54,7 @@ bool CppHoverHandler::acceptEditor(IEditor *editor)
return editor->document()->id() == CppEditor::Constants::CPPEDITOR_ID;
}
void CppHoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos)
void CppHoverHandler::identifyMatch(TextEditor::BaseTextEditor *editor, int pos)
{
using namespace TextEditor;
BaseTextEditorWidget *textEditor = qobject_cast<BaseTextEditorWidget *>(editor->widget());
......
......@@ -36,7 +36,7 @@
namespace Core { class IEditor; }
namespace TextEditor { class ITextEditor; }
namespace TextEditor { class BaseTextEditor; }
namespace CppEditor {
namespace Internal {
......@@ -50,7 +50,7 @@ public:
private:
virtual bool acceptEditor(Core::IEditor *editor);
virtual void identifyMatch(TextEditor::ITextEditor *editor, int pos);
virtual void identifyMatch(TextEditor::BaseTextEditor *editor, int pos);
virtual void decorateToolTip();
};
......
......@@ -305,7 +305,7 @@ void CppAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor *e
// Determine the length of characters that should just be kept on the editor, but do
// not consider content that ends as an identifier (which could be undesired).
const int lineEnd = editor->position(TextEditor::ITextEditor::EndOfLine);
const int lineEnd = editor->position(TextEditor::BaseTextEditor::EndOfLine);
const QString inEditor = editor->textDocument()->textAt(editor->position(),
lineEnd - editor->position());
int preserveLength = 0;
......
......@@ -55,7 +55,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/taskhub.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <utils/synchronousprocess.h>
#include <utils/qtcprocess.h>
......@@ -447,7 +447,7 @@ void CdbEngine::syncVerboseLog(bool verboseLog)
postCommand(m_verboseLog ? QByteArray("!sym noisy") : QByteArray("!sym quiet"), 0);
}
bool CdbEngine::setToolTipExpression(TextEditor::ITextEditor *editor,
bool CdbEngine::setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &contextIn)
{
if (debug)
......
......@@ -76,7 +76,7 @@ public:
// Factory function that returns 0 if the debug engine library cannot be found.
virtual bool setToolTipExpression(TextEditor::ITextEditor *editor,
virtual bool setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &ctx);
virtual void setupEngine();
virtual void setupInferior();
......
......@@ -57,7 +57,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <utils/savedaction.h>
#include <utils/qtcassert.h>
......@@ -1360,7 +1360,7 @@ DebuggerRunControl *DebuggerEngine::runControl() const
return d->runControl();
}
bool DebuggerEngine::setToolTipExpression(TextEditor::ITextEditor *,
bool DebuggerEngine::setToolTipExpression(TextEditor::BaseTextEditor *,
const DebuggerToolTipContext &)
{
return false;
......
......@@ -45,7 +45,7 @@ class QMessageBox;
class QAbstractItemModel;
QT_END_NAMESPACE
namespace TextEditor { class ITextEditor; }
namespace TextEditor { class BaseTextEditor; }
namespace Core { class IOptionsPage; }
namespace Debugger {
......@@ -143,7 +143,7 @@ public:
const DebuggerStartParameters &startParameters() const;
DebuggerStartParameters &startParameters();
virtual bool setToolTipExpression(TextEditor::ITextEditor *editor,
virtual bool setToolTipExpression(TextEditor::BaseTextEditor *editor,
const Internal::DebuggerToolTipContext &);
virtual void updateWatchData(const Internal::WatchData &data,
......
......@@ -690,7 +690,7 @@ bool fillParameters(DebuggerStartParameters *sp, const Kit *kit, QString *errorM
static bool currentTextEditorPosition(ContextData *data)
{
ITextEditor *textEditor = ITextEditor::currentTextEditor();
BaseTextEditor *textEditor = BaseTextEditor::currentTextEditor();
if (!textEditor)
return false;
const IDocument *document = textEditor->document();
......@@ -864,10 +864,10 @@ public slots:
void editorOpened(Core::IEditor *editor);
void updateBreakMenuItem(Core::IEditor *editor);
void setBusyCursor(bool busy);
void requestMark(TextEditor::ITextEditor *editor,
void requestMark(TextEditor::BaseTextEditor *editor,
int lineNumber,
TextEditor::ITextEditor::MarkRequestKind kind);
void requestContextMenu(TextEditor::ITextEditor *editor,
TextEditor::BaseTextEditor::MarkRequestKind kind);
void requestContextMenu(TextEditor::BaseTextEditor *editor,
int lineNumber, QMenu *menu);
void activatePreviousMode();
......@@ -1060,11 +1060,10 @@ public slots:
void handleExecRunToSelectedFunction()
{
ITextEditor *textEditor = ITextEditor::currentTextEditor();
BaseTextEditor *textEditor = BaseTextEditor::currentTextEditor();
QTC_ASSERT(textEditor, return);
QPlainTextEdit *ed = qobject_cast<QPlainTextEdit*>(textEditor->widget());
if (!ed)
return;
QPlainTextEdit *ed = textEditor->editorWidget();
QTC_ASSERT(ed, return);
QTextCursor cursor = ed->textCursor();
QString functionName = cursor.selectedText();
if (functionName.isEmpty()) {
......@@ -1132,15 +1131,10 @@ public slots:
{
// Requires a selection, but that's the only case we want anyway.
IEditor *editor = EditorManager::currentEditor();
if (!editor)
return;
ITextEditor *textEditor = qobject_cast<ITextEditor*>(editor);
BaseTextEditor *textEditor = qobject_cast<BaseTextEditor*>(editor);
if (!textEditor)
return;
QTextCursor tc;
QPlainTextEdit *ptEdit = qobject_cast<QPlainTextEdit*>(editor->widget());
if (ptEdit)
tc = ptEdit->textCursor();
QTextCursor tc = textEditor->editorWidget()->textCursor();
QString exp;
if (tc.hasSelection()) {
exp = tc.selectedText();
......@@ -1900,24 +1894,24 @@ void DebuggerPluginPrivate::runScheduled()
void DebuggerPluginPrivate::editorOpened(IEditor *editor)
{
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
BaseTextEditor *textEditor = qobject_cast<BaseTextEditor *>(editor);
if (!textEditor)
return;
connect(textEditor,
SIGNAL(markRequested(TextEditor::ITextEditor*,int,TextEditor::ITextEditor::MarkRequestKind)),
SLOT(requestMark(TextEditor::ITextEditor*,int,TextEditor::ITextEditor::MarkRequestKind)));
SIGNAL(markRequested(TextEditor::BaseTextEditor*,int,TextEditor::BaseTextEditor::MarkRequestKind)),
SLOT(requestMark(TextEditor::BaseTextEditor*,int,TextEditor::BaseTextEditor::MarkRequestKind)));
connect(textEditor,
SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)),
SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
SIGNAL(markContextMenuRequested(TextEditor::BaseTextEditor*,int,QMenu*)),
SLOT(requestContextMenu(TextEditor::BaseTextEditor*,int,QMenu*)));
}
void DebuggerPluginPrivate::updateBreakMenuItem(IEditor *editor)
{
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
BaseTextEditor *textEditor = qobject_cast<BaseTextEditor *>(editor);
m_breakAction->setEnabled(textEditor != 0);
}
void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor,
void DebuggerPluginPrivate::requestContextMenu(BaseTextEditor *editor,
int lineNumber, QMenu *menu)
{
BreakpointMenuContextData args;
......@@ -1925,7 +1919,7 @@ void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor,
bool contextUsable = true;
BreakpointModelId id = BreakpointModelId();
ITextEditorDocument *document = editor->textDocument();
BaseTextEditorDocument *document = editor->textDocument();
args.fileName = document->filePath();
if (document->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
QString line = document->plainText()
......@@ -2037,7 +2031,7 @@ void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor,
void DebuggerPluginPrivate::toggleBreakpoint()
{
ITextEditor *textEditor = ITextEditor::currentTextEditor();
BaseTextEditor *textEditor = BaseTextEditor::currentTextEditor();
QTC_ASSERT(textEditor, return);
const int lineNumber = textEditor->currentLine();
if (textEditor->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
......@@ -2090,11 +2084,11 @@ void DebuggerPluginPrivate::toggleBreakpointByAddress(quint64 address,
}
}
void DebuggerPluginPrivate::requestMark(ITextEditor *editor,
void DebuggerPluginPrivate::requestMark(BaseTextEditor *editor,
int lineNumber,
ITextEditor::MarkRequestKind kind)
BaseTextEditor::MarkRequestKind kind)
{
if (kind != ITextEditor::BreakpointRequest)
if (kind != BaseTextEditor::BreakpointRequest)
return;
if (IDocument *document = editor->document()) {
......
......@@ -1277,8 +1277,8 @@ void DebuggerToolTipManager::slotEditorOpened(IEditor *e)
connect(toolTipEditor.widget->verticalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(slotUpdateVisibleToolTips()));
connect(toolTipEditor.editor,
SIGNAL(tooltipOverrideRequested(TextEditor::ITextEditor*,QPoint,int,bool*)),
SLOT(slotTooltipOverrideRequested(TextEditor::ITextEditor*,QPoint,int,bool*)));
SIGNAL(tooltipOverrideRequested(TextEditor::BaseTextEditor*,QPoint,int,bool*)),
SLOT(slotTooltipOverrideRequested(TextEditor::BaseTextEditor*,QPoint,int,bool*)));
}
}
......@@ -1324,7 +1324,7 @@ void DebuggerToolTipManager::leavingDebugMode()
}
void DebuggerToolTipManager::slotTooltipOverrideRequested
(ITextEditor *editor, const QPoint &point, int pos, bool *handled)
(BaseTextEditor *editor, const QPoint &point, int pos, bool *handled)
{
QTC_ASSERT(handled, return);
QTC_ASSERT(editor, return);
......@@ -1347,7 +1347,7 @@ void DebuggerToolTipManager::slotTooltipOverrideRequested
}
}
bool DebuggerToolTipManager::tryHandleToolTipOverride(ITextEditor *editor, const QPoint &point, int pos)
bool DebuggerToolTipManager::tryHandleToolTipOverride(BaseTextEditor *editor, const QPoint &point, int pos)
{
DebuggerCore *core = debuggerCore();
if (!core->boolSetting(UseToolTipsInMainEditor))
......
......@@ -41,7 +41,7 @@ class QDebug;
QT_END_NAMESPACE
namespace Core { class IEditor; }
namespace TextEditor { class ITextEditor; }
namespace TextEditor { class BaseTextEditor; }
namespace Debugger {
class DebuggerEngine;
......@@ -132,11 +132,11 @@ private slots:
static void slotUpdateVisibleToolTips();
void slotDebuggerStateChanged(Debugger::DebuggerState);
void slotEditorOpened(Core::IEditor *);
void slotTooltipOverrideRequested(TextEditor::ITextEditor *editor,
void slotTooltipOverrideRequested(TextEditor::BaseTextEditor *editor,
const QPoint &point, int pos, bool *handled);
private:
bool tryHandleToolTipOverride(TextEditor::ITextEditor *editor,
bool tryHandleToolTipOverride(TextEditor::BaseTextEditor *editor,
const QPoint &point, int pos);
};
......
......@@ -67,7 +67,7 @@
#include <projectexplorer/devicesupport/deviceprocess.h>
#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/taskhub.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
......@@ -3651,7 +3651,7 @@ void GdbEngine::resetLocation()
DebuggerEngine::resetLocation();
}
bool GdbEngine::setToolTipExpression(TextEditor::ITextEditor *editor,
bool GdbEngine::setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &context)
{
if (state() != InferiorStopOk || !isCppEditor(editor)) {
......
......@@ -407,7 +407,7 @@ protected:
//
// Watch specific stuff
//
virtual bool setToolTipExpression(TextEditor::ITextEditor *editor,
virtual bool setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &);
virtual void assignValueInDebugger(const WatchData *data,
const QString &expr, const QVariant &value);
......
......@@ -54,7 +54,7 @@
#include <utils/savedaction.h>
#include <utils/qtcprocess.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <coreplugin/idocument.h>
#include <coreplugin/icore.h>
......@@ -837,7 +837,7 @@ void LldbEngine::resetLocation()
DebuggerEngine::resetLocation();
}
bool LldbEngine::setToolTipExpression(TextEditor::ITextEditor *editor, const DebuggerToolTipContext &context)
bool LldbEngine::setToolTipExpression(TextEditor::BaseTextEditor *editor, const DebuggerToolTipContext &context)
{
if (state() != InferiorStopOk || !isCppEditor(editor)) {
//qDebug() << "SUPPRESSING DEBUGGER TOOLTIP, INFERIOR NOT STOPPED "
......
......@@ -108,7 +108,7 @@ private:
void abortDebugger();
void resetLocation();
bool setToolTipExpression(TextEditor::ITextEditor *editor,
bool setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &);
void continueInferior();
......
......@@ -48,7 +48,7 @@
#include <utils/qtcassert.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <coreplugin/idocument.h>
#include <coreplugin/icore.h>
......@@ -452,7 +452,7 @@ static WatchData m_toolTip;
static QPoint m_toolTipPos;
static QHash<QString, WatchData> m_toolTipCache;
bool PdbEngine::setToolTipExpression(TextEditor::ITextEditor *editor,
bool PdbEngine::setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &ctx)
{
Q_UNUSED(editor)
......
......@@ -75,7 +75,7 @@ private:
void shutdownInferior();
void shutdownEngine();
bool setToolTipExpression(TextEditor::ITextEditor *editor,
bool setToolTipExpression(TextEditor::BaseTextEditor *editor,
const DebuggerToolTipContext &);
void continueInferior();
......
......@@ -35,7 +35,7 @@
#include <debugger/watchhandler.h>
#include <utils/qtcassert.h>
#include <texteditor/itexteditor.h>
#include <texteditor/basetexteditor.h>
#include <qmljseditor/qmljseditorconstants.h>
#include <cppeditor/cppeditorconstants.h>
#include <qmljs/consolemanagerinterface.h>
......@@ -89,7 +89,7 @@ bool QmlCppEngine::canDisplayTooltip() const
return m_cppEngine->canDisplayTooltip() || m_qmlEngine->canDisplayTooltip();
}