33 setAutoCompletionCaseSensitivity(
false );
41 mApis->cancelPreparation( );
50 mSqlLexer =
new QgsCaseInsensitiveLexerSQL(
this );
51 mSqlLexer->setDefaultFont( font );
54 mSqlLexer->setFont( font, -1 );
56 mSqlLexer->setFont( font, QsciLexerSQL::Keyword );
58 font.setBold(
false );
59 font.setItalic(
true );
60 mSqlLexer->setFont( font, QsciLexerSQL::Comment );
61 mSqlLexer->setFont( font, QsciLexerSQL::CommentLine );
63 mSqlLexer->setColor(
defaultColor, QsciLexerSQL::Default );
75 setLexer( mSqlLexer );
94 void QgsCodeEditorSQL::updateApis()
96 mApis =
new QsciAPIs( mSqlLexer );
98 for (
const QString &fieldName : std::as_const( mFieldNames ) )
100 mApis->add( fieldName );
103 for (
const QString &keyword : std::as_const( mExtraKeywords ) )
105 mApis->add( keyword );
109 mSqlLexer->setAPIs( mApis );
114 return mExtraKeywords.values();
125 return mFieldNames.values();