diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-04-20 15:45:11 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-04-23 11:12:26 +0000 |
commit | d1ec4c120410b7351fc31df659a7f3be7ed4e93f (patch) | |
tree | 87f5c7c73ca95e2b2e14747fdc20659c79d5d59d /src/plugins/cpaster | |
parent | 4b9945c32981105bfae3ba59f9565757f0dc7417 (diff) |
Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.
Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r-- | src/plugins/cpaster/cpasterconstants.h | 2 | ||||
-rw-r--r-- | src/plugins/cpaster/fileshareprotocolsettingspage.cpp | 1 | ||||
-rw-r--r-- | src/plugins/cpaster/settingspage.cpp | 5 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/cpaster/cpasterconstants.h b/src/plugins/cpaster/cpasterconstants.h index ee678eb6c99..3c14c153f90 100644 --- a/src/plugins/cpaster/cpasterconstants.h +++ b/src/plugins/cpaster/cpasterconstants.h @@ -31,8 +31,6 @@ namespace CodePaster { namespace Constants { const char CPASTER_SETTINGS_CATEGORY[] = "XZ.CPaster"; -const char CPASTER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("CodePaster", "Code Pasting"); -const char SETTINGS_CATEGORY_CPASTER_ICON[] = ":/cpaster/images/category_cpaster.png"; } // namespace Constants } // namespace CodePaster diff --git a/src/plugins/cpaster/fileshareprotocolsettingspage.cpp b/src/plugins/cpaster/fileshareprotocolsettingspage.cpp index 2a4c14ae601..51b254ecbaf 100644 --- a/src/plugins/cpaster/fileshareprotocolsettingspage.cpp +++ b/src/plugins/cpaster/fileshareprotocolsettingspage.cpp @@ -98,7 +98,6 @@ FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(const QSharedPointe setId("X.CodePaster.FileSharePaster"); setDisplayName(tr("Fileshare")); setCategory(Constants::CPASTER_SETTINGS_CATEGORY); - setDisplayCategory(QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY)); } QWidget *FileShareProtocolSettingsPage::widget() diff --git a/src/plugins/cpaster/settingspage.cpp b/src/plugins/cpaster/settingspage.cpp index 1aa8f260975..2872c166b9b 100644 --- a/src/plugins/cpaster/settingspage.cpp +++ b/src/plugins/cpaster/settingspage.cpp @@ -68,9 +68,8 @@ SettingsPage::SettingsPage(const QSharedPointer<Settings> &settings, QObject *pa setId("A.CodePaster.General"); setDisplayName(tr("General")); setCategory(Constants::CPASTER_SETTINGS_CATEGORY); - setDisplayCategory(QCoreApplication::translate("CodePaster", - Constants::CPASTER_SETTINGS_TR_CATEGORY)); - setCategoryIcon(Utils::Icon(Constants::SETTINGS_CATEGORY_CPASTER_ICON)); + setDisplayCategory(QCoreApplication::translate("CodePaster", "Code Pasting")); + setCategoryIcon(Utils::Icon(":/cpaster/images/category_cpaster.png")); } SettingsPage::~SettingsPage() |