diff libgui/src/octave-main-thread.cc @ 16432:fe4cd846c3e7

separate octave interpreter thread creation from execution * main-window.cc (main_window::construct): Call octave_qt_link::execute_interpreter after all signal connections are made. * libgui/src/module.mk (octave_gui_MOC): Remove src/moc-octave-main-thread.cc from the list. * octave-main-thread.h, octave-main-thread.cc (octave_main_thread::execute_interpreter): New function. Call start. (octave_main_thread::ready): Delete signal and all uses. * octave_qt_link.h, octave_qt_link.cc (octave_qt_link::octave_qt_link): Don't call start for _main_thread. (octave_qt_link::execute_interpreter): New function.
author John W. Eaton <jwe@octave.org>
date Thu, 04 Apr 2013 13:27:21 -0400
parents 5982d469f79b
children
line wrap: on
line diff
--- a/libgui/src/octave-main-thread.cc
+++ b/libgui/src/octave-main-thread.cc
@@ -1,5 +1,6 @@
 /*
 
+Copyright (C) 2013 John W. Eaton
 Copyright (C) 2011-2012 Jacob Dawid
 
 This file is part of Octave.
@@ -35,20 +36,20 @@
 #include "octave-main-thread.h"
 #include "octave-link.h"
 
-octave_main_thread::octave_main_thread () : QThread ()
-{
-}
-
 void
-octave_main_thread::run ()
+octave_main_thread::run (void)
 {
   // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting
   setlocale (LC_NUMERIC, "C");
 
-  emit ready ();
-
   octave_initialize_interpreter (octave_cmdline_argc, octave_cmdline_argv,
                                  octave_embedded);
 
   octave_execute_interpreter ();
 }
+
+void
+octave_main_thread::execute_interpreter (void)
+{
+  start ();
+}