QmlJSTools: Modernize

modernize-*

Change-Id: Ifc270455ab7500d18798ac0130744662ad3303fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2018-11-24 10:22:37 +01:00
parent cd9ab31093
commit 134bb1b8b6
17 changed files with 56 additions and 73 deletions

View File

@@ -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()