diff --git a/python/PyQt6/gui/auto_additions/qgscodeeditor.py b/python/PyQt6/gui/auto_additions/qgscodeeditor.py index 8a6bc0a0b78a..7e66d286fb39 100644 --- a/python/PyQt6/gui/auto_additions/qgscodeeditor.py +++ b/python/PyQt6/gui/auto_additions/qgscodeeditor.py @@ -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) diff --git a/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in b/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in index d4a060b03cda..db672686c707 100644 --- a/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in +++ b/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in @@ -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` diff --git a/python/gui/auto_additions/qgscodeeditor.py b/python/gui/auto_additions/qgscodeeditor.py index b15f4882c018..53886b0bb239 100644 --- a/python/gui/auto_additions/qgscodeeditor.py +++ b/python/gui/auto_additions/qgscodeeditor.py @@ -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) diff --git a/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in b/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in index 2df9bda38c65..2d260d79a353 100644 --- a/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in +++ b/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in @@ -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` diff --git a/src/gui/codeeditors/qgscodeeditor.cpp b/src/gui/codeeditors/qgscodeeditor.cpp index 0c11ba8236bc..62128b6dd7be 100644 --- a/src/gui/codeeditors/qgscodeeditor.cpp +++ b/src/gui/codeeditors/qgscodeeditor.cpp @@ -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 ) ); } @@ -850,7 +850,7 @@ void QgsCodeEditor::adjustScrollWidth() } // Use the longest line width as the new scroll width - setScrollWidth( maxWidth ); + setScrollWidth( static_cast( maxWidth ) ); } void QgsCodeEditor::setText( const QString &text ) diff --git a/src/gui/codeeditors/qgscodeeditor.h b/src/gui/codeeditors/qgscodeeditor.h index 224e61346e60..750fbb2a90a0 100644 --- a/src/gui/codeeditors/qgscodeeditor.h +++ b/src/gui/codeeditors/qgscodeeditor.h @@ -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. * *