Core: Make IOptionsPageProvider::categoryIcon a Utils::Icon

...just like it is with IOptionsPage

Change-Id: I033891f1a908be24b05103cb13a4ef628994d2a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2018-04-23 18:02:55 +02:00
parent ce84f64d1b
commit 3d42f98017
4 changed files with 4 additions and 5 deletions

View File

@@ -211,5 +211,5 @@ const QList<Core::IOptionsPageProvider *> Core::IOptionsPageProvider::allOptions
QIcon Core::IOptionsPageProvider::categoryIcon() const
{
return QIcon(m_categoryIcon);
return m_categoryIcon.icon();
}

View File

@@ -105,11 +105,11 @@ public:
protected:
void setCategory(Id category) { m_category = category; }
void setDisplayCategory(const QString &displayCategory) { m_displayCategory = displayCategory; }
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
void setCategoryIcon(const Utils::Icon &categoryIcon) { m_categoryIcon = categoryIcon; }
Id m_category;
QString m_displayCategory;
QString m_categoryIcon;
Utils::Icon m_categoryIcon;
};
} // namespace Core

View File

@@ -36,7 +36,6 @@ const char C_DESIGNER_XML_EDITOR[] = "Designer Xml Editor";
const char C_DESIGNER_XML_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("Designer", "Form Editor");
const char SETTINGS_CATEGORY[] = "P.Designer";
const char SETTINGS_CATEGORY_ICON[] = ":/core/images/category_design.png";
const char SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Designer", "Designer");
// Context

View File

@@ -72,7 +72,7 @@ SettingsPageProvider::SettingsPageProvider(QObject *parent)
setCategory(Designer::Constants::SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Designer",
Designer::Constants::SETTINGS_TR_CATEGORY));
setCategoryIcon(Designer::Constants::SETTINGS_CATEGORY_ICON);
setCategoryIcon(Utils::Icon(":/core/images/category_design.png"));
}
QList<Core::IOptionsPage *> SettingsPageProvider::pages() const