mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-03 09:08:21 -04:00
fix: Make plugin registration be compatible with Qt Creator 16 (#80)
This introduces changes needed after the following commit in Qt Creator:
ba5e4b7eff
Core: Provide settings categories centrally
This commit is contained in:
parent
d8a01504a3
commit
ca0fb5efbb
@ -43,10 +43,12 @@
|
|||||||
|
|
||||||
#include "ConfigurationManager.hpp"
|
#include "ConfigurationManager.hpp"
|
||||||
#include "QodeAssistClient.hpp"
|
#include "QodeAssistClient.hpp"
|
||||||
|
#include "Version.hpp"
|
||||||
#include "chat/ChatOutputPane.h"
|
#include "chat/ChatOutputPane.h"
|
||||||
#include "chat/NavigationPanel.hpp"
|
#include "chat/NavigationPanel.hpp"
|
||||||
#include "settings/GeneralSettings.hpp"
|
#include "settings/GeneralSettings.hpp"
|
||||||
#include "settings/ProjectSettingsPanel.hpp"
|
#include "settings/ProjectSettingsPanel.hpp"
|
||||||
|
#include "settings/SettingsConstants.hpp"
|
||||||
|
|
||||||
#include "UpdateStatusWidget.hpp"
|
#include "UpdateStatusWidget.hpp"
|
||||||
#include "providers/Providers.hpp"
|
#include "providers/Providers.hpp"
|
||||||
@ -77,6 +79,13 @@ public:
|
|||||||
|
|
||||||
void initialize() final
|
void initialize() final
|
||||||
{
|
{
|
||||||
|
#if QODEASSIST_QT_CREATOR_VERSION >= QT_VERSION_CHECK(15, 0, 83)
|
||||||
|
Core::IOptionsPage::registerCategory(
|
||||||
|
Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY,
|
||||||
|
Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY,
|
||||||
|
":/resources/images/qoderassist-icon.png");
|
||||||
|
#endif
|
||||||
|
|
||||||
Providers::registerProviders();
|
Providers::registerProviders();
|
||||||
Templates::registerTemplates();
|
Templates::registerTemplates();
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "SettingsTr.hpp"
|
#include "SettingsTr.hpp"
|
||||||
#include "SettingsUtils.hpp"
|
#include "SettingsUtils.hpp"
|
||||||
#include "UpdateDialog.hpp"
|
#include "UpdateDialog.hpp"
|
||||||
|
#include "../Version.hpp"
|
||||||
|
|
||||||
namespace QodeAssist::Settings {
|
namespace QodeAssist::Settings {
|
||||||
|
|
||||||
@ -444,8 +445,10 @@ public:
|
|||||||
setId(Constants::QODE_ASSIST_GENERAL_SETTINGS_PAGE_ID);
|
setId(Constants::QODE_ASSIST_GENERAL_SETTINGS_PAGE_ID);
|
||||||
setDisplayName(TrConstants::GENERAL);
|
setDisplayName(TrConstants::GENERAL);
|
||||||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY);
|
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY);
|
||||||
|
#if QODEASSIST_QT_CREATOR_VERSION < QT_VERSION_CHECK(15, 0, 83)
|
||||||
setDisplayCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY);
|
setDisplayCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY);
|
||||||
setCategoryIconPath(":/resources/images/qoderassist-icon.png");
|
setCategoryIconPath(":/resources/images/qoderassist-icon.png");
|
||||||
|
#endif
|
||||||
setSettingsProvider([] { return &generalSettings(); });
|
setSettingsProvider([] { return &generalSettings(); });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user