mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Apply suggestion from review
This commit is contained in:
parent
0352f51051
commit
dff57c3e02
@ -57,7 +57,7 @@ QgsCodeEditor.Flags = lambda flags=0: QgsCodeEditor.Flag(flags)
|
||||
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)
|
||||
|
@ -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`
|
||||
|
@ -56,7 +56,7 @@ QgsCodeEditor.Flag.baseClass = QgsCodeEditor
|
||||
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)
|
||||
|
@ -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`
|
||||
|
@ -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<int>( maxWidth ) );
|
||||
}
|
||||
|
||||
void QgsCodeEditor::setText( const QString &text )
|
||||
|
@ -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.
|
||||
*
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user