Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 02aec53

Browse files
committedMar 2, 2025
fix: Make plugin registration be compatible with Qt Creator 16
This introduces changes needed after the following commit in Qt Creator: qt-creator/qt-creator@ba5e4b7 Core: Provide settings categories centrally
1 parent 8a7a138 commit 02aec53

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎qodeassist.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "chat/NavigationPanel.hpp"
4848
#include "settings/GeneralSettings.hpp"
4949
#include "settings/ProjectSettingsPanel.hpp"
50+
#include "settings/SettingsConstants.hpp"
5051

5152
#include "UpdateStatusWidget.hpp"
5253
#include "providers/Providers.hpp"
@@ -77,6 +78,11 @@ class QodeAssistPlugin final : public ExtensionSystem::IPlugin
7778

7879
void initialize() final
7980
{
81+
Core::IOptionsPage::registerCategory(
82+
Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY,
83+
Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY,
84+
":/resources/images/qoderassist-icon.png");
85+
8086
Providers::registerProviders();
8187
Templates::registerTemplates();
8288

‎settings/GeneralSettings.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,6 @@ class GeneralSettingsPage : public Core::IOptionsPage
433433
setId(Constants::QODE_ASSIST_GENERAL_SETTINGS_PAGE_ID);
434434
setDisplayName(TrConstants::GENERAL);
435435
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY);
436-
setDisplayCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY);
437-
setCategoryIconPath(":/resources/images/qoderassist-icon.png");
438436
setSettingsProvider([] { return &generalSettings(); });
439437
}
440438
};

0 commit comments

Comments
 (0)
Please sign in to comment.