Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and nyalldawson committed Jan 10, 2023
1 parent 04290ea commit 99fec35
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/gui/codeeditors/qgscodeeditorpython.cpp
Expand Up @@ -231,9 +231,9 @@ void QgsCodeEditorPython::keyPressEvent( QKeyEvent *event )


// Handle closing and opening
auto prevChar = characterBeforeCursor();
auto nextChar = characterAfterCursor();
auto eText = event->text();
const QString prevChar = characterBeforeCursor();
const QString nextChar = characterAfterCursor();
const QString eText = event->text();

int line, column;
getCursorPosition( &line, &column );
Expand All @@ -254,7 +254,7 @@ void QgsCodeEditorPython::keyPressEvent( QKeyEvent *event )
QgsCodeEditor::keyPressEvent( event );
}

// Update calltips (cursor postion has changed)
// Update calltips (cursor position has changed)
callTip();
return;
}
Expand Down Expand Up @@ -377,8 +377,8 @@ bool QgsCodeEditorPython::isCursorInsideString() const
{
int line, index;
getCursorPosition( &line, &index );
auto postion = positionFromLineIndex( line, index );
auto style = SendScintilla( QsciScintillaBase::SCI_GETSTYLEAT, postion );
int position = positionFromLineIndex( line, index );
long style = SendScintilla( QsciScintillaBase::SCI_GETSTYLEAT, position );
return style == QsciLexerPython::Comment
|| style == QsciLexerPython::DoubleQuotedString
|| style == QsciLexerPython::SingleQuotedString
Expand All @@ -396,7 +396,7 @@ QString QgsCodeEditorPython::characterBeforeCursor() const
{
int line, index;
getCursorPosition( &line, &index );
auto position = positionFromLineIndex( line, index );
int position = positionFromLineIndex( line, index );
if ( position <= 0 )
{
return "";
Expand All @@ -408,7 +408,7 @@ QString QgsCodeEditorPython::characterAfterCursor() const
{
int line, index;
getCursorPosition( &line, &index );
auto position = positionFromLineIndex( line, index );
int position = positionFromLineIndex( line, index );
if ( position >= length() )
{
return "";
Expand Down

0 comments on commit 99fec35

Please sign in to comment.