Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 1408:c8a6fd3f9dff fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:54 +0000 |
parents | 78eecb19e688 |
children | 232262e38051 |
comparison
equal
deleted
inserted
replaced
1407:05d614f6e46d | 1408:c8a6fd3f9dff |
---|---|
55 | 55 |
56 //#define DEBUG_PROPERTY_BOX 1 | 56 //#define DEBUG_PROPERTY_BOX 1 |
57 | 57 |
58 PropertyBox::PropertyBox(PropertyContainer *container) : | 58 PropertyBox::PropertyBox(PropertyContainer *container) : |
59 m_container(container), | 59 m_container(container), |
60 m_showButton(0), | 60 m_showButton(nullptr), |
61 m_playButton(0) | 61 m_playButton(nullptr) |
62 { | 62 { |
63 #ifdef DEBUG_PROPERTY_BOX | 63 #ifdef DEBUG_PROPERTY_BOX |
64 cerr << "PropertyBox[" << this << "(\"" << | 64 cerr << "PropertyBox[" << this << "(\"" << |
65 container->getPropertyContainerName() << "\" at " << container << ")]::PropertyBox" << endl; | 65 container->getPropertyContainerName() << "\" at " << container << ")]::PropertyBox" << endl; |
66 #endif | 66 #endif |
80 | 80 |
81 m_mainWidget = new QWidget; | 81 m_mainWidget = new QWidget; |
82 m_mainBox->addWidget(m_mainWidget); | 82 m_mainBox->addWidget(m_mainWidget); |
83 m_mainBox->insertStretch(2, 10); | 83 m_mainBox->insertStretch(2, 10); |
84 | 84 |
85 m_viewPlayFrame = 0; | 85 m_viewPlayFrame = nullptr; |
86 populateViewPlayFrame(); | 86 populateViewPlayFrame(); |
87 | 87 |
88 m_layout = new QGridLayout; | 88 m_layout = new QGridLayout; |
89 m_layout->setMargin(0); | 89 m_layout->setMargin(0); |
90 m_layout->setHorizontalSpacing(2); | 90 m_layout->setHorizontalSpacing(2); |
127 cerr << "PropertyBox[" << this << ":" << m_container << "]::populateViewPlayFrame" << endl; | 127 cerr << "PropertyBox[" << this << ":" << m_container << "]::populateViewPlayFrame" << endl; |
128 #endif | 128 #endif |
129 | 129 |
130 if (m_viewPlayFrame) { | 130 if (m_viewPlayFrame) { |
131 delete m_viewPlayFrame; | 131 delete m_viewPlayFrame; |
132 m_viewPlayFrame = 0; | 132 m_viewPlayFrame = nullptr; |
133 } | 133 } |
134 | 134 |
135 if (!m_container) return; | 135 if (!m_container) return; |
136 | 136 |
137 Layer *layer = dynamic_cast<Layer *>(m_container); | 137 Layer *layer = dynamic_cast<Layer *>(m_container); |
642 SVDEBUG << "PropertyBox::propertyControllerChanged(" << name << ", " << value << ")" << endl; | 642 SVDEBUG << "PropertyBox::propertyControllerChanged(" << name << ", " << value << ")" << endl; |
643 #endif | 643 #endif |
644 | 644 |
645 PropertyContainer::PropertyType type = m_container->getPropertyType(name); | 645 PropertyContainer::PropertyType type = m_container->getPropertyType(name); |
646 | 646 |
647 Command *c = 0; | 647 Command *c = nullptr; |
648 | 648 |
649 if (type == PropertyContainer::UnitsProperty) { | 649 if (type == PropertyContainer::UnitsProperty) { |
650 | 650 |
651 NotifyingComboBox *cb = qobject_cast<NotifyingComboBox *>(obj); | 651 NotifyingComboBox *cb = qobject_cast<NotifyingComboBox *>(obj); |
652 if (cb) { | 652 if (cb) { |