diff gui/src/backend/OctaveLink.cpp @ 14668:6a6733a55982 gui

Removed unused classes and added octave loop hook. * OctaveGUI.cpp: Removed header for command line parsing and command line parser. * WorkspaceModel: Optimized updated the model from the symbol table by passing pointers instead of copying. * OctaveLink: Removed polling thread. * src.pro: Removed deleted files. * OctaveCallbackThread: Not used anymore, hence removed. * CommandLineParser: Not used anymore, hence removed. * ReadlineAdapter: Not used anymore, hence removed.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Tue, 22 May 2012 09:13:46 +0200
parents 664f54233c98
children 7605e7136b50
line wrap: on
line diff
--- a/gui/src/backend/OctaveLink.cpp	Sun May 20 22:05:49 2012 +0200
+++ b/gui/src/backend/OctaveLink.cpp	Tue May 22 09:13:46 2012 +0200
@@ -17,6 +17,13 @@
 
 #include "OctaveLink.h"
 
+void octave_loop_hook_impl()
+{
+  OctaveLink::instance()->triggerUpdateHistoryModel();
+  OctaveLink::instance()->triggerUpdateSymbolTable();
+}
+
+
 OctaveLink OctaveLink::m_singleton;
 
 OctaveLink::OctaveLink ():QObject ()
@@ -39,10 +46,7 @@
 {
   // Create both threads.
   m_octaveMainThread = new OctaveMainThread (this);
-  m_octaveCallbackThread = new OctaveCallbackThread (this);
-
-  // Launch the second as soon as the first ist ready.
-  connect (m_octaveMainThread, SIGNAL (ready ()), m_octaveCallbackThread, SLOT (start ()));
+  octave_loop_hook = octave_loop_hook_impl;
 
   // Start the first one.
   m_octaveMainThread->start ();
@@ -51,11 +55,8 @@
 void
 OctaveLink::terminateOctave ()
 {
-  m_octaveCallbackThread->halt ();
-  m_octaveCallbackThread->wait ();
-
   m_octaveMainThread->terminate ();
-  //m_octaveMainThread->wait();
+  m_octaveMainThread->wait();
 }
 
 void