Commit a2c68a53 authored by hjk's avatar hjk
Browse files

debugger: remove reference to dumper build step from debugger UI

parent b3f620e5
......@@ -64,6 +64,7 @@ DebuggerSettings::~DebuggerSettings()
void DebuggerSettings::insertItem(int code, SavedAction *item)
{
QTC_ASSERT(!m_items.contains(code), return);
m_items[code] = item;
}
......@@ -240,11 +241,6 @@ DebuggerSettings *theDebuggerSettings()
item->setText(QObject::tr("Use tooltips when debugging"));
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(ListSourceFiles, item);
item->setText(QObject::tr("List source files"));
item->setCheckable(true);
//
// Settings
......@@ -272,30 +268,30 @@ DebuggerSettings *theDebuggerSettings()
item->setSettingsKey("DebugMode", "UseToolTips");
item = new SavedAction(instance);
instance->insertItem(UseDumpers, item);
item->setSettingsKey("DebugMode", "UseCustomDumpers");
item->setText(QObject::tr("Use custom dumpers"));
instance->insertItem(DisplayRawData, item);
item->setSettingsKey("DebugMode", "DisplayRawData");
item->setText(QObject::tr("Display raw data"));
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(BuildDumpersOnTheFly, item);
instance->insertItem(UseDefaultDumperLocation, item);
item->setDefaultValue(true);
item->setSettingsKey("DebugMode", "BuildDumpersOnTheFly");
item->setSettingsKey("DebugMode", "UseDefaultDumperLocation");
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(UseQtDumpers, item);
item->setSettingsKey("DebugMode", "UseQtDumpers");
instance->insertItem(UseCustomDumperLocation, item);
item->setSettingsKey("DebugMode", "CustomDumperLocation");
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(UsePrebuiltDumpers, item);
item->setSettingsKey("DebugMode", "UsePrebuiltDumpers");
instance->insertItem(DisplayRawData, item);
item->setSettingsKey("DebugMode", "DisplayRawData");
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(PrebuiltDumpersLocation, item);
item->setSettingsKey("DebugMode", "PrebuiltDumpersLocation");
instance->insertItem(CustomDumperLocation, item);
item->setSettingsKey("DebugMode", "CustomDumperLocation");
item = new SavedAction(instance);
instance->insertItem(TerminalApplication, item);
......@@ -305,6 +301,8 @@ DebuggerSettings *theDebuggerSettings()
item = new SavedAction(instance);
instance->insertItem(ListSourceFiles, item);
item->setSettingsKey("DebugMode", "ListSourceFiles");
item->setText(QObject::tr("List source files"));
item->setCheckable(true);
item = new SavedAction(instance);
instance->insertItem(SkipKnownFrames, item);
......
......@@ -87,11 +87,10 @@ enum DebuggerActionCode
CollapseItem,
RecheckDumpers,
UsePrebuiltDumpers,
UseQtDumpers,
PrebuiltDumpersLocation,
BuildDumpersOnTheFly,
UseDumpers,
DisplayRawData,
UseCustomDumperLocation,
UseDefaultDumperLocation,
CustomDumperLocation,
DebugDumpers,
// Source List
......
......@@ -362,26 +362,24 @@ QWidget *DumperOptionPage::createPage(QWidget *parent)
m_ui.dumperLocationChooser->setInitialBrowsePathBackup(
Core::ICore::instance()->resourcePath() + "../../lib");
connect(m_ui.radioButtonUsePrebuiltDumpers, SIGNAL(toggled(bool)),
connect(m_ui.radioButtonUseCustomDumperLocation, SIGNAL(toggled(bool)),
m_ui.dumperLocationChooser, SLOT(setEnabled(bool)));
m_group.clear();
m_group.insert(theDebuggerAction(UseQtDumpers),
m_ui.radioButtonUseQtDumpers);
m_group.insert(theDebuggerAction(UsePrebuiltDumpers),
m_ui.radioButtonUsePrebuiltDumpers);
m_group.insert(theDebuggerAction(BuildDumpersOnTheFly),
m_ui.radioButtonBuildDumpersOnTheFly);
m_group.insert(theDebuggerAction(PrebuiltDumpersLocation),
m_group.insert(theDebuggerAction(DisplayRawData),
m_ui.radioButtonDisplayRawData);
m_group.insert(theDebuggerAction(UseCustomDumperLocation),
m_ui.radioButtonUseCustomDumperLocation);
m_group.insert(theDebuggerAction(UseDefaultDumperLocation),
m_ui.radioButtonUseDefaultDumperLocation);
m_group.insert(theDebuggerAction(CustomDumperLocation),
m_ui.dumperLocationChooser);
m_group.insert(theDebuggerAction(UseDumpers),
m_ui.checkBoxUseDumpers);
m_group.insert(theDebuggerAction(DebugDumpers),
m_ui.checkBoxDebugDumpers);
m_ui.dumperLocationChooser->
setEnabled(theDebuggerAction(UsePrebuiltDumpers)->value().toBool());
setEnabled(theDebuggerAction(UseCustomDumperLocation)->value().toBool());
#ifndef QT_DEBUG
#if 0
......
......@@ -20,27 +20,20 @@
<string>Location of data dumper helper library</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radioButtonUseQtDumpers">
<property name="text">
<string>Use Qt dumpers</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButtonBuildDumpersOnTheFly">
<widget class="QRadioButton" name="radioButtonUseDefaultDumperLocation">
<property name="toolTip">
<string>This is the slowest but safest option.</string>
<string>This will load a dumper library</string>
</property>
<property name="text">
<string>Build and load data dumpers on-the-fly</string>
<string>Use dumpers from default location</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButtonUsePrebuiltDumpers">
<widget class="QRadioButton" name="radioButtonUseCustomDumperLocation">
<property name="text">
<string>Load pre-built data dumpers</string>
<string>Use dumpers from custom location</string>
</property>
</widget>
</item>
......@@ -74,6 +67,16 @@
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButtonDisplayRawData">
<property name="toolTip">
<string>This will disable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</string>
</property>
<property name="text">
<string>Do not use data dumpers</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......@@ -100,13 +103,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBoxUseDumpers">
<property name="text">
<string>Use data dumpers</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -210,8 +210,8 @@ void GdbEngine::initializeConnections()
q, SLOT(showApplicationOutput(QString)),
Qt::QueuedConnection);
connect(theDebuggerAction(UseDumpers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setUseDumpers(QVariant)));
connect(theDebuggerAction(DisplayRawData), SIGNAL(valueChanged(QVariant)),
this, SLOT(setDisplayRawData(QVariant)));
connect(theDebuggerAction(DebugDumpers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setDebugDumpers(QVariant)));
connect(theDebuggerAction(RecheckDumpers), SIGNAL(triggered()),
......@@ -1077,7 +1077,7 @@ void GdbEngine::handleAqcuiredInferior()
#if defined(Q_OS_MAC)
sendCommand("info pid", GdbInfoProc, QVariant(), NeedsStop);
#endif
if (theDebuggerBoolSetting(UseDumpers))
if (theDebuggerBoolSetting(ListSourceFiles))
reloadSourceFiles();
tryLoadCustomDumpers();
......@@ -2849,7 +2849,7 @@ static void setWatchDataSAddress(WatchData &data, const GdbMi &mi)
data.saddr = mi.data();
}
void GdbEngine::setUseDumpers(const QVariant &on)
void GdbEngine::setDisplayRawData(const QVariant &on)
{
qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
// FIXME: a bit too harsh, but otherwise the treeview sometimes look funny
......@@ -2860,7 +2860,7 @@ void GdbEngine::setUseDumpers(const QVariant &on)
bool GdbEngine::isCustomValueDumperAvailable(const QString &type) const
{
if (!theDebuggerBoolSetting(UseDumpers))
if (theDebuggerBoolSetting(DisplayRawData))
return false;
if (q->startMode() == AttachCore) {
......@@ -3989,17 +3989,12 @@ void GdbEngine::assignValueInDebugger(const QString &expression, const QString &
QString GdbEngine::dumperLibraryName() const
{
if (theDebuggerAction(UsePrebuiltDumpers)->value().toBool())
return theDebuggerAction(PrebuiltDumpersLocation)->value().toString();
if (theDebuggerAction(UseQtDumpers)->value().toBool())
if (theDebuggerAction(UseCustomDumperLocation)->value().toBool())
return theDebuggerAction(CustomDumperLocation)->value().toString();
if (theDebuggerAction(UseDefaultDumperLocation)->value().toBool())
return q->m_dumperLib;
#if defined(Q_OS_WIN)
return q->m_buildDir + "/qtc-gdbmacros/debug/gdbmacros.dll";
#elif defined(Q_OS_MAC)
return q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.dylib";
#else // generic UNIX
return q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.so";
#endif
QTC_ASSERT(false, /**/);
return QString();
}
void GdbEngine::tryLoadCustomDumpers()
......
......@@ -131,7 +131,7 @@ private:
void loadAllSymbols();
Q_SLOT void setDebugDumpers(const QVariant &on);
Q_SLOT void setUseDumpers(const QVariant &on);
Q_SLOT void setDisplayRawData(const QVariant &on);
//
// Own stuff
......
......@@ -177,7 +177,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
menu.addSeparator();
menu.addAction(theDebuggerAction(RecheckDumpers));
menu.addAction(theDebuggerAction(UseDumpers));
menu.addAction(theDebuggerAction(DisplayRawData));
menu.addSeparator();
menu.addAction(theDebuggerAction(SettingsDialog));
......
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