Skip to content

Commit

Permalink
Apply suggestion from review
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and lbartoletti committed Jan 10, 2025
1 parent 0352f51 commit dff57c3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/PyQt6/gui/auto_additions/qgscodeeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
QgsCodeEditor.Flags.baseClass = QgsCodeEditor
Flags = QgsCodeEditor # dirty hack since SIP seems to introduce the flags in module
try:
QgsCodeEditor.__attribute_docs__ = {'SEARCH_RESULT_INDICATOR': 'Indicator index for search results', 'sessionHistoryCleared': 'Emitted when the history of commands run in the current session is cleared.\n\n.. versionadded:: 3.30\n', 'persistentHistoryCleared': 'Emitted when the persistent history of commands run in the editor is cleared.\n\n.. versionadded:: 3.30\n', 'helpRequested': 'Emitted when documentation was requested for the specified ``word``.\n\n.. versionadded:: 3.42\n', 'editingTimeout': 'Emitted when either:\n\n1. 500ms have elapsed since the last text change in the widget\n2. or, immediately after the widget has lost focus after its text was changed.\n\n.. seealso:: :py:func:`editingTimeoutInterval`\n\n.. versionadded:: 3.42\n'}
QgsCodeEditor.__attribute_docs__ = {'SEARCH_RESULT_INDICATOR': 'Indicator index for search results', 'sessionHistoryCleared': 'Emitted when the history of commands run in the current session is cleared.\n\n.. versionadded:: 3.30\n', 'persistentHistoryCleared': 'Emitted when the persistent history of commands run in the editor is cleared.\n\n.. versionadded:: 3.30\n', 'helpRequested': 'Emitted when documentation was requested for the specified ``word``.\n\n.. versionadded:: 3.42\n', 'editingTimeout': 'Emitted when either:\n\n1. 1 second has elapsed since the last text change in the widget\n2. or, immediately after the widget has lost focus after its text was changed.\n\n.. seealso:: :py:func:`editingTimeoutInterval`\n\n.. versionadded:: 3.42\n'}
QgsCodeEditor.languageToString = staticmethod(QgsCodeEditor.languageToString)
QgsCodeEditor.defaultColor = staticmethod(QgsCodeEditor.defaultColor)
QgsCodeEditor.color = staticmethod(QgsCodeEditor.color)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Emitted when documentation was requested for the specified ``word``.
%Docstring
Emitted when either:

1. 500ms have elapsed since the last text change in the widget
1. 1 second has elapsed since the last text change in the widget
2. or, immediately after the widget has lost focus after its text was changed.

.. seealso:: :py:func:`editingTimeoutInterval`
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_additions/qgscodeeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
QgsCodeEditor.Flags.baseClass = QgsCodeEditor
Flags = QgsCodeEditor # dirty hack since SIP seems to introduce the flags in module
try:
QgsCodeEditor.__attribute_docs__ = {'SEARCH_RESULT_INDICATOR': 'Indicator index for search results', 'sessionHistoryCleared': 'Emitted when the history of commands run in the current session is cleared.\n\n.. versionadded:: 3.30\n', 'persistentHistoryCleared': 'Emitted when the persistent history of commands run in the editor is cleared.\n\n.. versionadded:: 3.30\n', 'helpRequested': 'Emitted when documentation was requested for the specified ``word``.\n\n.. versionadded:: 3.42\n', 'editingTimeout': 'Emitted when either:\n\n1. 500ms have elapsed since the last text change in the widget\n2. or, immediately after the widget has lost focus after its text was changed.\n\n.. seealso:: :py:func:`editingTimeoutInterval`\n\n.. versionadded:: 3.42\n'}
QgsCodeEditor.__attribute_docs__ = {'SEARCH_RESULT_INDICATOR': 'Indicator index for search results', 'sessionHistoryCleared': 'Emitted when the history of commands run in the current session is cleared.\n\n.. versionadded:: 3.30\n', 'persistentHistoryCleared': 'Emitted when the persistent history of commands run in the editor is cleared.\n\n.. versionadded:: 3.30\n', 'helpRequested': 'Emitted when documentation was requested for the specified ``word``.\n\n.. versionadded:: 3.42\n', 'editingTimeout': 'Emitted when either:\n\n1. 1 second has elapsed since the last text change in the widget\n2. or, immediately after the widget has lost focus after its text was changed.\n\n.. seealso:: :py:func:`editingTimeoutInterval`\n\n.. versionadded:: 3.42\n'}
QgsCodeEditor.languageToString = staticmethod(QgsCodeEditor.languageToString)
QgsCodeEditor.defaultColor = staticmethod(QgsCodeEditor.defaultColor)
QgsCodeEditor.color = staticmethod(QgsCodeEditor.color)
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Emitted when documentation was requested for the specified ``word``.
%Docstring
Emitted when either:

1. 500ms have elapsed since the last text change in the widget
1. 1 second has elapsed since the last text change in the widget
2. or, immediately after the widget has lost focus after its text was changed.

.. seealso:: :py:func:`editingTimeoutInterval`
Expand Down
4 changes: 2 additions & 2 deletions src/gui/codeeditors/qgscodeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ QgsCodeEditor::QgsCodeEditor( QWidget *parent, const QString &title, bool foldin

mLastEditTimer = new QTimer( this );
mLastEditTimer->setSingleShot( true );
mLastEditTimer->setInterval( 500 );
mLastEditTimer->setInterval( 1000 );
connect( mLastEditTimer, &QTimer::timeout, this, &QgsCodeEditor::onLastEditTimeout );
connect( this, &QgsCodeEditor::textChanged, mLastEditTimer, qOverload<>( &QTimer::start ) );
}
Expand Down Expand Up @@ -850,7 +850,7 @@ void QgsCodeEditor::adjustScrollWidth()
}

// Use the longest line width as the new scroll width
setScrollWidth( maxWidth );
setScrollWidth( static_cast<int>( maxWidth ) );
}

void QgsCodeEditor::setText( const QString &text )
Expand Down
2 changes: 1 addition & 1 deletion src/gui/codeeditors/qgscodeeditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ class GUI_EXPORT QgsCodeEditor : public QsciScintilla
/**
* Emitted when either:
*
* 1. 500ms have elapsed since the last text change in the widget
* 1. 1 second has elapsed since the last text change in the widget
* 2. or, immediately after the widget has lost focus after its text was changed.
*
*
Expand Down

0 comments on commit dff57c3

Please sign in to comment.