2009-03-18 10:04:02 +01:00
|
|
|
/**************************************************************************
|
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
|
|
|
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
|
**
|
|
|
|
** Contact: Qt Software Information (qt-info@nokia.com)
|
|
|
|
**
|
|
|
|
** Commercial Usage
|
|
|
|
**
|
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
** a written agreement between you and Nokia.
|
|
|
|
**
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
**
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
**
|
|
|
|
** If you are unsure which license is appropriate for your use, please
|
|
|
|
** contact the sales department at qt-sales@nokia.com.
|
|
|
|
**
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#include "debuggeractions.h"
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
#include <utils/pathchooser.h>
|
|
|
|
|
|
|
|
#include <QtCore/QSettings>
|
2009-03-18 10:04:02 +01:00
|
|
|
#include <QtGui/QAction>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <QtGui/QAbstractButton>
|
|
|
|
#include <QtGui/QRadioButton>
|
|
|
|
#include <QtGui/QCheckBox>
|
|
|
|
#include <QtGui/QLineEdit>
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
namespace Debugger {
|
|
|
|
namespace Internal {
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// QtcSettingsItem
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
QtcSettingsItem::QtcSettingsItem(QObject *parent)
|
|
|
|
: QObject(parent)
|
|
|
|
{
|
|
|
|
m_action = new QAction(this);
|
|
|
|
connect(m_action, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool)));
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariant QtcSettingsItem::value() const
|
|
|
|
{
|
|
|
|
return m_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setValue(const QVariant &value, bool doemit)
|
|
|
|
{
|
|
|
|
if (value != m_value) {
|
|
|
|
m_value = value;
|
|
|
|
if (m_action->isCheckable())
|
|
|
|
m_action->setChecked(m_value.toBool());
|
|
|
|
if (doemit) {
|
|
|
|
emit valueChanged(m_value);
|
|
|
|
emit boolValueChanged(m_value.toBool());
|
|
|
|
emit stringValueChanged(m_value.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QVariant QtcSettingsItem::defaultValue() const
|
|
|
|
{
|
|
|
|
return m_defaultValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setDefaultValue(const QVariant &value)
|
|
|
|
{
|
|
|
|
m_defaultValue = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString QtcSettingsItem::settingsKey() const
|
|
|
|
{
|
|
|
|
return m_settingsKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setSettingsKey(const QString &key)
|
|
|
|
{
|
|
|
|
m_settingsKey = key;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setSettingsKey(const QString &group, const QString &key)
|
|
|
|
{
|
|
|
|
m_settingsKey = key;
|
|
|
|
m_settingsGroup = group;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString QtcSettingsItem::settingsGroup() const
|
|
|
|
{
|
|
|
|
return m_settingsGroup;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setSettingsGroup(const QString &group)
|
|
|
|
{
|
|
|
|
m_settingsGroup = group;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString QtcSettingsItem::text() const
|
|
|
|
{
|
|
|
|
return m_action->text();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setText(const QString &value)
|
|
|
|
{
|
2009-03-19 12:24:04 +01:00
|
|
|
m_action->setText(value);
|
2009-03-19 09:32:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QString QtcSettingsItem::textPattern() const
|
|
|
|
{
|
|
|
|
return m_textPattern;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::setTextPattern(const QString &value)
|
|
|
|
{
|
|
|
|
m_textPattern = value;
|
|
|
|
}
|
|
|
|
|
2009-03-19 12:24:04 +01:00
|
|
|
QAction *QtcSettingsItem::updatedAction(const QString &text0)
|
|
|
|
{
|
|
|
|
QString text = text0;
|
|
|
|
bool enabled = true;
|
|
|
|
if (!m_textPattern.isEmpty()) {
|
|
|
|
if (text.isEmpty()) {
|
|
|
|
text = m_textPattern;
|
|
|
|
text.remove("\"%1\"");
|
|
|
|
text.remove("%1");
|
|
|
|
enabled = false;
|
|
|
|
} else {
|
|
|
|
text = m_textPattern.arg(text0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_action->setEnabled(enabled);
|
2009-03-19 12:53:58 +01:00
|
|
|
m_action->setData(text0);
|
2009-03-19 12:24:04 +01:00
|
|
|
m_action->setText(text);
|
|
|
|
return m_action;
|
|
|
|
}
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
void QtcSettingsItem::readSettings(QSettings *settings)
|
|
|
|
{
|
|
|
|
if (m_settingsGroup.isEmpty() || m_settingsKey.isEmpty())
|
|
|
|
return;
|
|
|
|
settings->beginGroup(m_settingsGroup);
|
|
|
|
setValue(settings->value(m_settingsKey, m_defaultValue), false);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "READING: " << m_settingsKey << " -> " << m_value;
|
2009-03-19 09:32:09 +01:00
|
|
|
settings->endGroup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::writeSettings(QSettings *settings)
|
|
|
|
{
|
|
|
|
if (m_settingsGroup.isEmpty() || m_settingsKey.isEmpty())
|
|
|
|
return;
|
|
|
|
settings->beginGroup(m_settingsGroup);
|
|
|
|
settings->setValue(m_settingsKey, m_value);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "WRITING: " << m_settingsKey << " -> " << m_value;
|
2009-03-19 09:32:09 +01:00
|
|
|
settings->endGroup();
|
|
|
|
}
|
|
|
|
|
2009-03-19 12:24:04 +01:00
|
|
|
QAction *QtcSettingsItem::action()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
return m_action;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::connectWidget(QWidget *widget, ApplyMode applyMode)
|
|
|
|
{
|
|
|
|
using namespace Core::Utils;
|
|
|
|
//qDebug() << "CONNECT WIDGET " << widget << " TO " << m_settingsKey;
|
|
|
|
m_applyModes[widget] = applyMode;
|
|
|
|
m_deferedValue = m_value;
|
|
|
|
if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget)) {
|
|
|
|
if (button->isCheckable()) {
|
|
|
|
button->setChecked(m_value.toBool());
|
|
|
|
connect(button, SIGNAL(clicked(bool)),
|
|
|
|
this, SLOT(checkableButtonClicked(bool)));
|
|
|
|
} else {
|
|
|
|
connect(button, SIGNAL(clicked()),
|
|
|
|
this, SLOT(uncheckableButtonClicked()));
|
|
|
|
}
|
|
|
|
} else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) {
|
|
|
|
lineEdit->setText(m_value.toString());
|
|
|
|
//qDebug() << "SETTING TEXT" << lineEdit->text();
|
|
|
|
connect(lineEdit, SIGNAL(editingFinished()),
|
|
|
|
this, SLOT(lineEditEditingFinished()));
|
|
|
|
} else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(widget)) {
|
|
|
|
pathChooser->setPath(m_value.toString());
|
|
|
|
connect(pathChooser, SIGNAL(editingFinished()),
|
|
|
|
this, SLOT(pathChooserEditingFinished()));
|
|
|
|
connect(pathChooser, SIGNAL(browsingFinished()),
|
|
|
|
this, SLOT(pathChooserEditingFinished()));
|
|
|
|
} else {
|
|
|
|
qDebug() << "CANNOT CONNECT WIDGET " << widget;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
void QtcSettingsItem::apply(QSettings *s)
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
setValue(m_deferedValue);
|
2009-03-19 10:54:27 +01:00
|
|
|
if (s)
|
|
|
|
writeSettings(s);
|
2009-03-19 09:32:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::uncheckableButtonClicked()
|
|
|
|
{
|
|
|
|
QAbstractButton *button = qobject_cast<QAbstractButton *>(sender());
|
|
|
|
QTC_ASSERT(button, return);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "UNCHECKABLE BUTTON: " << sender();
|
2009-03-19 09:32:09 +01:00
|
|
|
m_action->trigger();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::checkableButtonClicked(bool)
|
|
|
|
{
|
|
|
|
QAbstractButton *button = qobject_cast<QAbstractButton *>(sender());
|
|
|
|
QTC_ASSERT(button, return);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "CHECKABLE BUTTON: " << sender();
|
2009-03-19 09:32:09 +01:00
|
|
|
if (m_applyModes[sender()] == DeferedApply)
|
|
|
|
m_deferedValue = button->isChecked();
|
|
|
|
else
|
|
|
|
setValue(button->isChecked());
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::lineEditEditingFinished()
|
|
|
|
{
|
|
|
|
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(sender());
|
|
|
|
QTC_ASSERT(lineEdit, return);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "LINEEDIT: " << sender() << lineEdit->text();
|
2009-03-19 09:32:09 +01:00
|
|
|
if (m_applyModes[sender()] == DeferedApply)
|
|
|
|
m_deferedValue = lineEdit->text();
|
|
|
|
else
|
|
|
|
setValue(lineEdit->text());
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::pathChooserEditingFinished()
|
|
|
|
{
|
|
|
|
using namespace Core::Utils;
|
|
|
|
PathChooser *pathChooser = qobject_cast<PathChooser *>(sender());
|
|
|
|
QTC_ASSERT(pathChooser, return);
|
2009-03-19 11:43:59 +01:00
|
|
|
//qDebug() << "PATHCHOOSER: " << sender() << pathChooser->path();
|
2009-03-19 09:32:09 +01:00
|
|
|
if (m_applyModes[sender()] == DeferedApply)
|
|
|
|
m_deferedValue = pathChooser->path();
|
|
|
|
else
|
|
|
|
setValue(pathChooser->path());
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtcSettingsItem::actionTriggered(bool on)
|
|
|
|
{
|
|
|
|
Q_UNUSED(on);
|
|
|
|
if (QAction *action = qobject_cast<QAction *>(sender())) {
|
|
|
|
if (action->isCheckable())
|
|
|
|
setValue(action->isChecked());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2009-03-19 10:54:27 +01:00
|
|
|
// QtcSettingsPool
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QtcSettingsPool::QtcSettingsPool(QObject *parent)
|
2009-03-19 09:32:09 +01:00
|
|
|
: QObject(parent)
|
|
|
|
{}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QtcSettingsPool::~QtcSettingsPool()
|
2009-03-18 10:04:02 +01:00
|
|
|
{
|
2009-03-19 09:32:09 +01:00
|
|
|
qDeleteAll(m_items);
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
void QtcSettingsPool::insertItem(int code, QtcSettingsItem *item)
|
2009-03-18 10:04:02 +01:00
|
|
|
{
|
2009-03-19 09:32:09 +01:00
|
|
|
m_items[code] = item;
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
void QtcSettingsPool::readSettings(QSettings *settings)
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
foreach (QtcSettingsItem *item, m_items)
|
|
|
|
item->readSettings(settings);
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
void QtcSettingsPool::writeSettings(QSettings *settings)
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
foreach (QtcSettingsItem *item, m_items)
|
|
|
|
item->writeSettings(settings);
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QtcSettingsItem *QtcSettingsPool::item(int code)
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
QTC_ASSERT(m_items.value(code, 0), return 0);
|
|
|
|
return m_items.value(code, 0);
|
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QString QtcSettingsPool::dump()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
|
|
|
QString out;
|
|
|
|
QTextStream ts(&out);
|
|
|
|
ts << "Debugger settings: ";
|
|
|
|
foreach (QtcSettingsItem *item, m_items)
|
|
|
|
ts << "\n" << item->value().toString();
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Debugger specific stuff
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
QString dump();
|
|
|
|
|
|
|
|
QString m_gdbCmd;
|
|
|
|
QString m_gdbEnv;
|
|
|
|
bool m_autoRun;
|
|
|
|
bool m_autoQuit;
|
|
|
|
|
|
|
|
bool m_useDumpers;
|
|
|
|
bool m_skipKnownFrames;
|
|
|
|
bool m_debugDumpers;
|
|
|
|
bool m_useToolTips;
|
|
|
|
bool m_listSourceFiles;
|
|
|
|
|
|
|
|
QString m_scriptFile;
|
|
|
|
|
|
|
|
bool m_pluginAllBreakpoints;
|
|
|
|
bool m_pluginSelectedBreakpoints;
|
|
|
|
bool m_pluginNoBreakpoints;
|
|
|
|
QString m_pluginSelectedBreakpointsPattern;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QtcSettingsPool *theDebuggerSettings()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2009-03-19 10:54:27 +01:00
|
|
|
static QtcSettingsPool *instance = 0;
|
2009-03-19 09:32:09 +01:00
|
|
|
if (instance)
|
|
|
|
return instance;
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
instance = new QtcSettingsPool;
|
2009-03-19 09:32:09 +01:00
|
|
|
|
|
|
|
QtcSettingsItem *item = 0;
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(AdjustColumnWidths, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Adjust column widths to contents"));
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(AlwaysAdjustColumnWidths, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Always adjust column widths to contents"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(WatchExpression, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setTextPattern(QObject::tr("Watch expression \"%1\""));
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(RemoveWatchExpression, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setTextPattern(QObject::tr("Remove watch expression \"%1\""));
|
|
|
|
|
2009-03-19 12:24:04 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(WatchExpressionInWindow, item);
|
|
|
|
item->setTextPattern(QObject::tr("Watch expression \"%1\" in separate window"));
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dumpers
|
|
|
|
//
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SettingsDialog, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Debugger properties..."));
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(DebugDumpers, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Debug custom dumpers"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(RecheckDumpers, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Recheck custom dumper availability"));
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
//
|
2009-03-19 09:32:09 +01:00
|
|
|
// Breakpoints
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SynchronizeBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Syncronize breakpoints"));
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
//
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(AutoQuit, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Automatically quit debugger"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SkipKnownFrames, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Skip known frames"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(UseToolTips, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("Use tooltips when debugging"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(ListSourceFiles, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setText(QObject::tr("List source files"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Settings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(GdbLocation, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "Location");
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(GdbEnvironment, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "Environment");
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(GdbScriptFile, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "ScriptFile");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(GdbAutoQuit, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "AutoQuit");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(GdbAutoRun, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "AutoRun");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(UseToolTips, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "UseToolTips");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(UseDumpers, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "UseCustomDumpers");
|
|
|
|
item->setText(QObject::tr("Use custom dumpers"));
|
|
|
|
item->action()->setCheckable(true);
|
|
|
|
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(ListSourceFiles, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "ListSourceFiles");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SkipKnownFrames, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "SkipKnownFrames");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(DebugDumpers, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "DebugDumpers");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(AllPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "AllPluginBreakpoints");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SelectedPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "SelectedPluginBreakpoints");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(NoPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "NoPluginBreakpoints");
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
item = new QtcSettingsItem(instance);
|
|
|
|
instance->insertItem(SelectedPluginBreakpointsPattern, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
item->setSettingsKey("DebugMode", "SelectedPluginBreakpointsPattern");
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
return instance;
|
2009-03-18 10:04:02 +01:00
|
|
|
}
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
QtcSettingsItem *theDebuggerSetting(int code)
|
|
|
|
{
|
|
|
|
return theDebuggerSettings()->item(code);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool theDebuggerBoolSetting(int code)
|
|
|
|
{
|
|
|
|
return theDebuggerSettings()->item(code)->value().toBool();
|
|
|
|
}
|
|
|
|
|
|
|
|
QString theDebuggerStringSetting(int code)
|
|
|
|
{
|
|
|
|
return theDebuggerSettings()->item(code)->value().toString();
|
|
|
|
}
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
} // namespace Internal
|
|
|
|
} // namespace Debugger
|
|
|
|
|