# HG changeset patch # User Stefan Mahr # Date 1425048298 18000 # Node ID c7c50030e76c6110ca47571e785f8699f68cbb95 # Parent 6ba3d0f7c6e8cc4edafceafdf8c901d75c87aa1c 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. diff -r 6ba3d0f7c6e8 -r c7c50030e76c libgui/src/main-window.cc --- 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 (); } diff -r 6ba3d0f7c6e8 -r c7c50030e76c libgui/src/octave-gui.cc --- 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);