Skip to content
Permalink
Browse files

Rename lexer

  • Loading branch information
m-kuhn committed Sep 9, 2018
1 parent beb8912 commit 4b9cc9b34f136d8e8a4d42474ef8447b98546d0b
Showing with 13 additions and 6 deletions.
  1. +9 −4 src/gui/qgscodeeditorexpression.cpp
  2. +4 −2 src/gui/qgscodeeditorexpression.h
@@ -106,7 +106,7 @@ void QgsCodeEditorExpression::initializeLexer()
// The font size gotten from getMonospaceFont() is too small on Mac
font.setPointSize( QLabel().font().pointSize() );
#endif
mSqlLexer = new QgsCaseInsensitiveLexerExpression( this );
mSqlLexer = new QgsLexerExpression( this );
mSqlLexer->setDefaultFont( font );
mSqlLexer->setFont( font, -1 );
font.setBold( true );
@@ -145,17 +145,22 @@ void QgsCodeEditorExpression::updateApis()
}

///@cond PRIVATE
QgsCaseInsensitiveLexerExpression::QgsCaseInsensitiveLexerExpression( QObject *parent )
QgsLexerExpression::QgsLexerExpression( QObject *parent )
: QsciLexerSQL( parent )
{
}

bool QgsCaseInsensitiveLexerExpression::caseSensitive() const
const char *QgsLexerExpression::language() const
{
return "QGIS Expression";
}

bool QgsLexerExpression::caseSensitive() const
{
return false;
}

const char *QgsCaseInsensitiveLexerExpression::wordCharacters() const
const char *QgsLexerExpression::wordCharacters() const
{
return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@";
}
@@ -77,13 +77,15 @@ class GUI_EXPORT QgsCodeEditorExpression : public QgsCodeEditor
\note not available in Python bindings
\ingroup gui
*/
class QgsCaseInsensitiveLexerExpression : public QsciLexerSQL
class QgsLexerExpression : public QsciLexerSQL
{
Q_OBJECT

public:
//! Constructor
explicit QgsCaseInsensitiveLexerExpression( QObject *parent = nullptr );
explicit QgsLexerExpression( QObject *parent = nullptr );

const char *language() const override;

bool caseSensitive() const override;

0 comments on commit 4b9cc9b

Please sign in to comment.
You can’t perform that action at this time.