Added setting for breakpoint full path by default

Change-Id: Ibb068bdecf73c5bae0b31b08506209f05b811965
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Vladislav Navrocky
2012-06-10 01:20:30 +04:00
committed by hjk
parent a1834bba8e
commit d76c5ca205
5 changed files with 50 additions and 28 deletions

View File

@@ -70,6 +70,8 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
m_ui.checkBoxCloseBuffersOnExit); m_ui.checkBoxCloseBuffersOnExit);
m_group->insert(dc->action(SwitchModeOnExit), m_group->insert(dc->action(SwitchModeOnExit),
m_ui.checkBoxSwitchModeOnExit); m_ui.checkBoxSwitchModeOnExit);
m_group->insert(dc->action(BreakpointsFullPathByDefault),
m_ui.checkBoxBreakpointsFullPath);
m_group->insert(dc->action(RaiseOnInterrupt), m_group->insert(dc->action(RaiseOnInterrupt),
m_ui.checkBoxBringToForegroundOnInterrrupt); m_ui.checkBoxBringToForegroundOnInterrrupt);
m_group->insert(dc->action(ShowQmlObjectTree), m_group->insert(dc->action(ShowQmlObjectTree),
@@ -116,6 +118,7 @@ QString CommonOptionsPageWidget::searchKeyWords() const
<< sep << m_ui.checkBoxFontSizeFollowsEditor->text() << sep << m_ui.checkBoxFontSizeFollowsEditor->text()
<< sep << m_ui.checkBoxUseToolTipsInMainEditor->text() << sep << m_ui.checkBoxUseToolTipsInMainEditor->text()
<< sep << m_ui.checkBoxListSourceFiles->text() << sep << m_ui.checkBoxListSourceFiles->text()
<< sep << m_ui.checkBoxBreakpointsFullPath->text()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
<< sep << m_ui.checkBoxRegisterForPostMortem->text() << sep << m_ui.checkBoxRegisterForPostMortem->text()
#endif #endif

View File

@@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>691</width> <width>765</width>
<height>341</height> <height>341</height>
</rect> </rect>
</property> </property>
@@ -65,7 +65,44 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBoxBringToForegroundOnInterrrupt">
<property name="text">
<string>Bring Qt Creator to foreground when application interrupts</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxShowQmlObjectTree">
<property name="toolTip">
<string>Show QML object tree in Locals &amp; Expressions when connected and not stepping.</string>
</property>
<property name="text">
<string>Show QML object tree</string>
</property>
</widget>
</item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QCheckBox" name="checkBoxBreakpointsFullPath">
<property name="toolTip">
<string>Enable a full file path in breakpoints by default also for the GDB</string>
</property>
<property name="text">
<string>Breakpoints full path by default</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBoxRegisterForPostMortem">
<property name="toolTip">
<string>Register Qt Creator for debugging crashed applications.</string>
</property>
<property name="text">
<string>Use Qt Creator for post-mortem debugging</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="labelMaximalStackDepth"> <widget class="QLabel" name="labelMaximalStackDepth">
@@ -120,33 +157,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBoxBringToForegroundOnInterrrupt">
<property name="text">
<string>Bring Qt Creator to foreground when application interrupts</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBoxRegisterForPostMortem">
<property name="toolTip">
<string>Register Qt Creator for debugging crashed applications.</string>
</property>
<property name="text">
<string>Use Qt Creator for post-mortem debugging</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxShowQmlObjectTree">
<property name="toolTip">
<string>Show QML object tree in Locals &amp; Expressions when connected and not stepping.</string>
</property>
<property name="text">
<string>Show QML object tree</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@@ -409,6 +409,12 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
item->setDefaultValue(false); item->setDefaultValue(false);
insertItem(SwitchModeOnExit, item); insertItem(SwitchModeOnExit, item);
item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("BreakpointsFullPath"));
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(BreakpointsFullPathByDefault, item);
item = new SavedAction(this); item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("RaiseOnInterrupt")); item->setSettingsKey(debugModeGroup, QLatin1String("RaiseOnInterrupt"));
item->setCheckable(true); item->setCheckable(true);

View File

@@ -99,6 +99,7 @@ enum DebuggerActionCode
OperateByInstruction, OperateByInstruction,
CloseBuffersOnExit, CloseBuffersOnExit,
SwitchModeOnExit, SwitchModeOnExit,
BreakpointsFullPathByDefault,
RaiseOnInterrupt, RaiseOnInterrupt,
UseDebuggingHelpers, UseDebuggingHelpers,

View File

@@ -1907,6 +1907,8 @@ void DebuggerPluginPrivate::toggleBreakpointByFileAndLine(const QString &fileNam
handler->removeBreakpoint(id); handler->removeBreakpoint(id);
} else { } else {
BreakpointParameters data(BreakpointByFileAndLine); BreakpointParameters data(BreakpointByFileAndLine);
if (debuggerCore()->boolSetting(BreakpointsFullPathByDefault))
data.pathUsage = BreakpointUseFullPath;
data.tracepoint = !tracePointMessage.isEmpty(); data.tracepoint = !tracePointMessage.isEmpty();
data.message = tracePointMessage; data.message = tracePointMessage;
data.fileName = fileName; data.fileName = fileName;