forked from qt-creator/qt-creator
Debugger: Move std:: Qt namespace actions to options
Rename 'Debugging Helper' options pane to 'Locals & Expressions', and move the two actions for showing/hiding std:: and Qt namespaces in type name to the page. Change-Id: If7ec66016b330a4c579597bcc81f1fa5a3eff815 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -224,42 +224,43 @@ bool CommonOptionsPage::matches(const QString &s) const
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
QString DebuggingHelperOptionPage::id() const
|
||||
QString LocalsAndExpressionsOptionsPage::id() const
|
||||
{
|
||||
return _("Z.DebuggingHelper");
|
||||
return _("Z.LocalsAndExpressions");
|
||||
}
|
||||
|
||||
QString DebuggingHelperOptionPage::displayName() const
|
||||
QString LocalsAndExpressionsOptionsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", "Debugging Helper");
|
||||
//: '&&' will appear as one (one is marking keyboard shortcut)
|
||||
return QCoreApplication::translate("Debugger", "Locals && Expressions");
|
||||
}
|
||||
|
||||
QString DebuggingHelperOptionPage::category() const
|
||||
QString LocalsAndExpressionsOptionsPage::category() const
|
||||
{
|
||||
return _(DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString DebuggingHelperOptionPage::displayCategory() const
|
||||
QString LocalsAndExpressionsOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon DebuggingHelperOptionPage::categoryIcon() const
|
||||
QIcon LocalsAndExpressionsOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
void DebuggingHelperOptionPage::apply()
|
||||
void LocalsAndExpressionsOptionsPage::apply()
|
||||
{
|
||||
m_group.apply(ICore::settings());
|
||||
}
|
||||
|
||||
void DebuggingHelperOptionPage::finish()
|
||||
void LocalsAndExpressionsOptionsPage::finish()
|
||||
{
|
||||
m_group.finish();
|
||||
}
|
||||
|
||||
QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
|
||||
QWidget *LocalsAndExpressionsOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
m_ui.setupUi(w);
|
||||
@@ -276,6 +277,8 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
|
||||
|
||||
m_group.insert(dc->action(ShowThreadNames),
|
||||
m_ui.checkBoxShowThreadNames);
|
||||
m_group.insert(dc->action(ShowStdNamespace), m_ui.checkBoxShowStdNamespace);
|
||||
m_group.insert(dc->action(ShowQtNamespace), m_ui.checkBoxShowQtNamespace);
|
||||
|
||||
|
||||
#ifndef QT_DEBUG
|
||||
@@ -292,13 +295,16 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
|
||||
QTextStream(&m_searchKeywords)
|
||||
<< ' ' << m_ui.debuggingHelperGroupBox->title()
|
||||
<< ' ' << m_ui.checkBoxUseCodeModel->text()
|
||||
<< ' ' << m_ui.checkBoxShowThreadNames->text();
|
||||
<< ' ' << m_ui.checkBoxShowThreadNames->text()
|
||||
<< ' ' << m_ui.checkBoxShowStdNamespace->text()
|
||||
<< ' ' << m_ui.checkBoxShowQtNamespace->text();
|
||||
|
||||
m_searchKeywords.remove(QLatin1Char('&'));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
bool DebuggingHelperOptionPage::matches(const QString &s) const
|
||||
bool LocalsAndExpressionsOptionsPage::matches(const QString &s) const
|
||||
{
|
||||
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define DEBUGGER_COMMONOPTIONSPAGE_H
|
||||
|
||||
#include "ui_commonoptionspage.h"
|
||||
#include "ui_dumperoptionpage.h"
|
||||
#include "ui_localsandexpressionsoptionspage.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <utils/savedaction.h>
|
||||
@@ -96,14 +96,14 @@ private:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DebuggingHelperOptionPage
|
||||
// LocalsAndExpressionsOptionsPage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
class DebuggingHelperOptionPage : public Core::IOptionsPage
|
||||
class LocalsAndExpressionsOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
DebuggingHelperOptionPage() {}
|
||||
LocalsAndExpressionsOptionsPage() {}
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
|
||||
@@ -131,7 +131,7 @@ FORMS += attachexternaldialog.ui \
|
||||
attachcoredialog.ui \
|
||||
breakcondition.ui \
|
||||
breakpoint.ui \
|
||||
dumperoptionpage.ui \
|
||||
localsandexpressionsoptionspage.ui \
|
||||
commonoptionspage.ui \
|
||||
startexternaldialog.ui \
|
||||
startremotedialog.ui \
|
||||
|
||||
@@ -75,7 +75,7 @@ QtcPlugin {
|
||||
"disassembleragent.h",
|
||||
"disassemblerlines.cpp",
|
||||
"disassemblerlines.h",
|
||||
"dumperoptionpage.ui",
|
||||
"localsandexpressionsoptionspage.ui",
|
||||
"localsandwatcherswindow.cpp",
|
||||
"localsandwatcherswindow.h",
|
||||
"logwindow.cpp",
|
||||
|
||||
@@ -3411,7 +3411,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
|
||||
foreach (IOptionsPage *op, engineOptionPages)
|
||||
m_plugin->addAutoReleasedObject(op);
|
||||
m_plugin->addAutoReleasedObject(new DebuggingHelperOptionPage);
|
||||
m_plugin->addAutoReleasedObject(new LocalsAndExpressionsOptionsPage);
|
||||
|
||||
connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)),
|
||||
SLOT(onModeChanged(Core::IMode*)));
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="debuggingHelperGroupBox">
|
||||
<property name="title">
|
||||
<string>Use Debugging Helper</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
@@ -25,31 +34,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>3</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="debuggingHelperGroupBox">
|
||||
<property name="title">
|
||||
<string>Use Debugging Helper</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxUseCodeModel">
|
||||
<property name="toolTip">
|
||||
@@ -73,6 +57,26 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxShowStdNamespace">
|
||||
<property name="toolTip">
|
||||
<string>Show 'std::' prefix for types from the standard library.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show "std::" namespace for types</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxShowQtNamespace">
|
||||
<property name="toolTip">
|
||||
<string>Show Qt namespace prefix for Qt types. This is only relevant if Qt was configured with '-qtnamespace'.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Qt's namespace for types</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -868,8 +868,6 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(debuggerCore()->action(UseDebuggingHelpers));
|
||||
menu.addAction(debuggerCore()->action(UseToolTipsInLocalsView));
|
||||
menu.addAction(debuggerCore()->action(AutoDerefPointers));
|
||||
menu.addAction(debuggerCore()->action(ShowStdNamespace));
|
||||
menu.addAction(debuggerCore()->action(ShowQtNamespace));
|
||||
menu.addAction(debuggerCore()->action(SortStructMembers));
|
||||
menu.addAction(debuggerCore()->action(UseDynamicType));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user