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>
This commit is contained in:
Eike Ziller
2018-04-20 15:45:11 +02:00
parent 4b9945c329
commit d1ec4c1204
60 changed files with 29 additions and 144 deletions

View File

@@ -134,8 +134,6 @@ DocSettingsPage::DocSettingsPage()
setId("B.Documentation");
setDisplayName(tr("Documentation"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(Utils::Icon(Help::Constants::HELP_CATEGORY_ICON));
}
QWidget *DocSettingsPage::widget()

View File

@@ -43,8 +43,6 @@ FilterSettingsPage::FilterSettingsPage()
setId("D.Filters");
setDisplayName(tr("Filters"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(Utils::Icon(Help::Constants::HELP_CATEGORY_ICON));
}
QWidget *FilterSettingsPage::widget()

View File

@@ -54,8 +54,8 @@ GeneralSettingsPage::GeneralSettingsPage()
setId("A.General settings");
setDisplayName(tr("General"));
setCategory(Help::Constants::HELP_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
setCategoryIcon(Utils::Icon(Help::Constants::HELP_CATEGORY_ICON));
setDisplayCategory(QCoreApplication::translate("Help", "Help"));
setCategoryIcon(Utils::Icon(":/help/images/category_help.png"));
}
QWidget *GeneralSettingsPage::widget()

View File

@@ -39,8 +39,6 @@ static const QLatin1String PreviousFilterNameKey("UnfilteredFilterName");
const int P_MODE_HELP = 70;
const char ID_MODE_HELP [] = "Help";
const char HELP_CATEGORY[] = "H.Help";
const char HELP_CATEGORY_ICON[] = ":/help/images/category_help.png";
const char HELP_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Help", "Help");
const char C_MODE_HELP [] = "Help Mode";
const char C_HELP_SIDEBAR[] = "Help Sidebar";