changeset 19902:c7c50030e76c

allow qt graphics toolkit to be used in --no-gui mode (bug #44116) * octave-gui.cc (octave_start_gui): Install Qt plot functions and register the qt plot toolkit here. * main-window.cc (main_window::construct): Not here.
author Stefan Mahr <dac922@gmx.de>
date Fri, 27 Feb 2015 09:44:58 -0500
parents 6ba3d0f7c6e8
children 781adfc2958c 60fe3ef12bb0
files libgui/src/main-window.cc libgui/src/octave-gui.cc
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Thu Feb 26 19:24:59 2015 -0500
+++ b/libgui/src/main-window.cc	Fri Feb 27 09:44:58 2015 -0500
@@ -53,13 +53,10 @@
 #include "settings-dialog.h"
 #include "shortcut-manager.h"
 
-#include "__init_qt__.h"
-
 #include "Array.h"
 #include "cmd-edit.h"
 #include "url-transfer.h"
 
-#include "builtin-defun-decls.h"
 #include "defaults.h"
 #include "symtab.h"
 #include "version.h"
@@ -1387,10 +1384,6 @@
 
   octave_link::post_event (this, &main_window::resize_command_window_callback);
 
-  install___init_qt___functions ();
-
-  Fregister_graphics_toolkit (ovl ("qt"));
-
   configure_shortcuts ();
 }
 
--- a/libgui/src/octave-gui.cc	Thu Feb 26 19:24:59 2015 -0500
+++ b/libgui/src/octave-gui.cc	Fri Feb 27 09:44:58 2015 -0500
@@ -53,6 +53,9 @@
 #include "octave-gui.h"
 #include "thread-manager.h"
 
+#include "builtin-defun-decls.h"
+#include "__init_qt__.h"
+
 // Allow the Octave interpreter to start as in CLI mode with a
 // QApplication context so that it can use Qt for things like plotting
 // and UI widgets.
@@ -107,6 +110,10 @@
   if (show_gui_msgs.empty ())
     qInstallMsgHandler (message_handler);
 
+  install___init_qt___functions ();
+
+  Fregister_graphics_toolkit (ovl ("qt"));
+
   if (start_gui)
     {
       QApplication application (argc, argv);