Skip to content
Permalink
Browse files
Use set for tokens
  • Loading branch information
elpaso committed Jul 6, 2021
1 parent 4acc1bd commit 2fc479926fa6850d3b09c6c2b43e35327e67c250
Showing with 6 additions and 6 deletions.
  1. +4 −4 src/gui/codeeditors/qgscodeeditorsql.cpp
  2. +2 −2 src/gui/codeeditors/qgscodeeditorsql.h
@@ -111,23 +111,23 @@ void QgsCodeEditorSQL::updateApis()

QStringList QgsCodeEditorSQL::extraKeywords() const
{
return mExtraKeywords;
return mExtraKeywords.values();
}

void QgsCodeEditorSQL::setExtraKeywords( const QStringList &extraKeywords )
{
mExtraKeywords = extraKeywords;
mExtraKeywords = extraKeywords.toSet();
updateApis();
}

QStringList QgsCodeEditorSQL::fieldNames() const
{
return mFieldNames;
return mFieldNames.values();
}

void QgsCodeEditorSQL::setFieldNames( const QStringList &fieldNames )
{
mFieldNames = fieldNames;
mFieldNames = fieldNames.toSet();
updateApis();
}

@@ -90,9 +90,9 @@ class GUI_EXPORT QgsCodeEditorSQL : public QgsCodeEditor
void updateApis();
QsciAPIs *mApis = nullptr;
QsciLexerSQL *mSqlLexer = nullptr;
QStringList mExtraKeywords;
QSet<QString> mExtraKeywords;

QStringList mFieldNames;
QSet<QString> mFieldNames;

friend class TestQgsQueryResultWidget;
};

0 comments on commit 2fc4799

Please sign in to comment.