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(QWidget *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
CppCodeStyleSettingsPage::CppCodeStyleSettingsPage()
|
||||
{
|
||||
setId(Constants::CPP_CODE_STYLE_SETTINGS_ID);
|
||||
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME));
|
||||
|
@@ -80,10 +80,8 @@ private:
|
||||
|
||||
class CppCodeStyleSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CppCodeStyleSettingsPage(QWidget *parent = nullptr);
|
||||
CppCodeStyleSettingsPage();
|
||||
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
|
@@ -83,13 +83,10 @@ public:
|
||||
CppToolsPluginPrivate()
|
||||
{
|
||||
m_codeModelSettings.fromSettings(ICore::settings());
|
||||
m_cppCodeStyleSettingsPage = new CppCodeStyleSettingsPage;
|
||||
}
|
||||
|
||||
~CppToolsPluginPrivate()
|
||||
{
|
||||
if (m_cppCodeStyleSettingsPage)
|
||||
delete m_cppCodeStyleSettingsPage;
|
||||
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
||||
}
|
||||
|
||||
@@ -100,7 +97,7 @@ public:
|
||||
CppFileSettings m_fileSettings;
|
||||
CppFileSettingsPage m_cppFileSettingsPage{&m_fileSettings};
|
||||
CppCodeModelSettingsPage m_cppCodeModelSettingsPage{&m_codeModelSettings};
|
||||
QPointer<CppCodeStyleSettingsPage> m_cppCodeStyleSettingsPage = nullptr;
|
||||
CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage;
|
||||
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user