# HG changeset patch # User Rik # Date 1363125214 25200 # Node ID d07aeecb2d229e07fbe526325ef1b42a82ce44d8 # Parent fe3b9a51e625a4c50c77a3c3a11c5dc243558c12 build: Add more #ifdefs to build GUI when Qscintilla is not present. * libgui/src/m-editor/file-editor-interface.h, libgui/src/m-editor/file-editor-tab.h, libgui/src/m-editor/file-editor.h, libgui/src/m-editor/find-dialog.h, libgui/src/m-editor/lexer-octave-gui.h: Surround entire file with #ifdef HAVE_QSCINTILLA so that generated moc-*.cc file will not be present if Qscintilla is not installed. * libgui/src/main-window.cc: Add #ifdef HAVE_QSCINTILLA around instances of file_editor. diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/m-editor/file-editor-interface.h --- a/libgui/src/m-editor/file-editor-interface.h Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/m-editor/file-editor-interface.h Tue Mar 12 14:53:34 2013 -0700 @@ -23,6 +23,8 @@ #ifndef FILEEDITORINTERFACE_H #define FILEEDITORINTERFACE_H +#ifdef HAVE_QSCINTILLA + #include #include #include "octave-dock-widget.h" @@ -61,4 +63,6 @@ }; -#endif // FILEEDITORINTERFACE_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORINTERFACE_H diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/m-editor/file-editor-tab.h --- a/libgui/src/m-editor/file-editor-tab.h Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/m-editor/file-editor-tab.h Tue Mar 12 14:53:34 2013 -0700 @@ -23,6 +23,8 @@ #ifndef FILEEDITORTAB_H #define FILEEDITORTAB_H +#ifdef HAVE_QSCINTILLA + #include #include #include @@ -156,4 +158,6 @@ QRect _find_dialog_geometry; }; -#endif // FILEEDITORTAB_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORTAB_H diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/m-editor/file-editor.h --- a/libgui/src/m-editor/file-editor.h Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/m-editor/file-editor.h Tue Mar 12 14:53:34 2013 -0700 @@ -23,6 +23,8 @@ #ifndef FILEEDITORMDISUBWINDOW_H #define FILEEDITORMDISUBWINDOW_H +#ifdef HAVE_QSCINTILLA + #include #include #include @@ -154,4 +156,6 @@ }; -#endif // FILEEDITORMDISUBWINDOW_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORMDISUBWINDOW_H diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/m-editor/find-dialog.h --- a/libgui/src/m-editor/find-dialog.h Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/m-editor/find-dialog.h Tue Mar 12 14:53:34 2013 -0700 @@ -42,6 +42,8 @@ #ifndef FIND_DIALOG_H #define FIND_DIALOG_H +#ifdef HAVE_QSCINTILLA + #include #include @@ -86,5 +88,7 @@ bool _find_result_available; }; -#endif // FIND_DIALOG_H +#endif // HAVE_QSCINTILLA +#endif // FIND_DIALOG_H + diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/m-editor/lexer-octave-gui.h --- a/libgui/src/m-editor/lexer-octave-gui.h Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/m-editor/lexer-octave-gui.h Tue Mar 12 14:53:34 2013 -0700 @@ -23,6 +23,8 @@ #ifndef LEXEROCTAVE_H #define LEXEROCTAVE_H +#ifdef HAVE_QSCINTILLA + #include "resource-manager.h" #include #include @@ -63,4 +65,6 @@ QsciAPIs *lexer_api; }; -#endif +#endif // HAVE_QSCINTILLA + +#endif // LEXEROCTAVE_H diff -r fe3b9a51e625 -r d07aeecb2d22 libgui/src/main-window.cc --- a/libgui/src/main-window.cc Tue Mar 12 00:24:54 2013 -0400 +++ b/libgui/src/main-window.cc Tue Mar 12 14:53:34 2013 -0700 @@ -37,7 +37,9 @@ #include #include +#ifdef HAVE_QSCINTILLA #include "file-editor.h" +#endif #include "main-window.h" #include "octave-link.h" #include "settings-dialog.h" @@ -721,7 +723,9 @@ open_action->setShortcut (QKeySequence::Open); open_action->setShortcutContext (Qt::ApplicationShortcut); +#ifdef HAVE_QSCINTILLA file_menu->addMenu(_file_editor->get_mru_menu ()); +#endif QAction *close_command_window_action = file_menu->addAction (tr ("Close Command Window"));