diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2019-01-14 01:40:53 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2019-01-21 09:00:18 +0000 |
commit | 1d3d18a96988eb091b207103f18c9fbba505013a (patch) | |
tree | ea96a5524d5dbda96447455a9152484e54ea6e3b /src/plugins/cpptools/cppcodestylepreferencesfactory.cpp | |
parent | 845af928896ba1ef1bb7259766913ea7f4c35cd9 (diff) | |
download | qt-creator-1d3d18a96988eb091b207103f18c9fbba505013a.tar.gz |
CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cpptools/cppcodestylepreferencesfactory.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodestylepreferencesfactory.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp index 6eb401f3ec..00da046edc 100644 --- a/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp +++ b/src/plugins/cpptools/cppcodestylepreferencesfactory.cpp @@ -82,9 +82,7 @@ static const char *defaultPreviewText = ; -CppCodeStylePreferencesFactory::CppCodeStylePreferencesFactory() -{ -} +CppCodeStylePreferencesFactory::CppCodeStylePreferencesFactory() = default; Core::Id CppCodeStylePreferencesFactory::languageId() { @@ -104,10 +102,10 @@ TextEditor::ICodeStylePreferences *CppCodeStylePreferencesFactory::createCodeSty QWidget *CppCodeStylePreferencesFactory::createEditor(TextEditor::ICodeStylePreferences *preferences, QWidget *parent) const { - CppCodeStylePreferences *cppPreferences = qobject_cast<CppCodeStylePreferences *>(preferences); + auto cppPreferences = qobject_cast<CppCodeStylePreferences *>(preferences); if (!cppPreferences) - return 0; - Internal::CppCodeStylePreferencesWidget *widget = new Internal::CppCodeStylePreferencesWidget(parent); + return nullptr; + auto widget = new Internal::CppCodeStylePreferencesWidget(parent); widget->layout()->setMargin(0); widget->setCodeStyle(cppPreferences); return widget; |