forked from qt-creator/qt-creator
QmlJSTools: Modernize
modernize-* Change-Id: Ifc270455ab7500d18798ac0130744662ad3303fb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ namespace QmlJSTools {
|
||||
|
||||
const char idKey[] = "QmlJSGlobal";
|
||||
|
||||
static SimpleCodeStylePreferences *m_globalCodeStyle = 0;
|
||||
static SimpleCodeStylePreferences *m_globalCodeStyle = nullptr;
|
||||
|
||||
QmlJSToolsSettings::QmlJSToolsSettings()
|
||||
{
|
||||
@@ -55,7 +55,7 @@ QmlJSToolsSettings::QmlJSToolsSettings()
|
||||
TextEditorSettings::registerCodeStyleFactory(factory);
|
||||
|
||||
// code style pool
|
||||
CodeStylePool *pool = new CodeStylePool(factory, this);
|
||||
auto pool = new CodeStylePool(factory, this);
|
||||
TextEditorSettings::registerCodeStylePool(Constants::QML_JS_SETTINGS_ID, pool);
|
||||
|
||||
// global code style settings
|
||||
@@ -68,7 +68,7 @@ QmlJSToolsSettings::QmlJSToolsSettings()
|
||||
|
||||
// built-in settings
|
||||
// Qt style
|
||||
SimpleCodeStylePreferences *qtCodeStyle = new SimpleCodeStylePreferences();
|
||||
auto qtCodeStyle = new SimpleCodeStylePreferences;
|
||||
qtCodeStyle->setId("qt");
|
||||
qtCodeStyle->setDisplayName(tr("Qt"));
|
||||
qtCodeStyle->setReadOnly(true);
|
||||
@@ -145,7 +145,7 @@ QmlJSToolsSettings::~QmlJSToolsSettings()
|
||||
TextEditorSettings::unregisterCodeStyleFactory(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
|
||||
|
||||
delete m_globalCodeStyle;
|
||||
m_globalCodeStyle = 0;
|
||||
m_globalCodeStyle = nullptr;
|
||||
}
|
||||
|
||||
SimpleCodeStylePreferences *QmlJSToolsSettings::globalCodeStyle()
|
||||
|
||||
Reference in New Issue
Block a user