Mercurial > hg > svapp
changeset 591:77d33ed8e753
More debug output during startup
author | Chris Cannam |
---|---|
date | Sun, 05 Mar 2017 17:15:46 +0000 |
parents | c196680910dc |
children | 1918bf5c9a9e |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue Feb 28 11:21:32 2017 +0000 +++ b/framework/MainWindowBase.cpp Sun Mar 05 17:15:46 2017 +0000 @@ -164,9 +164,11 @@ { Profiler profiler("MainWindowBase::MainWindowBase"); + SVDEBUG << "MainWindowBase::MainWindowBase" << endl; + if (options & WithAudioInput) { if (!(options & WithAudioOutput)) { - cerr << "WARNING: MainWindowBase: WithAudioInput requires WithAudioOutput -- recording will not work" << endl; + SVCERR << "WARNING: MainWindowBase: WithAudioInput requires WithAudioOutput -- recording will not work" << endl; } } @@ -184,12 +186,16 @@ connect(CommandHistory::getInstance(), SIGNAL(documentRestored()), this, SLOT(documentRestored())); + SVDEBUG << "MainWindowBase: Creating view manager" << endl; + m_viewManager = new ViewManager(); connect(m_viewManager, SIGNAL(selectionChanged()), this, SLOT(updateMenuStates())); connect(m_viewManager, SIGNAL(inProgressSelectionChanged()), this, SLOT(inProgressSelectionChanged())); + SVDEBUG << "MainWindowBase: Calculating view font size" << endl; + // set a sensible default font size for views -- cannot do this // in Preferences, which is in base and not supposed to use QtGui int viewFontSize = int(QApplication::font().pointSize() * 0.9); @@ -199,6 +205,8 @@ settings.setValue("view-font-size", viewFontSize); settings.endGroup(); + SVDEBUG << "MainWindowBase: View font size is " << viewFontSize << endl; + #ifdef NOT_DEFINED // This no longer works correctly on any platform AFAICS Preferences::BackgroundMode mode = Preferences::getInstance()->getBackgroundMode(); @@ -230,11 +238,14 @@ this, SLOT(paneDropAccepted(Pane *, QString))); connect(m_paneStack, SIGNAL(paneDeleteButtonClicked(Pane *)), this, SLOT(paneDeleteButtonClicked(Pane *))); + + SVDEBUG << "MainWindowBase: Creating play source" << endl; m_playSource = new AudioCallbackPlaySource (m_viewManager, QApplication::applicationName()); if (m_soundOptions & WithAudioInput) { + SVDEBUG << "MainWindowBase: Creating record target" << endl; m_recordTarget = new AudioCallbackRecordTarget (m_viewManager, QApplication::applicationName()); connect(m_recordTarget, @@ -244,7 +255,7 @@ } connect(m_playSource, SIGNAL(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool)), - this, SLOT(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool))); + this, SLOT(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool))); connect(m_playSource, SIGNAL(channelCountIncreased(int)), this, SLOT(audioChannelCountIncreased(int))); connect(m_playSource, SIGNAL(audioOverloadPluginDisabled()), @@ -272,6 +283,8 @@ this, SLOT(preferenceChanged(PropertyContainer::PropertyName))); + SVDEBUG << "MainWindowBase: Creating labeller" << endl; + Labeller::ValueType labellerType = Labeller::ValueFromTwoLevelCounter; settings.beginGroup("MainWindow"); @@ -285,10 +298,13 @@ m_labeller->setCounterCycleSize(cycle); if (m_soundOptions & WithMIDIInput) { + SVDEBUG << "MainWindowBase: Creating MIDI input" << endl; m_midiInput = new MIDIInput(QApplication::applicationName(), this); } QTimer::singleShot(1500, this, SIGNAL(hideSplash())); + + SVDEBUG << "MainWindowBase: Constructor done" << endl; } MainWindowBase::~MainWindowBase() @@ -317,12 +333,15 @@ void MainWindowBase::emitHideSplash() { + SVDEBUG << "MainWindowBase: Hiding splash screen" << endl; emit hideSplash(this); } void MainWindowBase::finaliseMenus() { + SVDEBUG << "MainWindowBase::finaliseMenus called" << endl; + delete m_menuShortcutMapper; m_menuShortcutMapper = 0; @@ -348,6 +367,8 @@ foreach (QMenu *menu, menus) { if (menu) finaliseMenu(menu); } + + SVDEBUG << "MainWindowBase::finaliseMenus done" << endl; } void