Commit 46952c04 authored by hjk's avatar hjk
parent b65bbff4
......@@ -29,6 +29,7 @@
#include "breakhandler.h"
#include "debuggeractions.h"
#include "debuggermanager.h"
#include "stackframe.h"
......@@ -507,7 +508,8 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
break;
}
if (role == Qt::ToolTipRole)
return data->toToolTip();
return theDebuggerBoolSetting(UseToolTipsInLocalsView)
? data->toToolTip() : QVariant();
return QVariant();
}
......
......@@ -53,12 +53,22 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxUseToolTips">
<widget class="QCheckBox" name="checkBoxUseToolTipsInMainEditor">
<property name="toolTip">
<string>Checking this will enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default.</string>
</property>
<property name="text">
<string>Use tooltips while debugging</string>
<string>Use tooltips in locals view while debugging</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxUseToolTipsInLocalsView">
<property name="toolTip">
<string>Checking this will enable tooltips for in the locals view during debugging.</string>
</property>
<property name="text">
<string>Use tooltips in main editor while debugging</string>
</property>
</widget>
</item>
......
......@@ -254,10 +254,17 @@ DebuggerSettings *DebuggerSettings::instance()
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
item->setText(tr("Use tooltips when debugging"));
item->setText(tr("Use tooltips in main editor when debugging"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(UseToolTips, item);
instance->insertItem(UseToolTipsInMainEditor, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView"));
item->setText(tr("Use tooltips in locals view when debugging"));
item->setCheckable(true);
item->setDefaultValue(false);
instance->insertItem(UseToolTipsInLocalsView, item);
item = new SavedAction(instance);
item->setSettingsKey(debugModeGroup, QLatin1String("ListSourceFiles"));
......
......@@ -100,7 +100,8 @@ enum DebuggerActionCode
WatchExpressionInWindow,
RemoveWatchExpression,
WatchPoint,
UseToolTips,
UseToolTipsInMainEditor,
UseToolTipsInLocalsView,
AssignValue,
AssignType,
......
......@@ -292,8 +292,10 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
m_ui.checkBoxUseMessageBoxForSignals);
m_group.insert(theDebuggerAction(SkipKnownFrames),
m_ui.checkBoxSkipKnownFrames);
m_group.insert(theDebuggerAction(UseToolTips),
m_ui.checkBoxUseToolTips);
m_group.insert(theDebuggerAction(UseToolTipsInMainEditor),
m_ui.checkBoxUseToolTipsInMainEditor);
m_group.insert(theDebuggerAction(UseToolTipsInLocalsView),
m_ui.checkBoxUseToolTipsInLocalsView);
m_group.insert(theDebuggerAction(EnableReverseDebugging),
m_ui.checkBoxEnableReverseDebugging);
m_group.insert(theDebuggerAction(MaximalStackDepth),
......@@ -1036,7 +1038,8 @@ void DebuggerPlugin::requestMark(TextEditor::ITextEditor *editor, int lineNumber
void DebuggerPlugin::showToolTip(TextEditor::ITextEditor *editor,
const QPoint &point, int pos)
{
if (!theDebuggerBoolSetting(UseToolTips) || m_manager->status() == DebuggerProcessNotReady)
if (!theDebuggerBoolSetting(UseToolTipsInMainEditor)
|| m_manager->status() == DebuggerProcessNotReady)
return;
m_manager->setToolTipExpression(point, editor, pos);
......
......@@ -702,7 +702,8 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
}
case Qt::ToolTipRole:
return data.toToolTip();
return theDebuggerBoolSetting(UseToolTipsInLocalsView)
? data.toToolTip() : QVariant();
case Qt::ForegroundRole: {
static const QVariant red(QColor(200, 0, 0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment