Commit be48a3fa authored by hjk's avatar hjk Committed by Christian Kandeler
Browse files

Use Core::Id for IOptionsPage::m_id



Change-Id: Id9d6cf28966eeb65775cf1f16f57773af5fb6bca
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 5e7cf3f0
......@@ -322,7 +322,7 @@ CdbOptionsPage::CdbOptionsPage() :
CdbOptionsPage::m_instance = this;
m_options->fromSettings(Core::ICore::settings());
setId(CdbOptionsPage::settingsId());
setId("F.Cda");
setDisplayName(tr("CDB"));
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger",
......@@ -330,11 +330,6 @@ CdbOptionsPage::CdbOptionsPage() :
setCategoryIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
}
QString CdbOptionsPage::settingsId()
{
return QLatin1String("F.Cda");
}
CdbOptionsPage::~CdbOptionsPage()
{
CdbOptionsPage::m_instance = 0;
......
......@@ -128,7 +128,6 @@ public:
virtual ~CdbOptionsPage();
static CdbOptionsPage *instance();
static QString settingsId();
// IOptionsPage
QWidget *createPage(QWidget *parent);
......
......@@ -236,7 +236,7 @@ void CommonOptionsPageWidget::setGlobalOptions(const GlobalDebuggerOptions &go)
CommonOptionsPage::CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> &go) :
m_options(go)
{
setId(QLatin1String(DEBUGGER_COMMON_SETTINGS_ID));
setId(DEBUGGER_COMMON_SETTINGS_ID);
setDisplayName(QCoreApplication::translate("Debugger", "General"));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY));
......@@ -309,7 +309,7 @@ QString CommonOptionsPage::msgSetBreakpointAtFunctionToolTip(const char *functio
LocalsAndExpressionsOptionsPage::LocalsAndExpressionsOptionsPage()
{
setId(QLatin1String("Z.LocalsAndExpressions"));
setId("Z.LocalsAndExpressions");
//: '&&' will appear as one (one is marking keyboard shortcut)
setDisplayName(QCoreApplication::translate("Debugger", "Locals && Expressions"));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
......
......@@ -380,7 +380,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
GdbOptionsPage::GdbOptionsPage()
{
setId(QLatin1String("M.Gdb"));
setId("M.Gdb");
setDisplayName(tr("GDB"));
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
......
......@@ -105,7 +105,7 @@ QString CppSettingsPageWidget::searchKeywords() const
CppSettingsPage::CppSettingsPage(QObject *parent) : Core::IOptionsPage(parent)
{
m_parameters.fromSettings(Core::ICore::settings());
setId(QLatin1String(Designer::Constants::SETTINGS_CPP_SETTINGS_ID));
setId(Designer::Constants::SETTINGS_CPP_SETTINGS_ID);
setDisplayName(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_CPP_SETTINGS_NAME));
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY));
......
......@@ -46,7 +46,7 @@ using namespace Designer::Internal;
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
m_designerPage(designerPage), m_initialized(false)
{
setId(m_designerPage->name());
setId(Core::Id::fromString(m_designerPage->name()));
setDisplayName(m_designerPage->name());
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer",
......
......@@ -238,7 +238,7 @@ class FakeVimOptionPage : public IOptionsPage
public:
FakeVimOptionPage()
{
setId(_(SETTINGS_ID));
setId(SETTINGS_ID);
setDisplayName(tr("General"));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
......@@ -405,7 +405,7 @@ public:
FakeVimExCommandsPage(FakeVimPluginPrivate *q)
: m_q(q)
{
setId(_(SETTINGS_EX_CMDS_ID));
setId(SETTINGS_EX_CMDS_ID);
setDisplayName(tr("Ex Command Mapping"));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
......@@ -627,7 +627,7 @@ public:
FakeVimUserCommandsPage(FakeVimPluginPrivate *q)
: m_q(q)
{
setId(_(SETTINGS_USER_CMDS_ID));
setId(SETTINGS_USER_CMDS_ID);
setDisplayName(tr("User Command Mapping"));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
......
......@@ -47,7 +47,7 @@ GerritOptionsPage::GerritOptionsPage(const QSharedPointer<GerritParameters> &p,
: VcsBase::VcsBaseOptionsPage(parent)
, m_parameters(p)
{
setId(QLatin1String("Gerrit"));
setId("Gerrit");
setDisplayName(tr("Gerrit"));
}
......
......@@ -119,7 +119,7 @@ QString SettingsPageWidget::searchKeywords() const
SettingsPage::SettingsPage() :
m_widget(0)
{
setId(QLatin1String(VcsBase::Constants::VCS_ID_GIT));
setId(VcsBase::Constants::VCS_ID_GIT);
setDisplayName(tr("Git"));
}
......
......@@ -67,9 +67,6 @@ class SettingsPage : public VcsBase::VcsBaseOptionsPage
public:
SettingsPage();
QString id() const;
QString displayName() const;
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
......
......@@ -42,7 +42,7 @@ using namespace Help::Internal;
DocSettingsPage::DocSettingsPage()
{
setId(QLatin1String("B.Documentation"));
setId("B.Documentation");
setDisplayName(tr("Documentation"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
......
......@@ -43,7 +43,7 @@ using namespace Help::Internal;
FilterSettingsPage::FilterSettingsPage()
{
setId(QLatin1String("D.Filters"));
setId("D.Filters");
setDisplayName(tr("Filters"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
......
......@@ -63,7 +63,7 @@ GeneralSettingsPage::GeneralSettingsPage()
QWebSettings* webSettings = QWebSettings::globalSettings();
m_font.setPointSize(webSettings->fontSize(QWebSettings::DefaultFontSize));
#endif
setId(QLatin1String("A.General settings"));
setId("A.General settings");
setDisplayName(tr("General"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
......
......@@ -48,7 +48,7 @@ using namespace Locator::Internal;
SettingsPage::SettingsPage(LocatorPlugin *plugin)
: m_plugin(plugin), m_page(0)
{
setId(QLatin1String(Constants::FILTER_OPTIONS_PAGE));
setId(Constants::FILTER_OPTIONS_PAGE);
setDisplayName(QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
......
......@@ -46,7 +46,7 @@ using namespace Macros::Internal;
MacroOptionsPage::MacroOptionsPage(QObject *parent)
: Core::IOptionsPage(parent)
{
setId(QLatin1String(Constants::M_OPTIONS_PAGE));
setId(Constants::M_OPTIONS_PAGE);
setDisplayName(QCoreApplication::translate("Macros", Constants::M_OPTIONS_TR_PAGE));
setCategory(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("TextEditor",
......
......@@ -92,7 +92,7 @@ private:
Q_SLOT void showSettingsPage()
{
Core::ICore::showOptionsDialog(MaemoQemuSettingsPage::pageCategory(),
Core::Id(MaemoQemuSettingsPage::pageId()));
MaemoQemuSettingsPage::pageId());
accept();
}
};
......@@ -136,9 +136,9 @@ void MaemoQemuSettingsPage::showQemuCrashDialog()
dlg.exec();
}
QString MaemoQemuSettingsPage::pageId()
Core::Id MaemoQemuSettingsPage::pageId()
{
return QLatin1String("ZZ.Qemu Settings");
return "ZZ.Qemu Settings";
}
Core::Id MaemoQemuSettingsPage::pageCategory()
......
......@@ -50,7 +50,7 @@ public:
void finish();
static void showQemuCrashDialog();
static QString pageId();
static Core::Id pageId();
static Core::Id pageCategory();
private:
......
......@@ -91,7 +91,7 @@ QString OptionsPageWidget::searchKeywords() const
OptionsPage::OptionsPage()
{
setId(QLatin1String(VcsBase::Constants::VCS_ID_MERCURIAL));
setId(VcsBase::Constants::VCS_ID_MERCURIAL);
setDisplayName(tr("Mercurial"));
}
......
......@@ -64,8 +64,6 @@ class OptionsPage : public VcsBase::VcsBaseOptionsPage
public:
OptionsPage();
QString id() const;
QString displayName() const;
QWidget *createPage(QWidget *parent);
void apply();
......
......@@ -138,7 +138,7 @@ QString SettingsPageWidget::searchKeywords() const
SettingsPage::SettingsPage()
{
setId(QLatin1String(VcsBase::Constants::VCS_ID_PERFORCE));
setId(VcsBase::Constants::VCS_ID_PERFORCE);
setDisplayName(tr("Perforce"));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment