Skip to content

Commit

Permalink
Fix wordcharacters
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 8, 2018
1 parent cebaa81 commit f1db2ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
20 changes: 11 additions & 9 deletions src/gui/qgscodeeditorexpression.cpp
Expand Up @@ -16,12 +16,10 @@
#include "qgsapplication.h"
#include "qgscodeeditorexpression.h"

#include <QWidget>
#include <QString>
#include <QFont>
#include <QLabel>


QgsCodeEditorExpression::QgsCodeEditorExpression( QWidget *parent )
: QgsCodeEditor( parent )
{
Expand Down Expand Up @@ -146,18 +144,22 @@ void QgsCodeEditorExpression::updateApis()
mSqlLexer->setAPIs( mApis );
}

QgsCaseInsensitiveLexerExpression::QgsCaseInsensitiveLexerExpression( QObject *parent )
: QsciLexerSQL( parent )
{
}

bool QgsCaseInsensitiveLexerExpression::caseSensitive() const
{
return false;
}
#if 0

const char *QgsCaseInsensitiveLexerExpression::wordCharacters() const
{
static QString wordChars;

wordChars = QsciLexerSQL::wordCharacters();
wordChars += '@';
return wordChars.toUtf8().constData();
return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@";
}

#endif
const char *QgsCaseInsensitiveLexerExpression::autoCompletionFillups() const
{
return "(";
}
8 changes: 4 additions & 4 deletions src/gui/qgscodeeditorexpression.h
Expand Up @@ -82,14 +82,14 @@ class QgsCaseInsensitiveLexerExpression : public QsciLexerSQL
Q_OBJECT

public:
//! constructor
explicit QgsCaseInsensitiveLexerExpression( QObject *parent = nullptr ) : QsciLexerSQL( parent ) {}
//! Constructor
explicit QgsCaseInsensitiveLexerExpression( QObject *parent = nullptr );

bool caseSensitive() const override;

#if 0
const char *wordCharacters() const override;
#endif

const char *autoCompletionFillups() const override;
};
///@endcond
#endif
Expand Down

0 comments on commit f1db2ae

Please sign in to comment.