forked from qt-creator/qt-creator
Debugger: De-Q_OBJECT-ify settings pages
Change-Id: I17fe42e8b4ea2801414cca10893f82c12885c788 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -84,7 +84,7 @@ static inline int indexOfEvent(const QString &abbrev)
|
||||
// events with parameters (like 'out:Needle').
|
||||
class CdbBreakEventWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbBreakEventWidget)
|
||||
|
||||
public:
|
||||
explicit CdbBreakEventWidget(QWidget *parent = nullptr);
|
||||
@@ -183,7 +183,7 @@ QStringList CdbBreakEventWidget::breakEvents() const
|
||||
|
||||
class CdbOptionsPageWidget : public Core::IOptionsPageWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbOptionsPageWidget)
|
||||
|
||||
public:
|
||||
CdbOptionsPageWidget();
|
||||
@@ -248,7 +248,7 @@ void CdbOptionsPageWidget::finish()
|
||||
CdbOptionsPage::CdbOptionsPage()
|
||||
{
|
||||
setId("F.Debugger.Cda");
|
||||
setDisplayName(tr("CDB"));
|
||||
setDisplayName(CdbOptionsPageWidget::tr("CDB"));
|
||||
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new CdbOptionsPageWidget; });
|
||||
}
|
||||
@@ -258,7 +258,7 @@ CdbOptionsPage::CdbOptionsPage()
|
||||
|
||||
class CdbPathsPageWidget : public Core::IOptionsPageWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CdbPathsPageWidget)
|
||||
|
||||
public:
|
||||
CdbPathsPageWidget();
|
||||
@@ -295,12 +295,10 @@ CdbPathsPageWidget::CdbPathsPageWidget()
|
||||
CdbPathsPage::CdbPathsPage()
|
||||
{
|
||||
setId("F.Debugger.Cdb");
|
||||
setDisplayName(tr("CDB Paths"));
|
||||
setDisplayName(CdbPathsPageWidget::tr("CDB Paths"));
|
||||
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new CdbPathsPageWidget; });
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#include "cdboptionspage.moc"
|
||||
|
||||
@@ -27,31 +27,19 @@
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCheckBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils { class PathListEditor; }
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class CdbSymbolPathListEditor;
|
||||
class CdbPathsPageWidget;
|
||||
|
||||
class CdbOptionsPage : public Core::IOptionsPage
|
||||
class CdbOptionsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CdbOptionsPage();
|
||||
|
||||
static const char *crtDbgReport;
|
||||
};
|
||||
|
||||
class CdbPathsPage : public Core::IOptionsPage
|
||||
class CdbPathsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CdbPathsPage();
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggersourcepathmappingwidget.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/variablechooser.h>
|
||||
@@ -64,6 +65,8 @@ namespace Internal {
|
||||
|
||||
class CommonOptionsPageWidget : public Core::IOptionsPageWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CommonOptionsPageWidget)
|
||||
|
||||
public:
|
||||
explicit CommonOptionsPageWidget()
|
||||
{
|
||||
@@ -253,14 +256,15 @@ CommonOptionsPage::CommonOptionsPage()
|
||||
|
||||
QString CommonOptionsPage::msgSetBreakpointAtFunction(const char *function)
|
||||
{
|
||||
return tr("Stop when %1() is called").arg(QLatin1String(function));
|
||||
return CommonOptionsPageWidget::tr("Stop when %1() is called").arg(QLatin1String(function));
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *function,
|
||||
const QString &hint)
|
||||
{
|
||||
QString result = "<html><head/><body>";
|
||||
result += tr("Always adds a breakpoint on the <i>%1()</i> function.").arg(QLatin1String(function));
|
||||
result += CommonOptionsPageWidget::tr("Always adds a breakpoint on the <i>%1()</i> function.")
|
||||
.arg(QLatin1String(function));
|
||||
if (!hint.isEmpty()) {
|
||||
result += "<br>";
|
||||
result += hint;
|
||||
|
||||
@@ -25,17 +25,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "debuggersourcepathmappingwidget.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class CommonOptionsPage : public Core::IOptionsPage
|
||||
class CommonOptionsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CommonOptionsPage();
|
||||
|
||||
@@ -44,10 +40,8 @@ public:
|
||||
const QString &hint = {});
|
||||
};
|
||||
|
||||
class LocalsAndExpressionsOptionsPage : public Core::IOptionsPage
|
||||
class LocalsAndExpressionsOptionsPage final : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LocalsAndExpressionsOptionsPage();
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QFormLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPointer>
|
||||
@@ -61,7 +62,8 @@ namespace Internal {
|
||||
|
||||
class GdbOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::GdbOptionsPage)
|
||||
|
||||
public:
|
||||
GdbOptionsPage();
|
||||
};
|
||||
@@ -279,7 +281,6 @@ GdbOptionsPage::GdbOptionsPage()
|
||||
|
||||
class GdbOptionsPageWidget2 : public IOptionsPageWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GdbOptionsPageWidget2();
|
||||
|
||||
@@ -391,5 +392,3 @@ void addGdbOptionPages(QList<IOptionsPage *> *opts)
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#include "gdboptionspage.moc"
|
||||
|
||||
Reference in New Issue
Block a user