forked from qt-creator/qt-creator
debugger: fix 'Jump To/Run to' when in instruction-wise mode
This commit is contained in:
@@ -686,14 +686,6 @@ QString decodeData(const QByteArray &ba, int encoding)
|
||||
return QCoreApplication::translate("Debugger", "<Encoding error>");
|
||||
}
|
||||
|
||||
TextEditor::ITextEditor *currentTextEditor()
|
||||
{
|
||||
if (const Core::EditorManager *editorManager = Core::EditorManager::instance())
|
||||
if (Core::IEditor *editor = editorManager->currentEditor())
|
||||
return qobject_cast<TextEditor::ITextEditor*>(editor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Editor tooltip support
|
||||
bool isCppEditor(Core::IEditor *editor)
|
||||
{
|
||||
@@ -708,24 +700,6 @@ bool isCppEditor(Core::IEditor *editor)
|
||||
|| mimeType == OBJECTIVE_CPP_SOURCE_MIMETYPE;
|
||||
}
|
||||
|
||||
bool currentTextEditorPosition(QString *fileNameIn /* = 0 */,
|
||||
int *lineNumberIn /* = 0 */)
|
||||
{
|
||||
QString fileName;
|
||||
int lineNumber = 0;
|
||||
if (TextEditor::ITextEditor *textEditor = currentTextEditor()) {
|
||||
if (const Core::IFile *file = textEditor->file()) {
|
||||
fileName = file->fileName();
|
||||
lineNumber = textEditor->currentLine();
|
||||
}
|
||||
}
|
||||
if (fileNameIn)
|
||||
*fileNameIn = fileName;
|
||||
if (lineNumberIn)
|
||||
*lineNumberIn = lineNumber;
|
||||
return !fileName.isEmpty();
|
||||
}
|
||||
|
||||
// Return the Cpp expression, and, if desired, the function
|
||||
QString cppExpressionAt(TextEditor::ITextEditor *editor, int pos,
|
||||
int *line, int *column, QString *function /* = 0 */)
|
||||
|
||||
Reference in New Issue
Block a user