comparison main/MainWindow.cpp @ 433:ae68fc09bf16 debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:56 +0100
parents e1bde903c65c
children 9de86c1b980e
comparison
equal deleted inserted replaced
432:e1bde903c65c 433:ae68fc09bf16
308 this, SLOT(newerVersionAvailable(QString))); 308 this, SLOT(newerVersionAvailable(QString)));
309 } 309 }
310 310
311 MainWindow::~MainWindow() 311 MainWindow::~MainWindow()
312 { 312 {
313 // std::cerr << "MainWindow::~MainWindow" << std::endl; 313 // DEBUG << "MainWindow::~MainWindow" << endl;
314 delete m_keyReference; 314 delete m_keyReference;
315 delete m_preferencesDialog; 315 delete m_preferencesDialog;
316 delete m_layerTreeDialog; 316 delete m_layerTreeDialog;
317 Profiles::getInstance()->dump(); 317 Profiles::getInstance()->dump();
318 // std::cerr << "MainWindow::~MainWindow finishing" << std::endl; 318 // DEBUG << "MainWindow::~MainWindow finishing" << endl;
319 } 319 }
320 320
321 void 321 void
322 MainWindow::setupMenus() 322 MainWindow::setupMenus()
323 { 323 {
1646 void 1646 void
1647 MainWindow::setupExistingLayersMenus() 1647 MainWindow::setupExistingLayersMenus()
1648 { 1648 {
1649 if (!m_existingLayersMenu) return; // should have been created by setupMenus 1649 if (!m_existingLayersMenu) return; // should have been created by setupMenus
1650 1650
1651 // std::cerr << "MainWindow::setupExistingLayersMenu" << std::endl; 1651 // DEBUG << "MainWindow::setupExistingLayersMenu" << endl;
1652 1652
1653 m_existingLayersMenu->clear(); 1653 m_existingLayersMenu->clear();
1654 m_existingLayerActions.clear(); 1654 m_existingLayerActions.clear();
1655 1655
1656 m_sliceMenu->clear(); 1656 m_sliceMenu->clear();
2813 } 2813 }
2814 2814
2815 void 2815 void
2816 MainWindow::closeEvent(QCloseEvent *e) 2816 MainWindow::closeEvent(QCloseEvent *e)
2817 { 2817 {
2818 // std::cerr << "MainWindow::closeEvent" << std::endl; 2818 // DEBUG << "MainWindow::closeEvent" << endl;
2819 2819
2820 if (m_openingAudioFile) { 2820 if (m_openingAudioFile) {
2821 // std::cerr << "Busy - ignoring close event" << std::endl; 2821 // std::cerr << "Busy - ignoring close event" << std::endl;
2822 e->ignore(); 2822 e->ignore();
2823 return; 2823 return;
2824 } 2824 }
2825 2825
2826 if (!m_abandoning && !checkSaveModified()) { 2826 if (!m_abandoning && !checkSaveModified()) {
2827 // std::cerr << "Ignoring close event" << std::endl; 2827 // DEBUG << "Ignoring close event" << endl;
2828 e->ignore(); 2828 e->ignore();
2829 return; 2829 return;
2830 } 2830 }
2831 2831
2832 QSettings settings; 2832 QSettings settings;
3030 } 3030 }
3031 3031
3032 void 3032 void
3033 MainWindow::propertyStacksResized(int width) 3033 MainWindow::propertyStacksResized(int width)
3034 { 3034 {
3035 // std::cerr << "MainWindow::propertyStacksResized(" << width << ")" << std::endl; 3035 // DEBUG << "MainWindow::propertyStacksResized(" << width << ")" << endl;
3036 3036
3037 if (!m_playControlsSpacer) return; 3037 if (!m_playControlsSpacer) return;
3038 3038
3039 int spacerWidth = width - m_playControlsWidth - 4; 3039 int spacerWidth = width - m_playControlsWidth - 4;
3040 3040
3041 // std::cerr << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << std::endl; 3041 // DEBUG << "resizing spacer from " << m_playControlsSpacer->width() << " to " << spacerWidth << endl;
3042 3042
3043 m_playControlsSpacer->setFixedSize(QSize(spacerWidth, 2)); 3043 m_playControlsSpacer->setFixedSize(QSize(spacerWidth, 2));
3044 } 3044 }
3045 3045
3046 void 3046 void
3089 // std::cerr << "no time ruler layer, creating one" << std::endl; 3089 // std::cerr << "no time ruler layer, creating one" << std::endl;
3090 m_timeRulerLayer = m_document->createMainModelLayer 3090 m_timeRulerLayer = m_document->createMainModelLayer
3091 (LayerFactory::TimeRuler); 3091 (LayerFactory::TimeRuler);
3092 } 3092 }
3093 3093
3094 // std::cerr << "adding time ruler layer " << m_timeRulerLayer << std::endl; 3094 // DEBUG << "adding time ruler layer " << m_timeRulerLayer << endl;
3095 3095
3096 m_document->addLayerToView(pane, m_timeRulerLayer); 3096 m_document->addLayerToView(pane, m_timeRulerLayer);
3097 } 3097 }
3098 3098
3099 Layer *newLayer = m_document->createLayer(configuration.layer); 3099 Layer *newLayer = m_document->createLayer(configuration.layer);
3129 m_document->addLayerToView(pane, newLayer); 3129 m_document->addLayerToView(pane, newLayer);
3130 3130
3131 m_paneStack->setCurrentPane(pane); 3131 m_paneStack->setCurrentPane(pane);
3132 m_paneStack->setCurrentLayer(pane, newLayer); 3132 m_paneStack->setCurrentLayer(pane, newLayer);
3133 3133
3134 // std::cerr << "MainWindow::addPane: global centre frame is " 3134 // DEBUG << "MainWindow::addPane: global centre frame is "
3135 // << m_viewManager->getGlobalCentreFrame() << std::endl; 3135 // << m_viewManager->getGlobalCentreFrame() << endl;
3136 // pane->setCentreFrame(m_viewManager->getGlobalCentreFrame()); 3136 // pane->setCentreFrame(m_viewManager->getGlobalCentreFrame());
3137 3137
3138 CommandHistory::getInstance()->endCompoundOperation(); 3138 CommandHistory::getInstance()->endCompoundOperation();
3139 3139
3140 updateMenuStates(); 3140 updateMenuStates();
3336 duration, 3336 duration,
3337 &configurator); 3337 &configurator);
3338 3338
3339 if (!input.getModel()) return; 3339 if (!input.getModel()) return;
3340 3340
3341 // std::cerr << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << std::endl << "transform:" << std::endl << transform.toXmlString() << std::endl; 3341 // DEBUG << "MainWindow::addLayer: Input model is " << input.getModel() << " \"" << input.getModel()->objectName() << "\"" << endl << "transform:" << endl << transform.toXmlString() << endl;
3342 3342
3343 Layer *newLayer = m_document->createDerivedLayer(transform, input); 3343 Layer *newLayer = m_document->createDerivedLayer(transform, input);
3344 3344
3345 if (newLayer) { 3345 if (newLayer) {
3346 m_document->addLayerToView(pane, newLayer); 3346 m_document->addLayerToView(pane, newLayer);
3880 } 3880 }
3881 3881
3882 void 3882 void
3883 MainWindow::rightButtonMenuRequested(Pane *pane, QPoint position) 3883 MainWindow::rightButtonMenuRequested(Pane *pane, QPoint position)
3884 { 3884 {
3885 // std::cerr << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << std::endl; 3885 // DEBUG << "MainWindow::rightButtonMenuRequested(" << pane << ", " << position.x() << ", " << position.y() << ")" << endl;
3886 m_paneStack->setCurrentPane(pane); 3886 m_paneStack->setCurrentPane(pane);
3887 m_rightButtonMenu->popup(position); 3887 m_rightButtonMenu->popup(position);
3888 } 3888 }
3889 3889
3890 void 3890 void