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;
|
CppModelManager modelManager;
|
||||||
CppToolsSettings settings;
|
CppToolsSettings settings;
|
||||||
CppFileSettingsPage m_cppFileSettingsPage;
|
|
||||||
CppCodeModelSettingsPage m_cppCodeModelSettingsPage;
|
CppCodeModelSettingsPage m_cppCodeModelSettingsPage;
|
||||||
CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage;
|
CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage;
|
||||||
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
CppProjectUpdaterFactory m_cppProjectUpdaterFactory;
|
||||||
|
@@ -452,13 +452,17 @@ void CppFileSettingsWidget::slotEdit()
|
|||||||
|
|
||||||
// CppFileSettingsPage
|
// CppFileSettingsPage
|
||||||
|
|
||||||
CppFileSettingsPage::CppFileSettingsPage()
|
class CppFileSettingsPage final : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
setId(Constants::CPP_FILE_SETTINGS_ID);
|
public:
|
||||||
setDisplayName(Tr::tr("File Naming"));
|
CppFileSettingsPage()
|
||||||
setCategory(Constants::CPP_SETTINGS_CATEGORY);
|
{
|
||||||
setWidgetCreator([] { return new CppFileSettingsWidget(&globalCppFileSettings()); });
|
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)
|
CppFileSettingsForProject::CppFileSettingsForProject(ProjectExplorer::Project *project)
|
||||||
: m_project(project)
|
: m_project(project)
|
||||||
@@ -606,6 +610,8 @@ void setupCppFileSettings()
|
|||||||
{
|
{
|
||||||
static CppFileSettingsProjectPanelFactory theCppFileSettingsProjectPanelFactory;
|
static CppFileSettingsProjectPanelFactory theCppFileSettingsProjectPanelFactory;
|
||||||
|
|
||||||
|
static CppFileSettingsPage theCppFileSettingsPage;
|
||||||
|
|
||||||
globalCppFileSettings().fromSettings(Core::ICore::settings());
|
globalCppFileSettings().fromSettings(Core::ICore::settings());
|
||||||
globalCppFileSettings().addMimeInitializer();
|
globalCppFileSettings().addMimeInitializer();
|
||||||
}
|
}
|
||||||
|
@@ -67,12 +67,6 @@ private:
|
|||||||
bool m_useGlobalSettings = true;
|
bool m_useGlobalSettings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CppFileSettingsPage : public Core::IOptionsPage
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CppFileSettingsPage();
|
|
||||||
};
|
|
||||||
|
|
||||||
CppFileSettings &globalCppFileSettings();
|
CppFileSettings &globalCppFileSettings();
|
||||||
|
|
||||||
void setupCppFileSettings();
|
void setupCppFileSettings();
|
||||||
|
Reference in New Issue
Block a user