forked from qt-creator/qt-creator
CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -55,18 +55,14 @@ namespace Internal {
|
||||
class CppToolsSettingsPrivate
|
||||
{
|
||||
public:
|
||||
CppToolsSettingsPrivate()
|
||||
: m_globalCodeStyle(0)
|
||||
{}
|
||||
|
||||
CommentsSettings m_commentsSettings;
|
||||
CppCodeStylePreferences *m_globalCodeStyle;
|
||||
CppCodeStylePreferences *m_globalCodeStyle = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CppTools
|
||||
|
||||
CppToolsSettings *CppToolsSettings::m_instance = 0;
|
||||
CppToolsSettings *CppToolsSettings::m_instance = nullptr;
|
||||
|
||||
CppToolsSettings::CppToolsSettings(QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -86,7 +82,7 @@ CppToolsSettings::CppToolsSettings(QObject *parent)
|
||||
TextEditorSettings::registerCodeStyleFactory(factory);
|
||||
|
||||
// code style pool
|
||||
CodeStylePool *pool = new CodeStylePool(factory, this);
|
||||
auto pool = new CodeStylePool(factory, this);
|
||||
TextEditorSettings::registerCodeStylePool(Constants::CPP_SETTINGS_ID, pool);
|
||||
|
||||
// global code style settings
|
||||
@@ -124,7 +120,7 @@ CppToolsSettings::CppToolsSettings(QObject *parent)
|
||||
|
||||
// built-in settings
|
||||
// Qt style
|
||||
CppCodeStylePreferences *qtCodeStyle = new CppCodeStylePreferences();
|
||||
auto qtCodeStyle = new CppCodeStylePreferences;
|
||||
qtCodeStyle->setId("qt");
|
||||
qtCodeStyle->setDisplayName(tr("Qt"));
|
||||
qtCodeStyle->setReadOnly(true);
|
||||
@@ -137,7 +133,7 @@ CppToolsSettings::CppToolsSettings(QObject *parent)
|
||||
pool->addCodeStyle(qtCodeStyle);
|
||||
|
||||
// GNU style
|
||||
CppCodeStylePreferences *gnuCodeStyle = new CppCodeStylePreferences();
|
||||
auto gnuCodeStyle = new CppCodeStylePreferences;
|
||||
gnuCodeStyle->setId("gnu");
|
||||
gnuCodeStyle->setDisplayName(tr("GNU"));
|
||||
gnuCodeStyle->setReadOnly(true);
|
||||
@@ -227,7 +223,7 @@ CppToolsSettings::~CppToolsSettings()
|
||||
|
||||
delete d;
|
||||
|
||||
m_instance = 0;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
|
||||
CppToolsSettings *CppToolsSettings::instance()
|
||||
|
||||
Reference in New Issue
Block a user