diff framework/MainWindowBase.cpp @ 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 933b5aed341a
children 28c17ce7a6e9
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()) {