Mercurial > hg > svgui
diff view/PaneStack.cpp @ 1408:c8a6fd3f9dff fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:54 +0000 |
parents | d79e21855aef |
children | 8e6a24110996 |
line wrap: on
line diff
--- a/view/PaneStack.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/PaneStack.cpp Mon Nov 26 14:33:54 2018 +0000 @@ -39,7 +39,7 @@ PaneStack::PaneStack(QWidget *parent, ViewManager *viewManager) : QFrame(parent), - m_currentPane(0), + m_currentPane(nullptr), m_showAccessories(true), m_showAlignmentViews(false), m_splitter(new QSplitter), @@ -129,7 +129,7 @@ av->setViewManager(m_viewManager); layout->addWidget(av, 2, 1); - QWidget *properties = 0; + QWidget *properties = nullptr; if (suppressPropertyBox) { properties = new QFrame(); } else { @@ -198,7 +198,7 @@ if (i + 1 < (int)m_panes.size()) { m_panes[i].alignmentView->setViewBelow(m_panes[i+1].pane); } else { - m_panes[i].alignmentView->setViewBelow(0); + m_panes[i].alignmentView->setViewBelow(nullptr); } } } @@ -207,8 +207,8 @@ PaneStack::unlinkAlignmentViews() { for (int i = 0; i < (int)m_panes.size(); ++i) { - m_panes[i].alignmentView->setViewAbove(0); - m_panes[i].alignmentView->setViewBelow(0); + m_panes[i].alignmentView->setViewAbove(nullptr); + m_panes[i].alignmentView->setViewBelow(nullptr); } } @@ -262,7 +262,7 @@ if (n < (int)m_panes.size()) { return m_panes[n].pane; } else { - return 0; + return nullptr; } } @@ -293,7 +293,7 @@ std::vector<PaneRec>::iterator i; bool found = false; - QWidget *stack = 0; + QWidget *stack = nullptr; for (i = m_panes.begin(); i != m_panes.end(); ++i) { if (i->pane == pane) { @@ -344,7 +344,7 @@ if (m_panes.size() > 0) { setCurrentPane(m_panes[0].pane); } else { - setCurrentPane(0); + setCurrentPane(nullptr); } } @@ -399,7 +399,7 @@ if (m_panes.size() > 0) { setCurrentPane(m_panes[0].pane); } else { - setCurrentPane(0); + setCurrentPane(nullptr); } } @@ -474,7 +474,7 @@ ++i; } - if (found || pane == 0) { + if (found || pane == nullptr) { m_currentPane = pane; emit currentPaneChanged(m_currentPane); } else { @@ -504,7 +504,7 @@ stack->setCurrentIndex (stack->getContainerIndex (pane->getPropertyContainer(0))); - emit currentLayerChanged(pane, 0); + emit currentLayerChanged(pane, nullptr); } } break; @@ -550,7 +550,7 @@ Layer *layer = dynamic_cast<Layer *>(pc); if (layer) emit currentLayerChanged(m_currentPane, layer); - else emit currentLayerChanged(m_currentPane, 0); + else emit currentLayerChanged(m_currentPane, nullptr); } void