2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2009-03-18 10:04:02 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
|
#include "debuggeractions.h"
|
2012-04-11 09:16:06 +02:00
|
|
|
|
2010-03-25 16:54:23 +01:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
|
#include "registerpostmortemaction.h"
|
|
|
|
|
#endif
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
#include <coreplugin/icore.h>
|
2010-03-18 10:59:06 +01:00
|
|
|
#include <utils/savedaction.h>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QDebug>
|
|
|
|
|
#include <QSettings>
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-10-05 11:06:05 +02:00
|
|
|
using namespace Utils;
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2010-04-08 16:55:25 +02:00
|
|
|
static const char debugModeSettingsGroupC[] = "DebugMode";
|
2013-05-22 00:49:51 -07:00
|
|
|
static const char cdbSettingsGroupC[] = "CDB2";
|
2011-03-04 16:21:57 +01:00
|
|
|
static const char sourcePathMappingArrayNameC[] = "SourcePathMappings";
|
|
|
|
|
static const char sourcePathMappingSourceKeyC[] = "Source";
|
|
|
|
|
static const char sourcePathMappingTargetKeyC[] = "Target";
|
2010-04-08 16:55:25 +02:00
|
|
|
|
2009-03-26 18:02:43 +01:00
|
|
|
namespace Debugger {
|
|
|
|
|
namespace Internal {
|
2009-03-26 15:56:16 +01:00
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
void GlobalDebuggerOptions::toSettings() const
|
2011-03-04 16:21:57 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *s = Core::ICore::settings();
|
2011-03-04 16:21:57 +01:00
|
|
|
s->beginWriteArray(QLatin1String(sourcePathMappingArrayNameC));
|
|
|
|
|
if (!sourcePathMap.isEmpty()) {
|
|
|
|
|
const QString sourcePathMappingSourceKey = QLatin1String(sourcePathMappingSourceKeyC);
|
|
|
|
|
const QString sourcePathMappingTargetKey = QLatin1String(sourcePathMappingTargetKeyC);
|
|
|
|
|
int i = 0;
|
2014-09-11 22:22:51 +03:00
|
|
|
for (auto it = sourcePathMap.constBegin(), cend = sourcePathMap.constEnd();
|
|
|
|
|
it != cend;
|
|
|
|
|
++it, ++i) {
|
2011-03-04 16:21:57 +01:00
|
|
|
s->setArrayIndex(i);
|
|
|
|
|
s->setValue(sourcePathMappingSourceKey, it.key());
|
|
|
|
|
s->setValue(sourcePathMappingTargetKey, it.value());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
s->endArray();
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
void GlobalDebuggerOptions::fromSettings()
|
2011-03-04 16:21:57 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *s = Core::ICore::settings();
|
2011-03-04 16:21:57 +01:00
|
|
|
sourcePathMap.clear();
|
|
|
|
|
if (const int count = s->beginReadArray(QLatin1String(sourcePathMappingArrayNameC))) {
|
|
|
|
|
const QString sourcePathMappingSourceKey = QLatin1String(sourcePathMappingSourceKeyC);
|
|
|
|
|
const QString sourcePathMappingTargetKey = QLatin1String(sourcePathMappingTargetKeyC);
|
|
|
|
|
for (int i = 0; i < count; ++i) {
|
|
|
|
|
s->setArrayIndex(i);
|
|
|
|
|
sourcePathMap.insert(s->value(sourcePathMappingSourceKey).toString(),
|
|
|
|
|
s->value(sourcePathMappingTargetKey).toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
s->endArray();
|
|
|
|
|
}
|
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2009-03-19 15:44:26 +01:00
|
|
|
// DebuggerSettings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2013-09-04 18:39:43 +02:00
|
|
|
DebuggerSettings::DebuggerSettings()
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2010-04-08 16:55:25 +02:00
|
|
|
const QString debugModeGroup = QLatin1String(debugModeSettingsGroupC);
|
2013-05-22 00:49:51 -07:00
|
|
|
const QString cdbSettingsGroup = QLatin1String(cdbSettingsGroupC);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2009-03-26 17:27:44 +01:00
|
|
|
SavedAction *item = 0;
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
insertItem(SettingsDialog, item);
|
2014-02-20 14:52:10 +01:00
|
|
|
item->setText(tr("Configure Debugger..."));
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// View
|
|
|
|
|
//
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2014-06-03 11:34:52 +02:00
|
|
|
item->setText(tr("Always Adjust View Column Widths to Contents"));
|
2011-03-16 18:48:14 +01:00
|
|
|
item->setCheckable(true);
|
2014-06-02 09:58:20 +02:00
|
|
|
item->setValue(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2011-03-16 18:48:14 +01:00
|
|
|
item->setSettingsKey(debugModeGroup,
|
2014-06-03 11:34:52 +02:00
|
|
|
QLatin1String("AlwaysAdjustColumnWidths"));
|
|
|
|
|
insertItem(AlwaysAdjustColumnWidths, item);
|
2011-03-16 18:48:14 +01:00
|
|
|
|
2014-06-03 11:34:52 +02:00
|
|
|
// Needed by QML Inspector
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Use Alternating Row Colors"));
|
2009-05-05 10:14:35 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAlternatingRowColours"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseAlternatingRowColors, item);
|
2009-05-05 10:14:35 +02:00
|
|
|
|
2014-05-02 12:08:44 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setText(tr("Keep Editor Stationary When Stepping"));
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("StationaryEditorWhileStepping"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(StationaryEditorWhileStepping, item);
|
|
|
|
|
|
2011-04-01 12:01:14 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setText(tr("Debugger Font Size Follows Main Editor"));
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("FontSizeFollowsEditor"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(FontSizeFollowsEditor, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show a Message Box When Receiving a Signal"));
|
2009-08-13 14:33:02 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseMessageBoxForSignals"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseMessageBoxForSignals, item);
|
2009-08-13 14:33:02 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Log Time Stamps"));
|
2009-08-13 14:33:02 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("LogTimeStamps"));
|
2009-06-19 12:04:21 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(LogTimeStamps, item);
|
2009-06-19 12:04:21 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-01-15 12:01:26 +01:00
|
|
|
item->setText(tr("Verbose Log"));
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("VerboseLog"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(VerboseLog, item);
|
2010-01-15 12:01:26 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Operate by Instruction"));
|
2009-08-14 13:04:05 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-07-30 22:16:59 +02:00
|
|
|
item->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_singleinstructionmode.png")));
|
2009-09-29 11:13:19 +02:00
|
|
|
item->setToolTip(tr("This switches the debugger to instruction-wise "
|
|
|
|
|
"operation mode. In this mode, stepping operates on single "
|
|
|
|
|
"instructions and the source location view also shows the "
|
|
|
|
|
"disassembled instructions."));
|
2010-06-11 15:33:11 +02:00
|
|
|
item->setIconVisibleInMenu(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(OperateByInstruction, item);
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Dereference Pointers Automatically"));
|
2009-10-06 10:54:08 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2010-09-17 09:18:37 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers"));
|
2010-09-29 12:48:00 +02:00
|
|
|
item->setToolTip(tr("This switches the Locals&&Watchers view to "
|
2010-08-19 14:04:15 +02:00
|
|
|
"automatically dereference pointers. This saves a level in the "
|
2009-10-06 10:54:08 +02:00
|
|
|
"tree view, but also loses data for the now-missing intermediate "
|
|
|
|
|
"level."));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AutoDerefPointers, item);
|
2009-10-06 10:54:08 +02:00
|
|
|
|
2013-05-22 00:49:51 -07:00
|
|
|
//
|
|
|
|
|
// Cdb Options
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("AdditionalArguments"));
|
|
|
|
|
insertItem(CdbAdditionalArguments, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setDefaultValue(QStringList());
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("SymbolPaths"));
|
|
|
|
|
insertItem(CdbSymbolPaths, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setDefaultValue(QStringList());
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("SourcePaths"));
|
|
|
|
|
insertItem(CdbSourcePaths, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setDefaultValue(QStringList());
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakEvent"));
|
|
|
|
|
insertItem(CdbBreakEvents, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakOnCrtDbgReport"));
|
|
|
|
|
insertItem(CdbBreakOnCrtDbgReport, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("CDB_Console"));
|
|
|
|
|
insertItem(UseCdbConsole, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("BreakpointCorrection"));
|
|
|
|
|
insertItem(CdbBreakPointCorrection, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setSettingsKey(cdbSettingsGroup, QLatin1String("IgnoreFirstChanceAccessViolation"));
|
|
|
|
|
insertItem(IgnoreFirstChanceAccessViolation, item);
|
|
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// Locals & Watchers
|
|
|
|
|
//
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show \"std::\" Namespace in Types"));
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ShowStdNamespace, item);
|
2009-11-25 08:35:02 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Show Qt's Namespace in Types"));
|
2009-11-25 08:35:02 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ShowQtNamespace, item);
|
2009-11-25 08:35:02 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-09-23 11:15:56 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SortStructMembers"));
|
|
|
|
|
item->setText(tr("Sort Members of Classes and Structs Alphabetically"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SortStructMembers, item);
|
2010-09-23 11:15:56 +02:00
|
|
|
|
2009-03-19 12:24:04 +01:00
|
|
|
//
|
2009-04-07 16:39:17 +02:00
|
|
|
// DebuggingHelper
|
2009-05-05 10:14:35 +02:00
|
|
|
//
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseDebuggingHelper"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Use Debugging Helpers"));
|
2009-03-27 13:04:23 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
2009-06-30 14:31:33 +02:00
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseDebuggingHelpers, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-10-16 16:26:28 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Use Code Model"));
|
|
|
|
|
item->setToolTip(tr("Selecting this causes the C++ Code Model being asked "
|
|
|
|
|
"for variable scope information. This might result in slightly faster "
|
|
|
|
|
"debugger operation but may fail for optimized code."));
|
2009-10-16 16:26:28 +02:00
|
|
|
item->setCheckable(true);
|
2009-11-09 16:25:40 +01:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseCodeModel, item);
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2010-12-20 17:39:51 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowThreadNames"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
insertItem(ShowThreadNames, item);
|
|
|
|
|
|
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
|
|
|
//
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Synchronize Breakpoints"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SynchronizeBreakpoints, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-09-21 17:02:41 +02:00
|
|
|
item->setText(tr("Adjust Breakpoint Locations"));
|
|
|
|
|
item->setToolTip(tr("Not all source code lines generate "
|
|
|
|
|
"executable code. Putting a breakpoint on such a line acts as "
|
|
|
|
|
"if the breakpoint was set on the next line that generated code. "
|
|
|
|
|
"Selecting 'Adjust Breakpoint Locations' shifts the red "
|
|
|
|
|
"breakpoint markers in such cases to the location of the true "
|
|
|
|
|
"breakpoint."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AdjustBreakpointLocations"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AdjustBreakpointLocations, item);
|
2010-09-21 17:02:41 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-11 17:29:10 +01:00
|
|
|
item->setText(tr("Break on \"throw\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnThrow"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(BreakOnThrow, item);
|
2010-02-11 17:29:10 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-11 17:29:10 +01:00
|
|
|
item->setText(tr("Break on \"catch\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnCatch"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(BreakOnCatch, item);
|
2010-02-11 17:29:10 +01:00
|
|
|
|
2011-05-30 16:01:50 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setText(tr("Break on \"qWarning\""));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnWarning"));
|
|
|
|
|
insertItem(BreakOnWarning, item);
|
|
|
|
|
|
2011-07-13 16:52:28 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setText(tr("Break on \"qFatal\""));
|
|
|
|
|
item->setCheckable(true);
|
2011-08-05 14:04:01 +02:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2011-07-13 16:52:28 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnFatal"));
|
|
|
|
|
insertItem(BreakOnFatal, item);
|
|
|
|
|
|
2012-01-15 22:21:59 +02:00
|
|
|
item = new SavedAction(this);
|
2012-05-08 18:01:28 +03:00
|
|
|
item->setText(tr("Break on \"abort\""));
|
2012-01-15 22:21:59 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
2012-05-08 18:01:28 +03:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnAbort"));
|
|
|
|
|
insertItem(BreakOnAbort, item);
|
2012-01-15 22:21:59 +02:00
|
|
|
|
2009-03-19 09:32:09 +01:00
|
|
|
//
|
|
|
|
|
// Settings
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-12-21 11:52:21 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("LoadGdbInit"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2010-12-21 11:52:21 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
insertItem(LoadGdbInit, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2013-03-21 17:32:34 +01:00
|
|
|
item = new SavedAction(this);
|
2014-06-25 17:13:29 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("LoadGdbDumpers1"));
|
2013-03-21 17:32:34 +01:00
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
insertItem(LoadGdbDumpers, item);
|
|
|
|
|
|
2011-09-22 09:30:50 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AutoEnrichParameters"));
|
|
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
item->setCheckable(true);
|
2012-05-10 16:22:06 +02:00
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
2011-09-22 09:30:50 +02:00
|
|
|
insertItem(AutoEnrichParameters, item);
|
|
|
|
|
|
2011-11-29 12:20:06 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseDynamicType"));
|
2012-02-08 23:15:55 +01:00
|
|
|
item->setText(tr("Use Dynamic Object Type for Display"));
|
2011-11-29 12:20:06 +01:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
item->setValue(true);
|
|
|
|
|
insertItem(UseDynamicType, item);
|
|
|
|
|
|
2011-02-03 16:49:28 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("TargetAsync"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
item->setValue(false);
|
|
|
|
|
insertItem(TargetAsync, item);
|
|
|
|
|
|
2012-06-01 17:21:39 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("WarnOnReleaseBuilds"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(WarnOnReleaseBuilds, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2011-11-01 17:56:32 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("GdbStartupCommands"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(QString());
|
2011-11-01 17:56:32 +01:00
|
|
|
insertItem(GdbStartupCommands, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2012-10-23 10:51:32 +02:00
|
|
|
item = new SavedAction(this);
|
2013-06-03 14:27:53 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("GdbCustomDumperCommands"));
|
|
|
|
|
item->setDefaultValue(QString());
|
2014-06-23 16:33:19 +02:00
|
|
|
insertItem(ExtraDumperCommands, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ExtraDumperFile"));
|
|
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
insertItem(ExtraDumperFile, item);
|
2013-06-03 14:27:53 +02:00
|
|
|
|
2014-08-04 14:02:49 +02:00
|
|
|
item = new SavedAction(this);
|
2012-10-23 10:51:32 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("GdbPostAttachCommands"));
|
|
|
|
|
item->setDefaultValue(QString());
|
|
|
|
|
insertItem(GdbPostAttachCommands, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-10-08 17:44:11 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("CloseBuffersOnExit"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(CloseBuffersOnExit, item);
|
2010-10-08 17:44:11 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-10-08 17:44:11 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SwitchModeOnExit"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SwitchModeOnExit, item);
|
2010-10-08 17:44:11 +02:00
|
|
|
|
2012-06-10 01:20:30 +04:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("BreakpointsFullPath"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(BreakpointsFullPathByDefault, item);
|
|
|
|
|
|
2012-03-13 13:50:05 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("RaiseOnInterrupt"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(RaiseOnInterrupt, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AutoQuit"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Automatically Quit Debugger"));
|
2009-03-24 15:01:35 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AutoQuit, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2012-04-17 10:00:40 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AttemptQuickStart"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(AttemptQuickStart, item);
|
|
|
|
|
|
2012-11-06 15:21:42 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("MultiInferior"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(MultiInferior, item);
|
|
|
|
|
|
2012-11-09 19:11:19 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("IntelFlavor"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(IntelFlavor, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2013-03-21 18:00:18 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("IdentifyDebugInfoPackages"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(IdentifyDebugInfoPackages, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setText(tr("Use tooltips in main editor when debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("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."));
|
2009-03-23 12:28:02 +01:00
|
|
|
item->setCheckable(true);
|
2013-11-01 11:42:30 +01:00
|
|
|
item->setDefaultValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInMainEditor, item);
|
2009-09-23 16:11:25 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView"));
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Use Tooltips in Locals View when Debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will enable tooltips in the locals "
|
|
|
|
|
"view during debugging."));
|
2009-09-23 16:11:25 +02:00
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInLocalsView, item);
|
2009-03-23 12:28:02 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Use Tooltips in Breakpoints View when Debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will enable tooltips in the breakpoints "
|
|
|
|
|
"view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseToolTipsInBreakpointsView, item);
|
2009-10-01 11:22:44 +02:00
|
|
|
|
2013-09-24 18:00:48 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
|
|
|
|
|
item->setText(tr("Use Tooltips in Stack View when Debugging"));
|
|
|
|
|
item->setToolTip(tr("Checking this will enable tooltips in the stack "
|
|
|
|
|
"view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(UseToolTipsInStackView, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView"));
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Show Address Data in Breakpoints View when Debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will show a column with address "
|
|
|
|
|
"information in the breakpoint view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseAddressInBreakpointsView, item);
|
2009-10-01 11:22:44 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView"));
|
2012-05-14 12:29:27 +02:00
|
|
|
item->setText(tr("Show Address Data in Stack View when Debugging"));
|
2009-10-01 11:22:44 +02:00
|
|
|
item->setToolTip(tr("Checking this will show a column with address "
|
|
|
|
|
"information in the stack view during debugging."));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(UseAddressInStackView, item);
|
|
|
|
|
item = new SavedAction(this);
|
2009-10-01 11:22:44 +02:00
|
|
|
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ListSourceFiles"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("List Source Files"));
|
2009-03-27 12:25:58 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ListSourceFiles, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Skip Known Frames"));
|
2009-03-27 13:04:23 +01:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SkipKnownFrames, item);
|
2009-05-25 17:19:42 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-05-25 17:19:42 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("EnableReverseDebugging"));
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Enable Reverse Debugging"));
|
2009-05-25 17:19:42 +02:00
|
|
|
item->setCheckable(true);
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(EnableReverseDebugging, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-03-25 16:54:23 +01:00
|
|
|
#ifdef Q_OS_WIN
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new RegisterPostMortemAction(this);
|
2010-03-25 16:54:23 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("RegisterForPostMortem"));
|
|
|
|
|
item->setText(tr("Register For Post-Mortem Debugging"));
|
|
|
|
|
item->setCheckable(true);
|
|
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(RegisterForPostMortem, item);
|
2010-03-25 16:54:23 +01:00
|
|
|
#endif
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("AllPluginBreakpoints"));
|
2009-04-14 14:24:45 +02:00
|
|
|
item->setDefaultValue(true);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(AllPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpoints"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SelectedPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("NoPluginBreakpoints"));
|
2009-06-26 13:17:44 +02:00
|
|
|
item->setDefaultValue(false);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(NoPluginBreakpoints, item);
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpointsPattern"));
|
2009-08-19 12:32:23 +02:00
|
|
|
item->setDefaultValue(QLatin1String(".*"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(SelectedPluginBreakpointsPattern, item);
|
2009-04-02 15:06:24 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-04-09 16:51:13 +02:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStackDepth"));
|
2009-04-02 15:06:24 +02:00
|
|
|
item->setDefaultValue(20);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(MaximalStackDepth, item);
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2014-05-16 00:18:17 +02:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit"));
|
2014-07-14 14:46:34 +02:00
|
|
|
item->setToolTip(tr("The maximum length of string entries in the "
|
2014-05-16 00:18:17 +02:00
|
|
|
"Locals and Expressions pane. Longer than that are cut off "
|
|
|
|
|
"and displayed with an ellipsis attached."));
|
|
|
|
|
item->setDefaultValue(100);
|
|
|
|
|
insertItem(DisplayStringLimit, item);
|
|
|
|
|
|
2012-11-11 00:32:33 +01:00
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength"));
|
2014-07-14 14:46:34 +02:00
|
|
|
item->setToolTip(tr("The maximum length for strings in separated windows. "
|
2014-05-16 00:18:17 +02:00
|
|
|
"Longer strings are cut off and displayed with an ellipsis attached."));
|
2012-11-11 00:32:33 +01:00
|
|
|
item->setDefaultValue(10000);
|
|
|
|
|
insertItem(MaximalStringLength, item);
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-02-16 11:28:41 +01:00
|
|
|
item->setText(tr("Reload Full Stack"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(ExpandStack, item);
|
2009-04-06 17:27:15 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2010-03-29 18:44:02 +02:00
|
|
|
item->setText(tr("Create Full Backtrace"));
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(CreateFullBacktrace, item);
|
2010-03-29 18:44:02 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
item = new SavedAction(this);
|
2009-12-09 15:23:49 +01:00
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
|
|
|
|
item->setDefaultValue(20);
|
2010-11-10 16:33:11 +01:00
|
|
|
insertItem(GdbWatchdogTimeout, item);
|
2012-04-18 14:20:54 +02:00
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// QML Tools
|
|
|
|
|
//
|
|
|
|
|
item = new SavedAction(this);
|
|
|
|
|
item->setSettingsKey(debugModeGroup, QLatin1String("ShowQmlObjectTree"));
|
|
|
|
|
item->setDefaultValue(true);
|
|
|
|
|
insertItem(ShowQmlObjectTree, item);
|
|
|
|
|
|
2012-08-22 11:58:33 +02:00
|
|
|
const QString qmlInspectorGroup = QLatin1String("QML.Inspector");
|
2012-04-18 14:20:54 +02:00
|
|
|
item = new SavedAction(this);
|
2012-08-22 11:58:33 +02:00
|
|
|
item->setSettingsKey(qmlInspectorGroup, QLatin1String("QmlInspector.ShowAppOnTop"));
|
2012-04-18 14:20:54 +02:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(ShowAppOnTop, item);
|
|
|
|
|
|
|
|
|
|
item = new SavedAction(this);
|
2012-08-22 11:58:33 +02:00
|
|
|
item->setSettingsKey(qmlInspectorGroup, QLatin1String("QmlInspector.FromQml"));
|
2012-04-18 14:20:54 +02:00
|
|
|
item->setDefaultValue(false);
|
|
|
|
|
insertItem(QmlUpdateOnSave, item);
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
2009-12-09 15:23:49 +01:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
DebuggerSettings::~DebuggerSettings()
|
|
|
|
|
{
|
|
|
|
|
qDeleteAll(m_items);
|
2009-03-18 10:04:02 +01:00
|
|
|
}
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::insertItem(int code, SavedAction *item)
|
|
|
|
|
{
|
|
|
|
|
QTC_ASSERT(!m_items.contains(code),
|
|
|
|
|
qDebug() << code << item->toString(); return);
|
|
|
|
|
QTC_ASSERT(item->settingsKey().isEmpty() || item->defaultValue().isValid(),
|
|
|
|
|
qDebug() << "NO DEFAULT VALUE FOR " << item->settingsKey());
|
|
|
|
|
m_items[code] = item;
|
|
|
|
|
}
|
2009-04-09 16:51:13 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::readSettings()
|
|
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *settings = Core::ICore::settings();
|
2010-11-10 16:33:11 +01:00
|
|
|
foreach (SavedAction *item, m_items)
|
2013-09-04 18:39:43 +02:00
|
|
|
item->readSettings(settings);
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
2009-04-08 12:11:30 +02:00
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
void DebuggerSettings::writeSettings() const
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2013-09-04 18:39:43 +02:00
|
|
|
QSettings *settings = Core::ICore::settings();
|
2010-11-10 16:33:11 +01:00
|
|
|
foreach (SavedAction *item, m_items)
|
2013-09-04 18:39:43 +02:00
|
|
|
item->writeSettings(settings);
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
SavedAction *DebuggerSettings::item(int code) const
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2010-11-10 16:33:11 +01:00
|
|
|
QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
|
|
|
|
|
return m_items.value(code, 0);
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2010-11-10 16:33:11 +01:00
|
|
|
QString DebuggerSettings::dump() const
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2010-11-10 16:33:11 +01:00
|
|
|
QString out;
|
|
|
|
|
QTextStream ts(&out);
|
|
|
|
|
ts << "Debugger settings: ";
|
|
|
|
|
foreach (SavedAction *item, m_items) {
|
|
|
|
|
QString key = item->settingsKey();
|
|
|
|
|
if (!key.isEmpty()) {
|
|
|
|
|
const QString current = item->value().toString();
|
|
|
|
|
const QString default_ = item->defaultValue().toString();
|
2011-03-04 16:21:57 +01:00
|
|
|
ts << '\n' << key << ": " << current
|
2012-08-22 11:58:33 +02:00
|
|
|
<< " (default: " << default_ << ')';
|
2010-11-10 16:33:11 +01:00
|
|
|
if (current != default_)
|
|
|
|
|
ts << " ***";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return out;
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|