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