forked from qt-creator/qt-creator
CppEditor: Hide CppFileSettingsPage class in .cpp
Change-Id: Ic095d7d45681a1970fb8362667f50d632ee6d3e5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -180,7 +180,6 @@ public:
|
||||
|
||||
CppModelManager modelManager;
|
||||
CppToolsSettings settings;
|
||||
CppFileSettingsPage m_cppFileSettingsPage;
|
||||
CppCodeModelSettingsPage m_cppCodeModelSettingsPage;
|
||||
CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage;
|
||||
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
||||
|
@@ -452,13 +452,17 @@ void CppFileSettingsWidget::slotEdit()
|
||||
|
||||
// CppFileSettingsPage
|
||||
|
||||
CppFileSettingsPage::CppFileSettingsPage()
|
||||
class CppFileSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
setId(Constants::CPP_FILE_SETTINGS_ID);
|
||||
setDisplayName(Tr::tr("File Naming"));
|
||||
setCategory(Constants::CPP_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new CppFileSettingsWidget(&globalCppFileSettings()); });
|
||||
}
|
||||
public:
|
||||
CppFileSettingsPage()
|
||||
{
|
||||
setId(Constants::CPP_FILE_SETTINGS_ID);
|
||||
setDisplayName(Tr::tr("File Naming"));
|
||||
setCategory(Constants::CPP_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new CppFileSettingsWidget(&globalCppFileSettings()); });
|
||||
}
|
||||
};
|
||||
|
||||
CppFileSettingsForProject::CppFileSettingsForProject(ProjectExplorer::Project *project)
|
||||
: m_project(project)
|
||||
@@ -606,6 +610,8 @@ void setupCppFileSettings()
|
||||
{
|
||||
static CppFileSettingsProjectPanelFactory theCppFileSettingsProjectPanelFactory;
|
||||
|
||||
static CppFileSettingsPage theCppFileSettingsPage;
|
||||
|
||||
globalCppFileSettings().fromSettings(Core::ICore::settings());
|
||||
globalCppFileSettings().addMimeInitializer();
|
||||
}
|
||||
|
@@ -67,12 +67,6 @@ private:
|
||||
bool m_useGlobalSettings = true;
|
||||
};
|
||||
|
||||
class CppFileSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
CppFileSettingsPage();
|
||||
};
|
||||
|
||||
CppFileSettings &globalCppFileSettings();
|
||||
|
||||
void setupCppFileSettings();
|
||||
|
Reference in New Issue
Block a user