Mercurial > hg > svgui
diff widgets/PropertyStack.cpp @ 1525:284a38c43721
Debug bits
author | Chris Cannam |
---|---|
date | Fri, 04 Oct 2019 13:37:39 +0100 |
parents | a34a2a25907c |
children | 01a41a37bd26 |
line wrap: on
line diff
--- a/widgets/PropertyStack.cpp Wed Sep 25 14:11:42 2019 +0100 +++ b/widgets/PropertyStack.cpp Fri Oct 04 13:37:39 2019 +0100 @@ -85,15 +85,29 @@ blockSignals(true); #ifdef DEBUG_PROPERTY_STACK - cerr << "PropertyStack[" << this << "]::repopulate" << endl; + SVDEBUG << "PropertyStack[" << this << "]::repopulate" << endl; #endif +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "PropertyStack[" << this << "]::repopulate: removing tabs" << endl; +#endif while (count() > 0) { removeTab(0); } + +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "PropertyStack[" << this << "]::repopulate: deleting boxes" << endl; +#endif for (size_t i = 0; i < m_boxes.size(); ++i) { +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "(" << i << " of " << m_boxes.size() << ": " << m_boxes[i]->getContainer()->getPropertyContainerName() << ")" << endl; +#endif delete m_boxes[i]; } + +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "PropertyStack[" << this << "]::repopulate: done, clearing m_boxes" << endl; +#endif m_boxes.clear(); for (int i = 0; i < m_client->getPropertyContainerCount(); ++i) { @@ -102,9 +116,9 @@ QString name = container->getPropertyContainerName(); #ifdef DEBUG_PROPERTY_STACK - cerr << "PropertyStack[" << this << "]::repopulate: client " << m_client - << " returns container " << container << " (name " << name - << ") at position " << i << endl; + SVDEBUG << "PropertyStack[" << this << "]::repopulate: client " << m_client + << " returns container " << container << " (name " << name + << ") at position " << i << endl; #endif PropertyBox *box = new PropertyBox(container); @@ -183,16 +197,30 @@ } void -PropertyStack::propertyContainerAdded(PropertyContainer *) +PropertyStack::propertyContainerAdded(PropertyContainer * +#ifdef DEBUG_PROPERTY_STACK + c +#endif + ) { if (sender() != m_client) return; +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "PropertyStack::propertyContainerAdded(" << (c ? c->getPropertyContainerName() : "(none)") << ")" << endl; +#endif repopulate(); } void -PropertyStack::propertyContainerRemoved(PropertyContainer *) +PropertyStack::propertyContainerRemoved(PropertyContainer * +#ifdef DEBUG_PROPERTY_STACK + c +#endif + ) { if (sender() != m_client) return; +#ifdef DEBUG_PROPERTY_STACK + SVDEBUG << "PropertyStack::propertyContainerAdded(" << (c ? c->getPropertyContainerName() : "(none)") << ")" << endl; +#endif repopulate(); }