aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cppqtstyleindenter.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-01-14 01:40:53 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2019-01-21 09:00:18 +0000
commit1d3d18a96988eb091b207103f18c9fbba505013a (patch)
treeea96a5524d5dbda96447455a9152484e54ea6e3b /src/plugins/cpptools/cppqtstyleindenter.cpp
parent845af928896ba1ef1bb7259766913ea7f4c35cd9 (diff)
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/cppqtstyleindenter.cpp')
-rw-r--r--src/plugins/cpptools/cppqtstyleindenter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp
index 2c8f06336fa..54cb3cc9edd 100644
--- a/src/plugins/cpptools/cppqtstyleindenter.cpp
+++ b/src/plugins/cpptools/cppqtstyleindenter.cpp
@@ -37,15 +37,13 @@
using namespace CppTools;
CppQtStyleIndenter::CppQtStyleIndenter()
- : m_cppCodeStylePreferences(0)
{
// Just for safety. setCodeStylePreferences should be called when the editor the
// indenter belongs to gets initialized.
m_cppCodeStylePreferences = CppToolsSettings::instance()->cppCodeStyle();
}
-CppQtStyleIndenter::~CppQtStyleIndenter()
-{}
+CppQtStyleIndenter::~CppQtStyleIndenter() = default;
bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const
{
@@ -157,8 +155,7 @@ void CppQtStyleIndenter::indent(QTextDocument *doc,
void CppQtStyleIndenter::setCodeStylePreferences(TextEditor::ICodeStylePreferences *preferences)
{
- CppCodeStylePreferences *cppCodeStylePreferences
- = qobject_cast<CppCodeStylePreferences *>(preferences);
+ auto cppCodeStylePreferences = qobject_cast<CppCodeStylePreferences *>(preferences);
if (cppCodeStylePreferences)
m_cppCodeStylePreferences = cppCodeStylePreferences;
}