Mercurial > hg > svapp
changeset 304:c837368b1faf
Remove OSC option from constructor -- call startOSCQueue() after construction if you want it.
This needs to be handled this way in SV because we need to ask for network permission before opening the OSC port (that's the thing that gets the app blocked by e.g. Windows Firewall).
author | Chris Cannam |
---|---|
date | Thu, 12 Dec 2013 15:20:14 +0000 |
parents | 47964f188bd9 |
children | 28c17ce7a6e9 46b24009ce7a |
files | framework/MainWindowBase.cpp framework/MainWindowBase.h |
diffstat | 2 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue Dec 03 12:35:39 2013 +0000 +++ b/framework/MainWindowBase.cpp Thu Dec 12 15:20:14 2013 +0000 @@ -131,7 +131,6 @@ #endif MainWindowBase::MainWindowBase(bool withAudioOutput, - bool withOSCSupport, bool withMIDIInput) : m_document(0), m_paneStack(0), @@ -252,12 +251,6 @@ if (withMIDIInput) { m_midiInput = new MIDIInput(QApplication::applicationName(), this); } - - if (withOSCSupport) { - m_oscQueueStarter = new OSCQueueStarter(this); - connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); - m_oscQueueStarter->start(); - } } MainWindowBase::~MainWindowBase() @@ -268,6 +261,7 @@ delete m_playSource; delete m_viewManager; delete m_oscQueue; + delete m_oscQueueStarter; delete m_midiInput; Profiles::getInstance()->dump(); } @@ -283,6 +277,14 @@ } void +MainWindowBase::startOSCQueue() +{ + m_oscQueueStarter = new OSCQueueStarter(this); + connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); + m_oscQueueStarter->start(); +} + +void MainWindowBase::oscReady() { if (m_oscQueue && m_oscQueue->isOK()) {
--- a/framework/MainWindowBase.h Tue Dec 03 12:35:39 2013 +0000 +++ b/framework/MainWindowBase.h Thu Dec 12 15:20:14 2013 +0000 @@ -75,7 +75,7 @@ Q_OBJECT public: - MainWindowBase(bool withAudioOutput, bool withOSCSupport, bool withMIDIInput); + MainWindowBase(bool withAudioOutput, bool withMIDIInput); virtual ~MainWindowBase(); enum AudioFileOpenMode { @@ -309,6 +309,7 @@ OSCQueue *m_oscQueue; OSCQueueStarter *m_oscQueueStarter; + void startOSCQueue(); MIDIInput *m_midiInput;