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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user