Core: Provide settings categories centrally

It was conceptually wrong that an options page was supposed to set its
category's display name and icon.
Instead, categories are now explicitly registered with name and icon.

Change-Id: Ic10b3791c8068176f55470e6845ab4832160b8e7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2024-11-08 13:56:24 +01:00
parent e7eefd3e35
commit ba5e4b7eff
79 changed files with 182 additions and 144 deletions

View File

@@ -6,6 +6,7 @@
#include "luatr.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/ioutputpane.h>
@@ -290,6 +291,9 @@ public:
void initialize() final
{
IOptionsPage::registerCategory(
"ZY.Lua", Tr::tr("Lua"), ":/lua/images/settingscategory_lua.png");
setupLuaEngine(this);
registerProvider("async", ":/lua/scripts/async.lua");