# HG changeset patch
# User Chris Cannam
# Date 1386861614 0
# Node ID c837368b1faf2cd3727242099eefec0a18deb91f
# Parent  47964f188bd9cb2a75ad5c3783a86db76950a392
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).

diff -r 47964f188bd9 -r c837368b1faf framework/MainWindowBase.cpp
--- 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()) {
diff -r 47964f188bd9 -r c837368b1faf framework/MainWindowBase.h
--- 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;