mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Fix sip
This commit is contained in:
parent
f1843ef2ab
commit
59332e0984
@ -55,14 +55,14 @@ Load APIs from one or more files
|
||||
Loads a ``script`` file.
|
||||
%End
|
||||
|
||||
bool isCursorInsideString() const;
|
||||
bool isCursorInsideStringLiteralOrComment() const;
|
||||
%Docstring
|
||||
Check whether the current cursor position is inside a string or comment
|
||||
|
||||
.. versionadded:: 3.30
|
||||
%End
|
||||
|
||||
QString characterBeforeCursor() const;
|
||||
QString characterBeforeCursor( ) const;
|
||||
%Docstring
|
||||
Returns the character before the cursor, or an empty string if cursor is set at start
|
||||
|
||||
|
@ -333,7 +333,7 @@ void QgsCodeEditorPython::keyPressEvent( QKeyEvent *event )
|
||||
|
||||
// Else, if not inside a string or comment and an opening character
|
||||
// is entered, also insert the closing character
|
||||
else if ( !isCursorInsideString() && PAIRS.contains( eText ) )
|
||||
else if ( !isCursorInsideStringLiteralOrComment() && PAIRS.contains( eText ) )
|
||||
{
|
||||
// Check if user is not entering triple quotes
|
||||
if ( !( ( eText == "\"" || eText == "'" ) && prevChar == eText ) )
|
||||
@ -399,7 +399,7 @@ bool QgsCodeEditorPython::loadScript( const QString &script )
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QgsCodeEditorPython::isCursorInsideString() const
|
||||
bool QgsCodeEditorPython::isCursorInsideStringLiteralOrComment() const
|
||||
{
|
||||
int line, index;
|
||||
getCursorPosition( &line, &index );
|
||||
|
Loading…
x
Reference in New Issue
Block a user