forked from qt-creator/qt-creator
De-Q_OBJECT-ify some more settings pages
Change-Id: I4700c9749c12c3fbe3adc9dc702283c8ce545ab2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Internal {
|
|||||||
IosSettingsPage::IosSettingsPage()
|
IosSettingsPage::IosSettingsPage()
|
||||||
{
|
{
|
||||||
setId(Constants::IOS_SETTINGS_ID);
|
setId(Constants::IOS_SETTINGS_ID);
|
||||||
setDisplayName(tr("iOS"));
|
setDisplayName(IosSettingsWidget::tr("iOS"));
|
||||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setWidgetCreator([] { return new IosSettingsWidget; });
|
setWidgetCreator([] { return new IosSettingsWidget; });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ namespace Internal {
|
|||||||
|
|
||||||
class IosSettingsPage : public Core::IOptionsPage
|
class IosSettingsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IosSettingsPage();
|
IosSettingsPage();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace Ui { class IosSettingsWidget; }
|
|||||||
|
|
||||||
class IosSettingsWidget : public Core::IOptionsPageWidget
|
class IosSettingsWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosSettingsWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IosSettingsWidget();
|
IosSettingsWidget();
|
||||||
|
|||||||
@@ -31,17 +31,16 @@
|
|||||||
|
|
||||||
#include <texteditor/texteditorconstants.h>
|
#include <texteditor/texteditorconstants.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
namespace Macros {
|
||||||
#include <QWidget>
|
namespace Internal {
|
||||||
|
|
||||||
using namespace Macros;
|
|
||||||
using namespace Macros::Internal;
|
|
||||||
|
|
||||||
|
|
||||||
MacroOptionsPage::MacroOptionsPage()
|
MacroOptionsPage::MacroOptionsPage()
|
||||||
{
|
{
|
||||||
setId(Constants::M_OPTIONS_PAGE);
|
setId(Constants::M_OPTIONS_PAGE);
|
||||||
setDisplayName(QCoreApplication::translate("Macros", Constants::M_OPTIONS_TR_PAGE));
|
setDisplayName(MacroOptionsWidget::tr("Macros"));
|
||||||
setCategory(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
|
setCategory(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
|
||||||
setWidgetCreator([] { return new MacroOptionsWidget; });
|
setWidgetCreator([] { return new MacroOptionsWidget; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // Internal
|
||||||
|
} // Macros
|
||||||
|
|||||||
@@ -30,10 +30,8 @@
|
|||||||
namespace Macros {
|
namespace Macros {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class MacroOptionsPage : public Core::IOptionsPage
|
class MacroOptionsPage final : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MacroOptionsPage();
|
MacroOptionsPage();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ static bool cMakeAvailable()
|
|||||||
|
|
||||||
class McuSupportOptionsWidget : public Core::IOptionsPageWidget
|
class McuSupportOptionsWidget : public Core::IOptionsPageWidget
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(McuSupport::Internal::McuSupportOptionsWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
McuSupportOptionsWidget();
|
McuSupportOptionsWidget();
|
||||||
|
|
||||||
@@ -81,7 +83,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget()
|
|||||||
auto mainLayout = new QVBoxLayout(this);
|
auto mainLayout = new QVBoxLayout(this);
|
||||||
|
|
||||||
auto mcuTargetChooserlayout = new QHBoxLayout;
|
auto mcuTargetChooserlayout = new QHBoxLayout;
|
||||||
auto mcuTargetChooserLabel = new QLabel(McuSupportOptionsPage::tr("Target:"));
|
auto mcuTargetChooserLabel = new QLabel(tr("Target:"));
|
||||||
mcuTargetChooserlayout->addWidget(mcuTargetChooserLabel);
|
mcuTargetChooserlayout->addWidget(mcuTargetChooserLabel);
|
||||||
m_mcuTargetComboBox = new QComboBox;
|
m_mcuTargetComboBox = new QComboBox;
|
||||||
mcuTargetChooserLabel->setBuddy(m_mcuTargetComboBox);
|
mcuTargetChooserLabel->setBuddy(m_mcuTargetComboBox);
|
||||||
@@ -93,7 +95,7 @@ McuSupportOptionsWidget::McuSupportOptionsWidget()
|
|||||||
mcuTargetChooserlayout->addWidget(m_mcuTargetComboBox);
|
mcuTargetChooserlayout->addWidget(m_mcuTargetComboBox);
|
||||||
mainLayout->addLayout(mcuTargetChooserlayout);
|
mainLayout->addLayout(mcuTargetChooserlayout);
|
||||||
|
|
||||||
auto m_packagesGroupBox = new QGroupBox(McuSupportOptionsPage::tr("Packages"));
|
auto m_packagesGroupBox = new QGroupBox(tr("Packages"));
|
||||||
mainLayout->addWidget(m_packagesGroupBox);
|
mainLayout->addWidget(m_packagesGroupBox);
|
||||||
m_packagesLayout = new QFormLayout;
|
m_packagesLayout = new QFormLayout;
|
||||||
m_packagesGroupBox->setLayout(m_packagesLayout);
|
m_packagesGroupBox->setLayout(m_packagesLayout);
|
||||||
@@ -199,7 +201,7 @@ void McuSupportOptionsWidget::apply()
|
|||||||
McuSupportOptionsPage::McuSupportOptionsPage()
|
McuSupportOptionsPage::McuSupportOptionsPage()
|
||||||
{
|
{
|
||||||
setId(Core::Id(Constants::SETTINGS_ID));
|
setId(Core::Id(Constants::SETTINGS_ID));
|
||||||
setDisplayName(tr("MCU"));
|
setDisplayName(McuSupportOptionsWidget::tr("MCU"));
|
||||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||||
setWidgetCreator([] { return new McuSupportOptionsWidget; });
|
setWidgetCreator([] { return new McuSupportOptionsWidget; });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ namespace Internal {
|
|||||||
|
|
||||||
class McuSupportOptionsPage : public Core::IOptionsPage
|
class McuSupportOptionsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
McuSupportOptionsPage();
|
McuSupportOptionsPage();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user