Debugger: remove isEditorDebuggable

It was returning 'true' unconditionally for a while.

Change-Id: Ia99bdb3c525641f757dacbba148b68d677f4d632
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-01-24 16:03:21 +01:00
parent 2f9574582d
commit 794b41581b
4 changed files with 2 additions and 18 deletions

View File

@@ -1821,8 +1821,6 @@ void DebuggerPluginPrivate::runScheduled()
void DebuggerPluginPrivate::editorOpened(IEditor *editor) void DebuggerPluginPrivate::editorOpened(IEditor *editor)
{ {
if (!isEditorDebuggable(editor))
return;
ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor); ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor);
if (!textEditor) if (!textEditor)
return; return;
@@ -1843,9 +1841,6 @@ void DebuggerPluginPrivate::updateBreakMenuItem(IEditor *editor)
void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor, void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor,
int lineNumber, QMenu *menu) int lineNumber, QMenu *menu)
{ {
if (!isEditorDebuggable(editor))
return;
BreakpointMenuContextData args; BreakpointMenuContextData args;
args.lineNumber = lineNumber; args.lineNumber = lineNumber;
bool contextUsable = true; bool contextUsable = true;

View File

@@ -220,7 +220,7 @@ public:
DebuggerToolTipEditor::DebuggerToolTipEditor(IEditor *ie) : DebuggerToolTipEditor::DebuggerToolTipEditor(IEditor *ie) :
textEditor(0), baseTextEditor(0), document(0) textEditor(0), baseTextEditor(0), document(0)
{ {
if (ie && ie->document() && isEditorDebuggable(ie)) { if (ie && ie->document()) {
if (ITextEditor *te = qobject_cast<ITextEditor *>(ie)) { if (ITextEditor *te = qobject_cast<ITextEditor *>(ie)) {
if (BaseTextEditorWidget *pe = qobject_cast<BaseTextEditorWidget *>(ie->widget())) { if (BaseTextEditorWidget *pe = qobject_cast<BaseTextEditorWidget *>(ie->widget())) {
textEditor = te; textEditor = te;
@@ -1435,7 +1435,7 @@ void DebuggerToolTipManager::slotTooltipOverrideRequested(ITextEditor *editor,
break; // Avoid flicker. break; // Avoid flicker.
DebuggerCore *core = debuggerCore(); DebuggerCore *core = debuggerCore();
if (!isEditorDebuggable(editor) || !core->boolSetting(UseToolTipsInMainEditor)) if (!core->boolSetting(UseToolTipsInMainEditor))
break; break;
currentEngine = core->currentEngine(); currentEngine = core->currentEngine();

View File

@@ -145,16 +145,6 @@ QDebug operator<<(QDebug d, const Scope &scope)
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
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.
// IDocument *file = editor->document();
// return !(file && file->mimeType() == "application/x-qml");
// Nowadays, even Qml is debuggable.
return editor;
}
QByteArray dotEscape(QByteArray str) QByteArray dotEscape(QByteArray str)
{ {
str.replace(' ', '.'); str.replace(' ', '.');

View File

@@ -51,7 +51,6 @@ namespace Internal {
class WatchData; class WatchData;
class GdbMi; class GdbMi;
bool isEditorDebuggable(Core::IEditor *editor);
QByteArray dotEscape(QByteArray str); QByteArray dotEscape(QByteArray str);
QString currentTime(); QString currentTime();
bool isSkippableFunction(const QString &funcName, const QString &fileName); bool isSkippableFunction(const QString &funcName, const QString &fileName);