Skip to content
Permalink
Browse files

Fix leaks in QgsCodeEditor

  • Loading branch information
nyalldawson committed Aug 31, 2015
1 parent 19a98b2 commit 8f601be9864744874dae30e59a50da19c8ab50d3
@@ -40,7 +40,7 @@ QgsCodeEditorCSS::~QgsCodeEditorCSS()

void QgsCodeEditorCSS::setSciLexerCSS()
{
QsciLexerCSS* lexer = new QsciLexerCSS();
QsciLexerCSS* lexer = new QsciLexerCSS( this );
lexer->setDefaultFont( QFont( "Sans", 10 ) );

setLexer( lexer );
@@ -40,7 +40,7 @@ QgsCodeEditorHTML::~QgsCodeEditorHTML()

void QgsCodeEditorHTML::setSciLexerHTML()
{
QsciLexerHTML* lexer = new QsciLexerHTML();
QsciLexerHTML* lexer = new QsciLexerHTML( this );
lexer->setDefaultFont( QFont( "Sans", 10 ) );

setLexer( lexer );
@@ -53,7 +53,7 @@ void QgsCodeEditorPython::setSciLexerPython()

QFont font = getMonospaceFont();

QsciLexerPython* pyLexer = new QsciLexerPython();
QsciLexerPython* pyLexer = new QsciLexerPython( this );
pyLexer->setDefaultFont( font );
pyLexer->setFont( font, 1 ); // comment
pyLexer->setFont( font, 3 ); // singlequotes
@@ -41,7 +41,7 @@ QgsCodeEditorSQL::~QgsCodeEditorSQL()

void QgsCodeEditorSQL::setSciLexerSQL()
{
QsciLexerSQL* sqlLexer = new QsciLexerSQL();
QsciLexerSQL* sqlLexer = new QsciLexerSQL( this );
sqlLexer->setDefaultFont( QFont( "Sans", 10 ) );

setLexer( sqlLexer );

0 comments on commit 8f601be

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