Mercurial > hg > octave-lyh
changeset 16667:7f6f0b3f7369
Allow build to continue without QScintilla lexer for Octave
Needed for changeset 72665c4ae25b.
* settings-dialog.cc: Include Qsci/qscilexeroctave.h if it is
available, otherwise include Qsci/qscilexermatlab.h if it is
available.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 16 May 2013 13:50:26 +0800 |
parents | af7287d567dc |
children | 0c9aaceadc33 |
files | libgui/src/settings-dialog.cc |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc +++ b/libgui/src/settings-dialog.cc @@ -35,7 +35,14 @@ #ifdef HAVE_QSCINTILLA #include <QScrollArea> + +#if defined (HAVE_QSCI_QSCILEXEROCTAVE_H) +//#define HAVE_LEXER_OCTAVE #include <Qsci/qscilexeroctave.h> +#elif defined (HAVE_QSCI_QSCILEXERMATLAB_H) +//#define HAVE_LEXER_MATLAB +#include <Qsci/qscilexermatlab.h> +#endif #include <Qsci/qscilexercpp.h> #include <Qsci/qscilexerbash.h> #include <Qsci/qscilexerperl.h> @@ -137,9 +144,15 @@ #ifdef HAVE_QSCINTILLA // editor styles: create lexer, read settings, and create dialog elements QsciLexer *lexer; +#if defined (HAVE_LEXER_OCTAVE) lexer = new QsciLexerOctave (); read_lexer_settings (lexer,settings); delete lexer; +#elif defined (HAVE_LEXER_MATLAB) + lexer = new QsciLexerMatlab (); + read_lexer_settings (lexer,settings); + delete lexer; +#endif lexer = new QsciLexerCPP (); read_lexer_settings (lexer,settings); delete lexer; @@ -393,9 +406,15 @@ #ifdef HAVE_QSCINTILLA // editor styles: create lexer, get dialog contents, and write settings QsciLexer *lexer; +#if defined (HAVE_LEXER_OCTAVE) lexer = new QsciLexerOctave (); write_lexer_settings (lexer,settings); delete lexer; +#elif defined (HAVE_LEXER_MATLAB) + lexer = new QsciLexerMatlab (); + write_lexer_settings (lexer,settings); + delete lexer; +#endif lexer = new QsciLexerCPP (); write_lexer_settings (lexer,settings); delete lexer;