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
......@@ -42,7 +42,7 @@ namespace Internal {
DeviceSettingsPage::DeviceSettingsPage(QObject *parent)
: Core::IOptionsPage(parent)
{
setId(QLatin1String(Constants::DEVICE_SETTINGS_PAGE_ID));
setId(Constants::DEVICE_SETTINGS_PAGE_ID);
setDisplayName(tr("Devices"));
setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer", "Devices"));
......
......@@ -55,7 +55,7 @@ namespace ProjectExplorer {
KitOptionsPage::KitOptionsPage() :
m_model(0), m_selectionModel(0), m_currentWidget(0), m_toShow(0)
{
setId(QLatin1String(Constants::KITS_SETTINGS_PAGE_ID));
setId(Constants::KITS_SETTINGS_PAGE_ID);
setDisplayName(tr("Kits"));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
......
......@@ -175,7 +175,7 @@ QString ProjectExplorerSettingsWidget::searchKeywords() const
// ------------------ ProjectExplorerSettingsPage
ProjectExplorerSettingsPage::ProjectExplorerSettingsPage()
{
setId(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_ID));
setId(Constants::PROJECTEXPLORER_SETTINGS_ID);
setDisplayName(tr("General"));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
......
......@@ -445,7 +445,7 @@ ToolChainOptionsPage::ToolChainOptionsPage() :
m_model(0), m_selectionModel(0), m_toolChainView(0), m_container(0),
m_addButton(0), m_cloneButton(0), m_delButton(0)
{
setId(QLatin1String(Constants::TOOLCHAIN_SETTINGS_PAGE_ID));
setId(Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
setDisplayName(tr("Compilers"));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
......
......@@ -84,7 +84,7 @@ QString SettingsPageWidget::searchKeywords() const
SettingsPage::SettingsPage() :
m_widget(0)
{
setId(QLatin1String("B.QmlDesigner"));
setId("B.QmlDesigner");
setDisplayName(tr("Qt Quick Designer"));
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
......
......@@ -121,7 +121,7 @@ QuickToolBarSettings QuickToolBarSettings::get()
QuickToolBarSettingsPage::QuickToolBarSettingsPage() :
m_widget(0)
{
setId(QLatin1String("C.QmlToolbar"));
setId("C.QmlToolbar");
setDisplayName(tr("Qt Quick ToolBar"));
setCategory(Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
......
......@@ -166,7 +166,7 @@ QmlJSCodeStyleSettingsPage::QmlJSCodeStyleSettingsPage(/*QSharedPointer<CppFileS
Core::IOptionsPage(parent),
m_pageTabPreferences(0)
{
setId(QLatin1String(Constants::QML_JS_CODE_STYLE_SETTINGS_ID));
setId(Constants::QML_JS_CODE_STYLE_SETTINGS_ID);
setDisplayName(QCoreApplication::translate("QmlJSTools", Constants::QML_JS_CODE_STYLE_SETTINGS_NAME));
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
......
......@@ -43,7 +43,7 @@ namespace Internal {
BlackBerrySettingsPage::BlackBerrySettingsPage(QObject *parent) :
Core::IOptionsPage(parent)
{
setId(QLatin1String(Constants::QNX_SETTINGS_ID));
setId(Constants::QNX_SETTINGS_ID);
setDisplayName(tr("BlackBerry"));
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("BlackBerry",
......
......@@ -71,7 +71,7 @@ using namespace Utils;
QtOptionsPage::QtOptionsPage()
: m_widget(0)
{
setId(QLatin1String(Constants::QTVERSION_SETTINGS_PAGE_ID));
setId(Constants::QTVERSION_SETTINGS_PAGE_ID);
setDisplayName(QCoreApplication::translate("Qt4ProjectManager", Constants::QTVERSION_SETTINGS_PAGE_NAME));
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
......
......@@ -103,7 +103,7 @@ QString SettingsPageWidget::searchKeywords() const
SettingsPage::SettingsPage() :
m_widget(0)
{
setId(QLatin1String(VcsBase::Constants::VCS_ID_SUBVERSION));
setId(VcsBase::Constants::VCS_ID_SUBVERSION);
setDisplayName(tr("Subversion"));
}
......
......@@ -47,7 +47,7 @@ class CodeStylePool;
class BehaviorSettingsPageParameters
{
public:
QString id;
Core::Id id;
QString displayName;
QString settingsPrefix;
};
......
......@@ -41,7 +41,7 @@ class DisplaySettings;
class DisplaySettingsPageParameters
{
public:
QString id;
Core::Id id;
QString displayName;
QString settingsPrefix;
};
......
......@@ -117,13 +117,13 @@ class FontSettingsPagePrivate
{
public:
FontSettingsPagePrivate(const TextEditor::FormatDescriptions &fd,
const QString &id,
Core::Id id,
const QString &displayName,
const QString &category);
~FontSettingsPagePrivate();
public:
const QString m_id;
const Core::Id m_id;
const QString m_displayName;
const QString m_settingsGroup;
......@@ -174,7 +174,7 @@ static QString createColorSchemeFileName(const QString &pattern)
// ------- FontSettingsPagePrivate
FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescriptions &fd,
const QString &id,
Core::Id id,
const QString &displayName,
const QString &category) :
m_id(id),
......@@ -313,7 +313,7 @@ QColor FormatDescription::background() const
// ------------ FontSettingsPage
FontSettingsPage::FontSettingsPage(const FormatDescriptions &fd,
const QString &id,
Core::Id id,
QObject *parent) :
TextEditorOptionsPage(parent),
d_ptr(new FontSettingsPagePrivate(fd, id, tr("Font && Colors"), category().toString()))
......
......@@ -88,9 +88,7 @@ class TEXTEDITOR_EXPORT FontSettingsPage : public TextEditorOptionsPage
Q_OBJECT
public:
FontSettingsPage(const FormatDescriptions &fd,
const QString &id,
QObject *parent = 0);
FontSettingsPage(const FormatDescriptions &fd, Core::Id id, QObject *parent = 0);
~FontSettingsPage();
......
......@@ -43,11 +43,11 @@ using namespace Internal;
struct HighlighterSettingsPage::HighlighterSettingsPagePrivate
{
explicit HighlighterSettingsPagePrivate(const QString &id);
explicit HighlighterSettingsPagePrivate(Core::Id id);
void ensureInitialized();
bool m_initialized;
const QString m_id;
const Core::Id m_id;
const QString m_displayName;
const QString m_settingsPrefix;
......@@ -59,7 +59,7 @@ struct HighlighterSettingsPage::HighlighterSettingsPagePrivate
};
HighlighterSettingsPage::HighlighterSettingsPagePrivate::
HighlighterSettingsPagePrivate(const QString &id) :
HighlighterSettingsPagePrivate(Core::Id id) :
m_initialized(false),
m_id(id),
m_displayName(tr("Generic Highlighter")),
......@@ -75,7 +75,7 @@ void HighlighterSettingsPage::HighlighterSettingsPagePrivate::ensureInitialized(
m_settings.fromSettings(m_settingsPrefix, Core::ICore::settings());
}
HighlighterSettingsPage::HighlighterSettingsPage(const QString &id, QObject *parent) :
HighlighterSettingsPage::HighlighterSettingsPage(Core::Id id, QObject *parent) :
TextEditorOptionsPage(parent),
m_requestMimeTypeRegistration(false),
m_d(new HighlighterSettingsPagePrivate(id))
......
......@@ -49,7 +49,7 @@ class HighlighterSettingsPage : public TextEditorOptionsPage
Q_OBJECT
public:
HighlighterSettingsPage(const QString &id, QObject *parent);
HighlighterSettingsPage(Core::Id id, QObject *parent);
~HighlighterSettingsPage();
QWidget *createPage(QWidget *parent);
......
......@@ -268,10 +268,10 @@ class SnippetsSettingsPagePrivate : public QObject
{
Q_OBJECT
public:
SnippetsSettingsPagePrivate(const QString &id);
SnippetsSettingsPagePrivate(Core::Id id);
~SnippetsSettingsPagePrivate() { delete m_model; }
const QString &id() const { return m_id; }
Core::Id id() const { return m_id; }
const QString &displayName() const { return m_displayName; }
bool isKeyword(const QString &s) const { return m_keywords.contains(s, Qt::CaseInsensitive); }
void configureUi(QWidget *parent);
......@@ -301,7 +301,7 @@ private:
bool settingsChanged() const;
void writeSettings();
const QString m_id;
const Core::Id m_id;
const QString m_displayName;
const QString m_settingsPrefix;
SnippetsTableModel *m_model;
......@@ -311,7 +311,7 @@ private:
Ui::SnippetsSettingsPage m_ui;
};
SnippetsSettingsPagePrivate::SnippetsSettingsPagePrivate(const QString &id) :
SnippetsSettingsPagePrivate::SnippetsSettingsPagePrivate(Core::Id id) :
m_id(id),
m_displayName(tr("Snippets")),
m_settingsPrefix(QLatin1String("Text")),
......@@ -557,7 +557,7 @@ void SnippetsSettingsPagePrivate::decorateEditors(const TextEditor::FontSettings
}
// SnippetsSettingsPage
SnippetsSettingsPage::SnippetsSettingsPage(const QString &id, QObject *parent) :
SnippetsSettingsPage::SnippetsSettingsPage(Core::Id id, QObject *parent) :
TextEditorOptionsPage(parent),
d(new SnippetsSettingsPagePrivate(id))
{
......
......@@ -42,7 +42,7 @@ class SnippetsSettingsPage : public TextEditorOptionsPage
Q_OBJECT
public:
SnippetsSettingsPage(const QString &id, QObject *parent);
SnippetsSettingsPage(Core::Id id, QObject *parent);
~SnippetsSettingsPage();
bool matches(const QString &s) const;
......
......@@ -256,31 +256,31 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
"(in diff editor)."), Qt::blue));
m_d->m_fontSettingsPage = new FontSettingsPage(formatDescr,
QLatin1String(Constants::TEXT_EDITOR_FONT_SETTINGS),
Constants::TEXT_EDITOR_FONT_SETTINGS,
this);
ExtensionSystem::PluginManager::addObject(m_d->m_fontSettingsPage);
// Add the GUI used to configure the tab, storage and interaction settings
TextEditor::BehaviorSettingsPageParameters behaviorSettingsPageParameters;
behaviorSettingsPageParameters.id = QLatin1String(Constants::TEXT_EDITOR_BEHAVIOR_SETTINGS);
behaviorSettingsPageParameters.id = Constants::TEXT_EDITOR_BEHAVIOR_SETTINGS;
behaviorSettingsPageParameters.displayName = tr("Behavior");
behaviorSettingsPageParameters.settingsPrefix = QLatin1String("text");
m_d->m_behaviorSettingsPage = new BehaviorSettingsPage(behaviorSettingsPageParameters, this);
ExtensionSystem::PluginManager::addObject(m_d->m_behaviorSettingsPage);
TextEditor::DisplaySettingsPageParameters displaySettingsPageParameters;
displaySettingsPageParameters.id = QLatin1String(Constants::TEXT_EDITOR_DISPLAY_SETTINGS),
displaySettingsPageParameters.id = Constants::TEXT_EDITOR_DISPLAY_SETTINGS;
displaySettingsPageParameters.displayName = tr("Display");
displaySettingsPageParameters.settingsPrefix = QLatin1String("text");
m_d->m_displaySettingsPage = new DisplaySettingsPage(displaySettingsPageParameters, this);
ExtensionSystem::PluginManager::addObject(m_d->m_displaySettingsPage);
m_d->m_highlighterSettingsPage =
new HighlighterSettingsPage(QLatin1String(Constants::TEXT_EDITOR_HIGHLIGHTER_SETTINGS), this);
new HighlighterSettingsPage(Constants::TEXT_EDITOR_HIGHLIGHTER_SETTINGS, this);
ExtensionSystem::PluginManager::addObject(m_d->m_highlighterSettingsPage);
m_d->m_snippetsSettingsPage =
new SnippetsSettingsPage(QLatin1String(Constants::TEXT_EDITOR_SNIPPETS_SETTINGS), this);
new SnippetsSettingsPage(Constants::TEXT_EDITOR_SNIPPETS_SETTINGS, this);
ExtensionSystem::PluginManager::addObject(m_d->m_snippetsSettingsPage);
connect(m_d->m_fontSettingsPage, SIGNAL(changed(TextEditor::FontSettings)),
......
......@@ -49,7 +49,7 @@ OptionsPage::OptionsPage(const Settings &settings, QObject *parent) :
{
setSettings(settings);
setId(QLatin1String("TodoSettings"));
setId("TodoSettings");
setDisplayName(tr("To-Do"));
setCategory("To-Do");
setDisplayCategory(tr("To-Do"));
......
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