forked from qt-creator/qt-creator
CppTools: Make CppCodeStyleSettingsPage a plugin pimpl member
Change-Id: I75f90ddbb3cb1f2dbded16c8b6eb6d6c9bbc9f50 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -345,8 +345,7 @@ void CppCodeStylePreferencesWidget::setVisualizeWhitespace(bool on)
|
|||||||
|
|
||||||
// ------------------ CppCodeStyleSettingsPage
|
// ------------------ CppCodeStyleSettingsPage
|
||||||
|
|
||||||
CppCodeStyleSettingsPage::CppCodeStyleSettingsPage(QWidget *parent)
|
CppCodeStyleSettingsPage::CppCodeStyleSettingsPage()
|
||||||
: Core::IOptionsPage(parent)
|
|
||||||
{
|
{
|
||||||
setId(Constants::CPP_CODE_STYLE_SETTINGS_ID);
|
setId(Constants::CPP_CODE_STYLE_SETTINGS_ID);
|
||||||
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME));
|
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME));
|
||||||
|
@@ -80,10 +80,8 @@ private:
|
|||||||
|
|
||||||
class CppCodeStyleSettingsPage : public Core::IOptionsPage
|
class CppCodeStyleSettingsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CppCodeStyleSettingsPage(QWidget *parent = nullptr);
|
CppCodeStyleSettingsPage();
|
||||||
|
|
||||||
QWidget *widget() override;
|
QWidget *widget() override;
|
||||||
void apply() override;
|
void apply() override;
|
||||||
|
@@ -83,13 +83,10 @@ public:
|
|||||||
CppToolsPluginPrivate()
|
CppToolsPluginPrivate()
|
||||||
{
|
{
|
||||||
m_codeModelSettings.fromSettings(ICore::settings());
|
m_codeModelSettings.fromSettings(ICore::settings());
|
||||||
m_cppCodeStyleSettingsPage = new CppCodeStyleSettingsPage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~CppToolsPluginPrivate()
|
~CppToolsPluginPrivate()
|
||||||
{
|
{
|
||||||
if (m_cppCodeStyleSettingsPage)
|
|
||||||
delete m_cppCodeStyleSettingsPage;
|
|
||||||
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +97,7 @@ public:
|
|||||||
CppFileSettings m_fileSettings;
|
CppFileSettings m_fileSettings;
|
||||||
CppFileSettingsPage m_cppFileSettingsPage{&m_fileSettings};
|
CppFileSettingsPage m_cppFileSettingsPage{&m_fileSettings};
|
||||||
CppCodeModelSettingsPage m_cppCodeModelSettingsPage{&m_codeModelSettings};
|
CppCodeModelSettingsPage m_cppCodeModelSettingsPage{&m_codeModelSettings};
|
||||||
QPointer<CppCodeStyleSettingsPage> m_cppCodeStyleSettingsPage = nullptr;
|
CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage;
|
||||||
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user