diff options
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/debuggerengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 20 | ||||
-rw-r--r-- | src/plugins/debugger/debuggertooltipmanager.cpp | 16 | ||||
-rw-r--r-- | src/plugins/debugger/disassembleragent.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/pdb/pdbengine.cpp | 4 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/script/scriptengine.cpp | 4 | ||||
-rw-r--r-- | src/plugins/debugger/watchutils.cpp | 20 |
9 files changed, 36 insertions, 36 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 888b8a1d52..743e0c1350 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -52,7 +52,7 @@ #include "watchhandler.h" #include <coreplugin/icore.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/futureprogress.h> diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 5794376538..60e9cbb8ba 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -585,9 +585,9 @@ static bool currentTextEditorPosition(ContextData *data) TextEditor::ITextEditor *textEditor = currentTextEditor(); if (!textEditor) return false; - const Core::IFile *file = textEditor->file(); - QTC_ASSERT(file, return false); - data->fileName = file->fileName(); + const Core::IDocument *document = textEditor->document(); + QTC_ASSERT(document, return false); + data->fileName = document->fileName(); if (textEditor->property("DisassemblerView").toBool()) { int lineNumber = textEditor->currentLine(); QString line = textEditor->contents() @@ -1868,7 +1868,7 @@ void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor, bool contextUsable = true; BreakpointModelId id = BreakpointModelId(); - const QString fileName = editor->file()->fileName(); + const QString fileName = editor->document()->fileName(); if (editor->property("DisassemblerView").toBool()) { args.fileName = fileName; QString line = editor->contents() @@ -1881,7 +1881,7 @@ void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor, id = breakHandler()->findSimilarBreakpoint(needle); contextUsable = args.address != 0; } else { - args.fileName = editor->file()->fileName(); + args.fileName = editor->document()->fileName(); id = breakHandler() ->findBreakpointByFileAndLine(args.fileName, lineNumber); if (!id) @@ -1989,7 +1989,7 @@ void DebuggerPluginPrivate::toggleBreakpoint() quint64 address = DisassemblerLine::addressFromDisassemblyLine(line); toggleBreakpointByAddress(address); } else if (lineNumber >= 0) { - toggleBreakpointByFileAndLine(textEditor->file()->fileName(), lineNumber); + toggleBreakpointByFileAndLine(textEditor->document()->fileName(), lineNumber); } } @@ -2043,8 +2043,8 @@ void DebuggerPluginPrivate::requestMark(ITextEditor *editor, .section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1); quint64 address = DisassemblerLine::addressFromDisassemblyLine(line); toggleBreakpointByAddress(address); - } else if (editor->file()) { - toggleBreakpointByFileAndLine(editor->file()->fileName(), lineNumber); + } else if (editor->document()) { + toggleBreakpointByFileAndLine(editor->document()->fileName(), lineNumber); } } @@ -2146,7 +2146,7 @@ void DebuggerPluginPrivate::cleanupViews() // Close disassembly views. Close other opened files // if they are not modified and not current editor. if (editor->property(Constants::OPENED_WITH_DISASSEMBLY).toBool() - || (!editor->file()->isModified() + || (!editor->document()->isModified() && editor != editorManager->currentEditor())) { toClose.append(editor); } else { @@ -3659,7 +3659,7 @@ void DebuggerPluginPrivate::testProjectLoaded(Project *project) disconnect(pe, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), this, SLOT(testProjectLoaded(ProjectExplorer::Project*))); - QString fileName = project->file()->fileName(); + QString fileName = project->document()->fileName(); QVERIFY(!fileName.isEmpty()); qWarning("Project %s loaded", qPrintable(fileName)); diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp index 1a8de6ee43..3271760716 100644 --- a/src/plugins/debugger/debuggertooltipmanager.cpp +++ b/src/plugins/debugger/debuggertooltipmanager.cpp @@ -210,26 +210,26 @@ class DebuggerToolTipEditor { public: explicit DebuggerToolTipEditor(IEditor *ie = 0); - bool isValid() const { return textEditor && baseTextEditor && file; } + bool isValid() const { return textEditor && baseTextEditor && document; } operator bool() const { return isValid(); } - QString fileName() const { return file ? file->fileName() : QString(); } + QString fileName() const { return document ? document->fileName() : QString(); } static DebuggerToolTipEditor currentToolTipEditor(); ITextEditor *textEditor; BaseTextEditorWidget *baseTextEditor; - IFile *file; + IDocument *document; }; DebuggerToolTipEditor::DebuggerToolTipEditor(IEditor *ie) : - textEditor(0), baseTextEditor(0), file(0) + textEditor(0), baseTextEditor(0), document(0) { - if (ie && ie->file() && isEditorDebuggable(ie)) { + if (ie && ie->document() && isEditorDebuggable(ie)) { if (ITextEditor *te = qobject_cast<ITextEditor *>(ie)) { if (BaseTextEditorWidget *pe = qobject_cast<BaseTextEditorWidget *>(ie->widget())) { textEditor = te; baseTextEditor = pe; - file = ie->file(); + document = ie->document(); } } } @@ -552,9 +552,9 @@ DebuggerToolTipContext::DebuggerToolTipContext() : position(0), line(0), column( DebuggerToolTipContext DebuggerToolTipContext::fromEditor(IEditor *ie, int pos) { DebuggerToolTipContext rc; - if (const IFile *file = ie->file()) { + if (const IDocument *document = ie->document()) { if (const ITextEditor *te = qobject_cast<const ITextEditor *>(ie)) { - rc.fileName = file->fileName(); + rc.fileName = document->fileName(); rc.position = pos; te->convertPosition(pos, &rc.line, &rc.column); } diff --git a/src/plugins/debugger/disassembleragent.cpp b/src/plugins/debugger/disassembleragent.cpp index e8dabf52b5..e058f2ab9c 100644 --- a/src/plugins/debugger/disassembleragent.cpp +++ b/src/plugins/debugger/disassembleragent.cpp @@ -251,7 +251,7 @@ void DisassemblerAgentPrivate::configureMimeType() QTC_ASSERT(editor, return); TextEditor::BaseTextDocument *doc = - qobject_cast<TextEditor::BaseTextDocument *>(editor->file()); + qobject_cast<TextEditor::BaseTextDocument *>(editor->document()); QTC_ASSERT(doc, return); doc->setMimeType(mimeType); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 5c18eff124..a3031d5abf 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -71,7 +71,7 @@ #include "logwindow.h" #include <coreplugin/icore.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <projectexplorer/abi.h> #include <projectexplorer/projectexplorerconstants.h> #include <texteditor/itexteditor.h> diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index 72631e4b5b..8dca7e0fed 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -54,7 +54,7 @@ #include <utils/qtcassert.h> #include <texteditor/itexteditor.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <coreplugin/icore.h> #include <QDateTime> @@ -466,7 +466,7 @@ bool PdbEngine::setToolTipExpression(const QPoint &mousePos, // Check mime type and get expression (borrowing some C++ - functions) const QString javaPythonMimeType = QLatin1String("application/javascript"); - if (!editor->file() || editor->file()->mimeType() != javaPythonMimeType) + if (!editor->document() || editor->document()->mimeType() != javaPythonMimeType) return false; int line; diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index 471eb42b76..3cd5e08f40 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -1988,7 +1988,7 @@ void QmlV8DebuggerClient::highlightExceptionCode(int lineNumber, errorFormat.setUnderlineColor(Qt::red); foreach (IEditor *editor, openedEditors) { - if (editor->file()->fileName() == filePath) { + if (editor->document()->fileName() == filePath) { TextEditor::BaseTextEditorWidget *ed = qobject_cast<TextEditor::BaseTextEditorWidget *>(editor->widget()); if (!ed) continue; diff --git a/src/plugins/debugger/script/scriptengine.cpp b/src/plugins/debugger/script/scriptengine.cpp index b95b4ec697..fb8731e3bb 100644 --- a/src/plugins/debugger/script/scriptengine.cpp +++ b/src/plugins/debugger/script/scriptengine.cpp @@ -50,7 +50,7 @@ #include <utils/qtcassert.h> #include <texteditor/itexteditor.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <coreplugin/scriptmanager/scriptmanager.h> #include <coreplugin/icore.h> @@ -522,7 +522,7 @@ bool ScriptEngine::setToolTipExpression(const QPoint &mousePos, // Check mime type and get expression (borrowing some C++ - functions) const QString javaScriptMimeType = QLatin1String("application/javascript"); - if (!editor->file() || editor->file()->mimeType() != javaScriptMimeType) + if (!editor->document() || editor->document()->mimeType() != javaScriptMimeType) return false; int line; diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index 7007a1133c..d95834e481 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -36,7 +36,7 @@ #include <utils/qtcassert.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <texteditor/basetexteditor.h> #include <texteditor/basetextmark.h> @@ -151,7 +151,7 @@ bool isEditorDebuggable(Core::IEditor *editor) { // Only blacklist Qml. Whitelisting would fail on C++ code in files // with strange names, more harm would be done this way. - // IFile *file = editor->file(); + // IDocument *file = editor->document(); // return !(file && file->mimeType() == "application/x-qml"); // Nowadays, even Qml is debuggable. return editor; @@ -442,9 +442,9 @@ bool getUninitializedVariables(const CPlusPlus::Snapshot &snapshot, QByteArray gdbQuoteTypes(const QByteArray &type) { - // gdb does not understand sizeof(Core::IFile*). - // "sizeof('Core::IFile*')" is also not acceptable, - // it needs to be "sizeof('Core::IFile'*)" + // gdb does not understand sizeof(Core::IDocument*). + // "sizeof('Core::IDocument*')" is also not acceptable, + // it needs to be "sizeof('Core::IDocument'*)" // // We never will have a perfect solution here (even if we had a full blown // C++ parser as we do not have information on what is a type and what is @@ -647,10 +647,10 @@ QString decodeData(const QByteArray &ba, int encoding) bool isCppEditor(Core::IEditor *editor) { using namespace CppTools::Constants; - const Core::IFile *file = editor->file(); - if (!file) + const Core::IDocument *document= editor->document(); + if (!document) return false; - const QByteArray mimeType = file->mimeType().toLatin1(); + const QByteArray mimeType = document->mimeType().toLatin1(); return mimeType == C_SOURCE_MIMETYPE || mimeType == CPP_SOURCE_MIMETYPE || mimeType == CPP_HEADER_MIMETYPE @@ -693,10 +693,10 @@ QString cppExpressionAt(TextEditor::ITextEditor *editor, int pos, } if (function && !expr.isEmpty()) - if (const Core::IFile *file = editor->file()) + if (const Core::IDocument *document= editor->document()) if (modelManager) *function = AbstractEditorSupport::functionAt(modelManager, - file->fileName(), *line, *column); + document->fileName(), *line, *column); return expr; } |