From f36f04debabcf839a50c73e47202b24527e89ece Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Sat, 21 Jul 2018 21:11:46 +0200 Subject: Core: Modernize modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init (partially) Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/rightpane.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/plugins/coreplugin/rightpane.cpp') diff --git a/src/plugins/coreplugin/rightpane.cpp b/src/plugins/coreplugin/rightpane.cpp index 4c139cb284..e786051d04 100644 --- a/src/plugins/coreplugin/rightpane.cpp +++ b/src/plugins/coreplugin/rightpane.cpp @@ -38,7 +38,7 @@ using namespace Core; using namespace Core::Internal; -RightPanePlaceHolder *RightPanePlaceHolder::m_current = 0; +RightPanePlaceHolder *RightPanePlaceHolder::m_current = nullptr; RightPanePlaceHolder* RightPanePlaceHolder::current() { @@ -57,7 +57,7 @@ RightPanePlaceHolder::RightPanePlaceHolder(Id mode, QWidget *parent) RightPanePlaceHolder::~RightPanePlaceHolder() { if (m_current == this) { - RightPaneWidget::instance()->setParent(0); + RightPaneWidget::instance()->setParent(nullptr); RightPaneWidget::instance()->hide(); } } @@ -65,7 +65,7 @@ RightPanePlaceHolder::~RightPanePlaceHolder() void RightPanePlaceHolder::applyStoredSize(int width) { if (width) { - QSplitter *splitter = qobject_cast(parentWidget()); + auto splitter = qobject_cast(parentWidget()); if (splitter) { // A splitter we need to resize the splitter sizes QList sizes = splitter->sizes(); @@ -95,8 +95,8 @@ void RightPanePlaceHolder::applyStoredSize(int width) void RightPanePlaceHolder::currentModeChanged(Id mode) { if (m_current == this) { - m_current = 0; - RightPaneWidget::instance()->setParent(0); + m_current = nullptr; + RightPaneWidget::instance()->setParent(nullptr); RightPaneWidget::instance()->hide(); } if (m_mode == mode) { @@ -117,14 +117,13 @@ void RightPanePlaceHolder::currentModeChanged(Id mode) ///// -RightPaneWidget *RightPaneWidget::m_instance = 0; +RightPaneWidget *RightPaneWidget::m_instance = nullptr; RightPaneWidget::RightPaneWidget() - : m_shown(true), m_width(0) { m_instance = this; - QVBoxLayout *layout = new QVBoxLayout; + auto layout = new QVBoxLayout; layout->setMargin(0); setLayout(layout); } @@ -132,7 +131,7 @@ RightPaneWidget::RightPaneWidget() RightPaneWidget::~RightPaneWidget() { clearWidget(); - m_instance = 0; + m_instance = nullptr; } RightPaneWidget *RightPaneWidget::instance() @@ -207,7 +206,7 @@ void RightPaneWidget::clearWidget() { if (m_widget) { m_widget->hide(); - m_widget->setParent(0); - m_widget = 0; + m_widget->setParent(nullptr); + m_widget = nullptr; } } -- cgit v1.2.1