Skip to content
Permalink
Browse files

Avoid cppcheck warnings

  • Loading branch information
nyalldawson committed Oct 5, 2020
1 parent 45c40c9 commit 63a5cdaf128c3d2463dbcb1497406652fe2f2043
@@ -31,7 +31,7 @@ QgsCodeEditorCSS::QgsCodeEditorCSS( QWidget *parent )
}
setMarginVisible( false );
setFoldingVisible( true );
initializeLexer();
QgsCodeEditorCSS::initializeLexer();
}

void QgsCodeEditorCSS::initializeLexer()
@@ -30,7 +30,7 @@ QgsCodeEditorExpression::QgsCodeEditorExpression( QWidget *parent )
setMarginVisible( false );
setFoldingVisible( true );
setAutoCompletionCaseSensitivity( false );
initializeLexer();
QgsCodeEditorExpression::initializeLexer(); // avoid cppcheck warning by explicitly specifying namespace
}

void QgsCodeEditorExpression::setExpressionContext( const QgsExpressionContext &context )
@@ -60,7 +60,7 @@ class GUI_EXPORT QgsCodeEditorExpression : public QgsCodeEditor
private:
void updateApis();
QsciAPIs *mApis = nullptr;
QsciLexerSQL *mSqlLexer;
QsciLexerSQL *mSqlLexer = nullptr;

QStringList mVariables;
QStringList mContextFunctions;
@@ -32,7 +32,7 @@ QgsCodeEditorHTML::QgsCodeEditorHTML( QWidget *parent )
}
setMarginVisible( false );
setFoldingVisible( true );
initializeLexer();
QgsCodeEditorHTML::initializeLexer();
}

void QgsCodeEditorHTML::initializeLexer()
@@ -31,7 +31,7 @@ QgsCodeEditorJavascript::QgsCodeEditorJavascript( QWidget *parent )
}
setMarginVisible( false );
setFoldingVisible( true );
initializeLexer();
QgsCodeEditorJavascript::initializeLexer();
}

void QgsCodeEditorJavascript::initializeLexer()
@@ -35,7 +35,7 @@ QgsCodeEditorPython::QgsCodeEditorPython( QWidget *parent, const QList<QString>
{
setTitle( tr( "Python Editor" ) );
}
initializeLexer();
QgsCodeEditorPython::initializeLexer();
}

void QgsCodeEditorPython::initializeLexer()
@@ -32,7 +32,7 @@ QgsCodeEditorSQL::QgsCodeEditorSQL( QWidget *parent )
setMarginVisible( false );
setFoldingVisible( true );
setAutoCompletionCaseSensitivity( false );
initializeLexer();
QgsCodeEditorSQL::initializeLexer(); // avoid cppcheck warning by explicitly specifying namespace
}

void QgsCodeEditorSQL::initializeLexer()
@@ -52,7 +52,7 @@ class GUI_EXPORT QgsCodeEditorSQL : public QgsCodeEditor
private:
void updateApis();
QsciAPIs *mApis = nullptr;
QsciLexerSQL *mSqlLexer;
QsciLexerSQL *mSqlLexer = nullptr;

QStringList mFieldNames;
};

0 comments on commit 63a5cda

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