Commit 78beacd7 authored by hjk's avatar hjk

Use Core::Id for IOptionPage::category

Change-Id: I63433edd9118a7aa4ecaef28f40bfc729d90f512
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 1863bfeb
......@@ -48,7 +48,7 @@ AnalyzerOptionsPage::AnalyzerOptionsPage(AbstractAnalyzerSubConfig *config, QObj
{
setId(m_config->id());
setDisplayName(m_config->displayName());
setCategory(QLatin1String("T.Analyzer"));
setCategory("T.Analyzer");
setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
setCategoryIcon(QLatin1String(":/images/analyzer_category.png"));
}
......
......@@ -42,7 +42,7 @@ AndroidSettingsPage::AndroidSettingsPage(QObject *parent)
{
setId(QLatin1String(Constants::ANDROID_SETTINGS_ID));
setDisplayName(tr("Android Configurations"));
setCategory(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY));
setCategory(Constants::ANDROID_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Android",
Constants::ANDROID_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
......
......@@ -245,7 +245,7 @@ CMakeSettingsPage::CMakeSettingsPage()
{
setId(QLatin1String("Z.CMake"));
setDisplayName(tr("CMake"));
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
......
......@@ -30,7 +30,7 @@
#ifndef IOPTIONSPAGE_H
#define IOPTIONSPAGE_H
#include <coreplugin/core_global.h>
#include <coreplugin/id.h>
#include <QIcon>
#include <QObject>
......@@ -46,7 +46,7 @@ public:
QString id() const { return m_id; }
QString displayName() const { return m_displayName; }
QString category() const { return m_category; }
Core::Id category() const { return m_category; }
QString displayCategory() const { return m_displayCategory; }
QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
......@@ -58,13 +58,13 @@ public:
protected:
void setId(const QString &id) { m_id = id; }
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
void setCategory(const QString &category) { m_category = category; }
void setCategory(Id category) { m_category = category; }
void setDisplayCategory(const QString &displayCategory) { m_displayCategory = displayCategory; }
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
QString m_id;
QString m_displayName;
QString m_category;
Core::Id m_category;
QString m_displayCategory;
QString m_categoryIcon;
};
......@@ -84,18 +84,18 @@ class CORE_EXPORT IOptionsPageProvider : public QObject
public:
IOptionsPageProvider(QObject *parent = 0) : QObject(parent) {}
QString category() const { return m_category; }
Core::Id category() const { return m_category; }
QString displayCategory() const { return m_displayCategory; }
QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
virtual QList<IOptionsPage *> pages() const = 0;
protected:
void setCategory(const QString &category) { m_category = category; }
void setCategory(Core::Id category) { m_category = category; }
void setDisplayCategory(const QString &displayCategory) { m_displayCategory = displayCategory; }
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
QString m_category;
Core::Id m_category;
QString m_displayCategory;
QString m_categoryIcon;
};
......
......@@ -69,9 +69,10 @@ static QPointer<SettingsDialog> m_instance = 0;
// ----------- Category model
class Category {
class Category
{
public:
QString id;
Id id;
QString displayName;
QIcon icon;
QList<IOptionsPage *> pages;
......@@ -94,7 +95,7 @@ public:
const QList<Category*> &categories() const { return m_categories; }
private:
Category *findCategoryById(const QString &id);
Category *findCategoryById(Id id);
QList<Category*> m_categories;
QIcon m_emptyIcon;
......@@ -145,7 +146,7 @@ void CategoryModel::setPages(const QList<IOptionsPage*> &pages,
// Put the pages in categories
foreach (IOptionsPage *page, pages) {
const QString &categoryId = page->category();
const Id categoryId = page->category();
Category *category = findCategoryById(categoryId);
if (!category) {
category = new Category;
......@@ -162,7 +163,7 @@ void CategoryModel::setPages(const QList<IOptionsPage*> &pages,
}
foreach (IOptionsPageProvider *provider, providers) {
const QString &categoryId = provider->category();
const Id categoryId = provider->category();
Category *category = findCategoryById(categoryId);
if (!category) {
category = new Category;
......@@ -181,7 +182,7 @@ void CategoryModel::setPages(const QList<IOptionsPage*> &pages,
endResetModel();
}
Category *CategoryModel::findCategoryById(const QString &id)
Category *CategoryModel::findCategoryById(Id id)
{
for (int i = 0; i < m_categories.size(); ++i) {
Category *category = m_categories.at(i);
......@@ -269,7 +270,7 @@ public:
// Helpers to sort by category. id
bool optionsPageLessThan(const IOptionsPage *p1, const IOptionsPage *p2)
{
if (const int cc = p1->category().compare(p2->category()))
if (const int cc = p1->category().toString().compare(p2->category().toString()))
return cc < 0;
return p1->id().compare(p2->id()) < 0;
}
......@@ -329,11 +330,11 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
void SettingsDialog::showPage(Id categoryId, Id pageId)
{
// handle the case of "show last page"
QString initialCategory = categoryId.toString();
Id initialCategory = categoryId;
QString initialPage = pageId.toString();
if (initialCategory.isEmpty() && initialPage.isEmpty()) {
if (!initialCategory.isValid() && initialPage.isEmpty()) {
QSettings *settings = ICore::settings();
initialCategory = settings->value(QLatin1String(categoryKeyC), QVariant(QString())).toString();
initialCategory = Id(settings->value(QLatin1String(categoryKeyC), QVariant(QString())).toString());
initialPage = settings->value(QLatin1String(pageKeyC), QVariant(QString())).toString();
}
......@@ -462,7 +463,7 @@ void SettingsDialog::updateEnabledTabs(Category *category, const QString &search
for (int i = 0; i < category->pages.size(); ++i) {
const IOptionsPage *page = category->pages.at(i);
const bool enabled = searchText.isEmpty()
|| page->category().contains(searchText, Qt::CaseInsensitive)
|| page->category().toString().contains(searchText, Qt::CaseInsensitive)
|| page->displayName().contains(searchText, Qt::CaseInsensitive)
|| page->matches(searchText);
category->tabWidget->setTabEnabled(i, enabled);
......@@ -541,7 +542,7 @@ void SettingsDialog::apply()
void SettingsDialog::done(int val)
{
QSettings *settings = ICore::settings();
settings->setValue(QLatin1String(categoryKeyC), m_currentCategory);
settings->setValue(QLatin1String(categoryKeyC), m_currentCategory.toString());
settings->setValue(QLatin1String(pageKeyC), m_currentPage);
ICore::saveSettings(); // save all settings
......
......@@ -35,7 +35,6 @@
#include <QList>
#include <QSet>
#include <QPointer>
#include <QEventLoop>
#include <QDialog>
......@@ -99,7 +98,7 @@ private:
QSet<Core::IOptionsPage*> m_visitedPages;
QSortFilterProxyModel *m_proxyModel;
CategoryModel *m_model;
QString m_currentCategory;
Core::Id m_currentCategory;
QString m_currentPage;
QStackedLayout *m_stackedLayout;
Utils::FilterLineEdit *m_filterLineEdit;
......
......@@ -62,7 +62,7 @@ ShortcutSettings::ShortcutSettings(QObject *parent)
setId(QLatin1String(Core::Constants::SETTINGS_ID_SHORTCUTS));
setDisplayName(tr("Keyboard"));
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
}
......
......@@ -56,7 +56,7 @@ GeneralSettings::GeneralSettings():
{
setId(QLatin1String(Core::Constants::SETTINGS_ID_ENVIRONMENT));
setDisplayName(tr("General"));
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
}
......
......@@ -560,7 +560,7 @@ MimeTypeSettings::MimeTypeSettings(QObject *parent)
{
setId(QLatin1String(Core::Constants::SETTINGS_ID_MIMETYPES));
setDisplayName(tr("MIME Types"));
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core",
Core::Constants::SETTINGS_TR_CATEGORY_CORE));
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
......
......@@ -52,7 +52,7 @@ ToolSettings::ToolSettings(QObject *parent) :
{
setId(QLatin1String(Core::Constants::SETTINGS_ID_TOOLS));
setDisplayName(tr("External Tools"));
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core", Constants::SETTINGS_TR_CATEGORY_CORE));
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
}
......
......@@ -53,7 +53,7 @@ CodePasterSettingsPage::CodePasterSettingsPage()
{
setId(QLatin1String("C.CodePaster"));
setDisplayName(tr("CodePaster"));
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
setCategory(Constants::CPASTER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("CodePaster",
Constants::CPASTER_SETTINGS_TR_CATEGORY));
......
......@@ -100,7 +100,7 @@ FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(const QSharedPointe
{
setId(QLatin1String("X.FileSharePaster"));
setDisplayName(tr("Fileshare"));
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
setCategory(Constants::CPASTER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY));
}
......
......@@ -80,7 +80,7 @@ SettingsPage::SettingsPage(const QSharedPointer<Settings> &settings) :
{
setId(QLatin1String("A.General"));
setDisplayName(tr("General"));
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
setCategory(Constants::CPASTER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("CodePaster",
Constants::CPASTER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPASTER_ICON));
......
......@@ -481,7 +481,7 @@ CppCodeStyleSettingsPage::CppCodeStyleSettingsPage(QWidget *parent) :
{
setId(QLatin1String(Constants::CPP_CODE_STYLE_SETTINGS_ID));
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME));
setCategory(QLatin1String(Constants::CPP_SETTINGS_CATEGORY));
setCategory(Constants::CPP_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
}
......
......@@ -321,7 +321,7 @@ CppFileSettingsPage::CppFileSettingsPage(QSharedPointer<CppFileSettings> &settin
{
setId(QLatin1String(Constants::CPP_FILE_SETTINGS_ID));
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_FILE_SETTINGS_NAME));
setCategory(QLatin1String(Constants::CPP_SETTINGS_CATEGORY));
setCategory(Constants::CPP_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
}
......
......@@ -323,9 +323,8 @@ CdbOptionsPage::CdbOptionsPage() :
m_options->fromSettings(Core::ICore::settings());
setId(CdbOptionsPage::settingsId());
setDisplayName(tr("CDB"));
setCategory(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY));
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger",
Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
......
......@@ -238,7 +238,7 @@ CommonOptionsPage::CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions>
{
setId(QLatin1String(DEBUGGER_COMMON_SETTINGS_ID));
setDisplayName(QCoreApplication::translate("Debugger", "General"));
setCategory(QLatin1String(DEBUGGER_SETTINGS_CATEGORY));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
}
......@@ -312,7 +312,7 @@ LocalsAndExpressionsOptionsPage::LocalsAndExpressionsOptionsPage()
setId(QLatin1String("Z.LocalsAndExpressions"));
//: '&&' will appear as one (one is marking keyboard shortcut)
setDisplayName(QCoreApplication::translate("Debugger", "Locals && Expressions"));
setCategory(QLatin1String(DEBUGGER_SETTINGS_CATEGORY));
setCategory(DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
}
......
......@@ -382,7 +382,7 @@ GdbOptionsPage::GdbOptionsPage()
{
setId(QLatin1String("M.Gdb"));
setDisplayName(tr("GDB"));
setCategory(QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY));
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
}
......
......@@ -72,7 +72,7 @@ LldbOptionsPage::LldbOptionsPage()
// m_options->fromSettings(Core::ICore::settings());
setId(QLatin1String("F.Lldb"));
setDisplayName(tr("LLDB"));
setCategory(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY));
setCategory(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON)));
}
......
......@@ -107,7 +107,7 @@ CppSettingsPage::CppSettingsPage(QObject *parent) : Core::IOptionsPage(parent)
m_parameters.fromSettings(Core::ICore::settings());
setId(QLatin1String(Designer::Constants::SETTINGS_CPP_SETTINGS_ID));
setDisplayName(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_CPP_SETTINGS_NAME));
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
}
......
......@@ -48,7 +48,7 @@ SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
{
setId(m_designerPage->name());
setDisplayName(m_designerPage->name());
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer",
Designer::Constants::SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
......@@ -75,7 +75,7 @@ void SettingsPage::finish()
SettingsPageProvider::SettingsPageProvider(QObject *parent)
: IOptionsPageProvider(parent), m_initialized(false)
{
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer",
Designer::Constants::SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
......
......@@ -232,7 +232,7 @@ public:
{
setId(_(SETTINGS_ID));
setDisplayName(tr("General"));
setCategory(_(SETTINGS_CATEGORY));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
setCategoryIcon(_(SETTINGS_CATEGORY_FAKEVIM_ICON));
}
......@@ -399,7 +399,7 @@ public:
{
setId(_(SETTINGS_EX_CMDS_ID));
setDisplayName(tr("Ex Command Mapping"));
setCategory(_(SETTINGS_CATEGORY));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
setCategoryIcon(_(SETTINGS_CATEGORY_FAKEVIM_ICON));
}
......@@ -621,7 +621,7 @@ public:
{
setId(_(SETTINGS_USER_CMDS_ID));
setDisplayName(tr("User Command Mapping"));
setCategory(_(SETTINGS_CATEGORY));
setCategory(SETTINGS_CATEGORY);
setDisplayCategory(tr("FakeVim"));
setCategoryIcon(_(SETTINGS_CATEGORY_FAKEVIM_ICON));
}
......
......@@ -44,7 +44,7 @@ DocSettingsPage::DocSettingsPage()
{
setId(QLatin1String("B.Documentation"));
setDisplayName(tr("Documentation"));
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
}
......
......@@ -45,7 +45,7 @@ FilterSettingsPage::FilterSettingsPage()
{
setId(QLatin1String("D.Filters"));
setDisplayName(tr("Filters"));
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
}
......
......@@ -65,7 +65,7 @@ GeneralSettingsPage::GeneralSettingsPage()
#endif
setId(QLatin1String("A.General settings"));
setDisplayName(tr("General"));
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
}
......
......@@ -50,7 +50,7 @@ SettingsPage::SettingsPage(LocatorPlugin *plugin)
{
setId(QLatin1String(Constants::FILTER_OPTIONS_PAGE));
setDisplayName(QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE));
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
}
......
......@@ -48,7 +48,7 @@ MacroOptionsPage::MacroOptionsPage(QObject *parent)
{
setId(QLatin1String(Constants::M_OPTIONS_PAGE));
setDisplayName(QCoreApplication::translate("Macros", Constants::M_OPTIONS_TR_PAGE));
setCategory(QLatin1String(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY));
setCategory(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("TextEditor",
TextEditor::Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY));
}
......
......@@ -105,7 +105,7 @@ MaemoQemuSettingsPage::MaemoQemuSettingsPage(QObject *parent)
{
setId(pageId());
setDisplayName(tr("MeeGo Qemu Settings"));
setCategory(pageCategory().toString());
setCategory(pageCategory());
//setDisplayCategory(QString()); // Will be set by device configurations page.
//setCategoryIcon(QIcon()) // See above.
}
......
......@@ -44,7 +44,7 @@ DeviceSettingsPage::DeviceSettingsPage(QObject *parent)
{
setId(QLatin1String(Constants::DEVICE_SETTINGS_PAGE_ID));
setDisplayName(tr("Devices"));
setCategory(QLatin1String(Constants::DEVICE_SETTINGS_CATEGORY));
setCategory(Constants::DEVICE_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer", "Devices"));
setCategoryIcon(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
}
......
......@@ -57,7 +57,7 @@ KitOptionsPage::KitOptionsPage() :
{
setId(QLatin1String(Constants::KITS_SETTINGS_PAGE_ID));
setDisplayName(tr("Kits"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
......
......@@ -177,7 +177,7 @@ ProjectExplorerSettingsPage::ProjectExplorerSettingsPage()
{
setId(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_ID));
setDisplayName(tr("General"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
......
......@@ -447,7 +447,7 @@ ToolChainOptionsPage::ToolChainOptionsPage() :
{
setId(QLatin1String(Constants::TOOLCHAIN_SETTINGS_PAGE_ID));
setDisplayName(tr("Compilers"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setCategory(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
......
......@@ -86,7 +86,7 @@ SettingsPage::SettingsPage() :
{
setId(QLatin1String("B.QmlDesigner"));
setDisplayName(tr("Qt Quick Designer"));
setCategory(QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML));
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_QML_ICON));
......
......@@ -123,7 +123,7 @@ QuickToolBarSettingsPage::QuickToolBarSettingsPage() :
{
setId(QLatin1String("C.QmlToolbar"));
setDisplayName(tr("Qt Quick ToolBar"));
setCategory(QLatin1String(Constants::SETTINGS_CATEGORY_QML));
setCategory(Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
setCategoryIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
......
......@@ -168,7 +168,7 @@ QmlJSCodeStyleSettingsPage::QmlJSCodeStyleSettingsPage(/*QSharedPointer<CppFileS
{
setId(QLatin1String(Constants::QML_JS_CODE_STYLE_SETTINGS_ID));
setDisplayName(QCoreApplication::translate("QmlJSTools", Constants::QML_JS_CODE_STYLE_SETTINGS_NAME));
setCategory(QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML));
setCategory(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
setDisplayCategory(QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
setCategoryIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
}
......
......@@ -72,7 +72,7 @@ QtOptionsPage::QtOptionsPage()
{
setId(QLatin1String(Constants::QTVERSION_SETTINGS_PAGE_ID));
setDisplayName(QCoreApplication::translate("Qt4ProjectManager", Constants::QTVERSION_SETTINGS_PAGE_NAME));
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
......
......@@ -318,7 +318,7 @@ FontSettingsPage::FontSettingsPage(const FormatDescriptions &fd,
const QString &id,
QObject *parent) :
TextEditorOptionsPage(parent),
d_ptr(new FontSettingsPagePrivate(fd, id, tr("Font && Colors"), category()))
d_ptr(new FontSettingsPagePrivate(fd, id, tr("Font && Colors"), category().toString()))
{
setId(d_ptr->m_id);
setDisplayName(d_ptr->m_displayName);
......
......@@ -38,7 +38,7 @@ using namespace TextEditor;
TextEditorOptionsPage::TextEditorOptionsPage(QObject *parent) :
Core::IOptionsPage(parent)
{
setCategory(QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY));
setCategory(Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("TextEditor", Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY_ICON));
}
......@@ -51,7 +51,7 @@ OptionsPage::OptionsPage(const Settings &settings, QObject *parent) :
setId(QLatin1String("TodoSettings"));
setDisplayName(tr("To-Do"));
setCategory(QLatin1String("To-Do"));
setCategory("To-Do");
setDisplayCategory(tr("To-Do"));
setCategoryIcon(QLatin1String(Constants::ICON_TODO));
}
......
......@@ -44,7 +44,7 @@ namespace VcsBase {
VcsBaseOptionsPage::VcsBaseOptionsPage(QObject *parent) :
Core::IOptionsPage(parent)
{
setCategory(QLatin1String(Constants::VCS_SETTINGS_CATEGORY));
setCategory(Constants::VCS_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("VcsBase", Constants::VCS_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
}
......
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