Mercurial > hg > octave-nkf
changeset 16290:d07aeecb2d22
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.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 12 Mar 2013 14:53:34 -0700 |
parents | fe3b9a51e625 |
children | c22a6cecaedd |
files | 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 libgui/src/main-window.cc |
diffstat | 6 files changed, 29 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-interface.h +++ b/libgui/src/m-editor/file-editor-interface.h @@ -23,6 +23,8 @@ #ifndef FILEEDITORINTERFACE_H #define FILEEDITORINTERFACE_H +#ifdef HAVE_QSCINTILLA + #include <QMenu> #include <QToolBar> #include "octave-dock-widget.h" @@ -61,4 +63,6 @@ }; -#endif // FILEEDITORINTERFACE_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORINTERFACE_H
--- a/libgui/src/m-editor/file-editor-tab.h +++ b/libgui/src/m-editor/file-editor-tab.h @@ -23,6 +23,8 @@ #ifndef FILEEDITORTAB_H #define FILEEDITORTAB_H +#ifdef HAVE_QSCINTILLA + #include <Qsci/qsciscintilla.h> #include <QWidget> #include <QCloseEvent> @@ -156,4 +158,6 @@ QRect _find_dialog_geometry; }; -#endif // FILEEDITORTAB_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORTAB_H
--- a/libgui/src/m-editor/file-editor.h +++ b/libgui/src/m-editor/file-editor.h @@ -23,6 +23,8 @@ #ifndef FILEEDITORMDISUBWINDOW_H #define FILEEDITORMDISUBWINDOW_H +#ifdef HAVE_QSCINTILLA + #include <QToolBar> #include <QAction> #include <QMenuBar> @@ -154,4 +156,6 @@ }; -#endif // FILEEDITORMDISUBWINDOW_H +#endif // HAVE_QSCINTILLA + +#endif // FILEEDITORMDISUBWINDOW_H
--- a/libgui/src/m-editor/find-dialog.h +++ b/libgui/src/m-editor/find-dialog.h @@ -42,6 +42,8 @@ #ifndef FIND_DIALOG_H #define FIND_DIALOG_H +#ifdef HAVE_QSCINTILLA + #include <QDialog> #include <Qsci/qsciscintilla.h> @@ -86,5 +88,7 @@ bool _find_result_available; }; -#endif // FIND_DIALOG_H +#endif // HAVE_QSCINTILLA +#endif // FIND_DIALOG_H +
--- a/libgui/src/m-editor/lexer-octave-gui.h +++ b/libgui/src/m-editor/lexer-octave-gui.h @@ -23,6 +23,8 @@ #ifndef LEXEROCTAVE_H #define LEXEROCTAVE_H +#ifdef HAVE_QSCINTILLA + #include "resource-manager.h" #include <QObject> #include <Qsci/qsciglobal.h> @@ -63,4 +65,6 @@ QsciAPIs *lexer_api; }; -#endif +#endif // HAVE_QSCINTILLA + +#endif // LEXEROCTAVE_H
--- a/libgui/src/main-window.cc +++ b/libgui/src/main-window.cc @@ -37,7 +37,9 @@ #include <QMessageBox> #include <QIcon> +#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"));