forked from qt-creator/qt-creator
debugger: make threadnames feature optional
This commit is contained in:
@@ -204,6 +204,13 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
|
|||||||
item->setValue(true);
|
item->setValue(true);
|
||||||
insertItem(UseCodeModel, item);
|
insertItem(UseCodeModel, item);
|
||||||
|
|
||||||
|
item = new SavedAction(this);
|
||||||
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowThreadNames"));
|
||||||
|
item->setCheckable(true);
|
||||||
|
item->setDefaultValue(false);
|
||||||
|
item->setValue(false);
|
||||||
|
insertItem(ShowThreadNames, item);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Breakpoints
|
// Breakpoints
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ enum DebuggerActionCode
|
|||||||
CustomDebuggingHelperLocation,
|
CustomDebuggingHelperLocation,
|
||||||
|
|
||||||
UseCodeModel,
|
UseCodeModel,
|
||||||
|
ShowThreadNames,
|
||||||
|
|
||||||
UseToolTipsInMainEditor,
|
UseToolTipsInMainEditor,
|
||||||
UseToolTipsInLocalsView,
|
UseToolTipsInLocalsView,
|
||||||
|
|||||||
@@ -694,6 +694,9 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
|
|||||||
|
|
||||||
m_group.insert(debuggerCore()->action(UseCodeModel),
|
m_group.insert(debuggerCore()->action(UseCodeModel),
|
||||||
m_ui.checkBoxUseCodeModel);
|
m_ui.checkBoxUseCodeModel);
|
||||||
|
m_group.insert(debuggerCore()->action(ShowThreadNames),
|
||||||
|
m_ui.checkBoxShowThreadNames);
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_DEBUG
|
#ifndef QT_DEBUG
|
||||||
#if 0
|
#if 0
|
||||||
@@ -710,7 +713,8 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
|
|||||||
<< ' ' << m_ui.debuggingHelperGroupBox->title()
|
<< ' ' << m_ui.debuggingHelperGroupBox->title()
|
||||||
<< ' ' << m_ui.customLocationGroupBox->title()
|
<< ' ' << m_ui.customLocationGroupBox->title()
|
||||||
<< ' ' << m_ui.dumperLocationLabel->text()
|
<< ' ' << m_ui.dumperLocationLabel->text()
|
||||||
<< ' ' << m_ui.checkBoxUseCodeModel->text();
|
<< ' ' << m_ui.checkBoxUseCodeModel->text()
|
||||||
|
<< ' ' << m_ui.checkBoxShowThreadNames->text();
|
||||||
m_searchKeywords.remove(QLatin1Char('&'));
|
m_searchKeywords.remove(QLatin1Char('&'));
|
||||||
}
|
}
|
||||||
return w;
|
return w;
|
||||||
|
|||||||
@@ -70,6 +70,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBoxShowThreadNames">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Displays names of QThread based threads.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Display thread names</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -3011,7 +3011,7 @@ void GdbEngine::handleThreadInfo(const GdbResponse &response)
|
|||||||
threadsHandler()->setThreads(threads);
|
threadsHandler()->setThreads(threads);
|
||||||
threadsHandler()->setCurrentThreadId(currentThreadId);
|
threadsHandler()->setCurrentThreadId(currentThreadId);
|
||||||
updateViews(); // Adjust Threads combobox.
|
updateViews(); // Adjust Threads combobox.
|
||||||
if (m_hasInferiorThreadList) {
|
if (m_hasInferiorThreadList && debuggerCore()->boolSetting(ShowThreadNames)) {
|
||||||
postCommand("threadnames " +
|
postCommand("threadnames " +
|
||||||
debuggerCore()->action(MaximalStackDepth)->value().toByteArray(),
|
debuggerCore()->action(MaximalStackDepth)->value().toByteArray(),
|
||||||
Discardable, CB(handleThreadNames), id);
|
Discardable, CB(handleThreadNames), id);
|
||||||
|
|||||||
Reference in New Issue
Block a user