From 5fdf6dd77af0f1388e743676f91f13b8d5cc6c27 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 6 Dec 2024 09:38:28 +0100 Subject: [PATCH] fix SIP_SKIP and SIP_FORCE being left alone --- .../PyQt6/gui/auto_additions/qgscodeeditor.py | 2 +- .../qgsprojectionselectionwidget.py | 11 ------- .../codeeditors/qgscodeeditor.sip.in | 6 +++- .../layout/qgslayoutview.sip.in | 8 ----- .../maptools/qgsmaptoolcapture.sip.in | 32 ++++++++++++++++--- .../qgsmaptoolcapturelayergeometry.sip.in | 24 +++++++++++--- .../maptools/qgsmaptooldigitizefeature.sip.in | 7 +++- .../proj/qgsprojectionselectionwidget.sip.in | 7 +--- python/gui/auto_additions/qgscodeeditor.py | 2 +- .../codeeditors/qgscodeeditor.sip.in | 6 +++- .../layout/qgslayoutview.sip.in | 8 ----- .../maptools/qgsmaptoolcapture.sip.in | 32 ++++++++++++++++--- .../qgsmaptoolcapturelayergeometry.sip.in | 24 +++++++++++--- .../maptools/qgsmaptooldigitizefeature.sip.in | 7 +++- .../proj/qgsprojectionselectionwidget.sip.in | 7 +--- scripts/sipify.py | 2 ++ src/gui/codeeditors/qgscodeeditor.h | 3 +- .../core/qgseditorwidgetfactory.h | 5 ++- src/gui/editorwidgets/core/qgswidgetwrapper.h | 5 ++- src/gui/layout/qgslayoutview.h | 3 +- src/gui/maptools/qgsmaptoolcapture.h | 12 +++---- .../maptools/qgsmaptoolcapturelayergeometry.h | 12 +++---- src/gui/maptools/qgsmaptooldigitizefeature.h | 6 ++-- .../processing/qgsprocessingtoolboxmodel.h | 5 ++- src/gui/proj/qgsprojectionselectionwidget.h | 11 +++---- src/gui/qgscheckablecombobox.h | 5 ++- src/gui/qgsexpressionstoredialog.h | 5 ++- src/gui/qgslayerpropertiesdialog.h | 6 ++-- src/gui/qgsmapcanvas.h | 5 ++- src/gui/qgsmapcanvasannotationitem.h | 5 ++- src/gui/qgsoptionswidgetfactory.h | 5 ++- src/gui/qgspropertyoverridebutton.h | 5 ++- src/gui/qgssourceselectprovider.h | 3 +- 33 files changed, 184 insertions(+), 102 deletions(-) diff --git a/python/PyQt6/gui/auto_additions/qgscodeeditor.py b/python/PyQt6/gui/auto_additions/qgscodeeditor.py index e62af82121b..6fde92d08d6 100644 --- a/python/PyQt6/gui/auto_additions/qgscodeeditor.py +++ b/python/PyQt6/gui/auto_additions/qgscodeeditor.py @@ -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'} + QgsCodeEditor.__attribute_docs__ = {'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'} QgsCodeEditor.languageToString = staticmethod(QgsCodeEditor.languageToString) QgsCodeEditor.defaultColor = staticmethod(QgsCodeEditor.defaultColor) QgsCodeEditor.color = staticmethod(QgsCodeEditor.color) diff --git a/python/PyQt6/gui/auto_additions/qgsprojectionselectionwidget.py b/python/PyQt6/gui/auto_additions/qgsprojectionselectionwidget.py index b41a07f3a34..6b91fb47329 100644 --- a/python/PyQt6/gui/auto_additions/qgsprojectionselectionwidget.py +++ b/python/PyQt6/gui/auto_additions/qgsprojectionselectionwidget.py @@ -6,17 +6,6 @@ QgsProjectionSelectionWidget.CurrentCrs = QgsProjectionSelectionWidget.CrsOption QgsProjectionSelectionWidget.DefaultCrs = QgsProjectionSelectionWidget.CrsOption.DefaultCrs QgsProjectionSelectionWidget.RecentCrs = QgsProjectionSelectionWidget.CrsOption.RecentCrs QgsProjectionSelectionWidget.CrsNotSet = QgsProjectionSelectionWidget.CrsOption.CrsNotSet -QgsProjectionSelectionWidget.CrsOptions = lambda flags=0: QgsProjectionSelectionWidget.CrsOption(flags) -from enum import Enum - - -def _force_int(v): return int(v.value) if isinstance(v, Enum) else v - - -QgsProjectionSelectionWidget.CrsOption.__bool__ = lambda flag: bool(_force_int(flag)) -QgsProjectionSelectionWidget.CrsOption.__eq__ = lambda flag1, flag2: _force_int(flag1) == _force_int(flag2) -QgsProjectionSelectionWidget.CrsOption.__and__ = lambda flag1, flag2: _force_int(flag1) & _force_int(flag2) -QgsProjectionSelectionWidget.CrsOption.__or__ = lambda flag1, flag2: QgsProjectionSelectionWidget.CrsOption(_force_int(flag1) | _force_int(flag2)) try: QgsProjectionSelectionWidget.__attribute_docs__ = {'crsChanged': 'Emitted when the selected CRS is changed\n', 'cleared': 'Emitted when the not set option is selected.\n'} QgsProjectionSelectionWidget.__signal_arguments__ = {'crsChanged': ['crs: QgsCoordinateReferenceSystem']} diff --git a/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in b/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in index c29caab8b53..400e2a908f5 100644 --- a/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in +++ b/python/PyQt6/gui/auto_generated/codeeditors/qgscodeeditor.sip.in @@ -98,7 +98,11 @@ A text editor based on QScintilla2. typedef QFlags Flags; - static const int SEARCH_RESULT_INDICATOR; + static const int SEARCH_RESULT_INDICATOR +%Docstring +Indicator index for search results +%End + = QsciScintilla::INDIC_MAX - 1; QgsCodeEditor( QWidget *parent /TransferThis/ = 0, const QString &title = QString(), bool folding = false, bool margin = false, QgsCodeEditor::Flags flags = QgsCodeEditor::Flags(), QgsCodeEditor::Mode mode = QgsCodeEditor::Mode::ScriptEditor ); %Docstring diff --git a/python/PyQt6/gui/auto_generated/layout/qgslayoutview.sip.in b/python/PyQt6/gui/auto_generated/layout/qgslayoutview.sip.in index 6d450d9230b..56959c4551d 100644 --- a/python/PyQt6/gui/auto_generated/layout/qgslayoutview.sip.in +++ b/python/PyQt6/gui/auto_generated/layout/qgslayoutview.sip.in @@ -270,15 +270,7 @@ Returns the delta (in layout coordinates) by which to move items for the given key ``event``. %End - void setPaintingEnabled( bool enabled ); -%Docstring -Sets whether widget repainting should be allowed for the view. This is -used to temporarily halt painting while exporting layouts. -.. note:: - - Not available in Python bindings. -%End void setSectionLabel( const QString &label ); %Docstring Sets a section ``label``, to display above the first page shown in the diff --git a/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in b/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in index d0b3b702652..27dc9782f01 100644 --- a/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in +++ b/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in @@ -329,10 +329,34 @@ Stop capturing %End private: - - - - + virtual void geometryCaptured( const QgsGeometry &geometry ); +%Docstring +Called when the geometry is captured +A more specific handler is also called afterwards (pointCaptured, lineCaptured or polygonCaptured) + +.. versionadded:: 3.26 +%End + virtual void pointCaptured( const QgsPoint &point ); +%Docstring +Called when a point is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End + virtual void lineCaptured( const QgsCurve *line ); +%Docstring +Called when a line is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End + virtual void polygonCaptured( const QgsCurvePolygon *polygon ); +%Docstring +Called when a polygon is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End }; QFlags operator|(QgsMapToolCapture::Capability f1, QFlags f2); diff --git a/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in b/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in index b374b00805b..92f3a0eb79e 100644 --- a/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in +++ b/python/PyQt6/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in @@ -28,10 +28,26 @@ Constructor %End private: - - - - + virtual void layerGeometryCaptured( const QgsGeometry &geometry ); +%Docstring +Called when the geometry is captured +A more specific handler is also called afterwards (layerPointCaptured, layerLineCaptured or layerPolygonCaptured) +%End + virtual void layerPointCaptured( const QgsPoint &point ); +%Docstring +Called when a point is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this point-specific signal. +%End + virtual void layerLineCaptured( const QgsCurve *line ); +%Docstring +Called when a line is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this line-specific signal. +%End + virtual void layerPolygonCaptured( const QgsCurvePolygon *polygon ); +%Docstring +Called when a polygon is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this polygon-specific signal. +%End }; /************************************************************************ diff --git a/python/PyQt6/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in b/python/PyQt6/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in index b20f5b448ca..2115c681a24 100644 --- a/python/PyQt6/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in +++ b/python/PyQt6/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in @@ -90,7 +90,12 @@ Check if CaptureMode matches layer type. Default is ``True``. %End private: - + virtual void featureDigitized( const QgsFeature &feature ); +%Docstring +Called when the feature has been digitized + +.. versionadded:: 3.26 +%End }; /************************************************************************ diff --git a/python/PyQt6/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in b/python/PyQt6/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in index cfe84d49d85..33b7e7b538f 100644 --- a/python/PyQt6/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in +++ b/python/PyQt6/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in @@ -32,10 +32,7 @@ A widget for selecting a projection. CrsNotSet, }; - typedef QFlags CrsOptions; - - - explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); + explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); %Docstring Constructor for QgsProjectionSelectionWidget, with the specified ``parent`` widget. @@ -213,8 +210,6 @@ Opens the dialog for selecting a new CRS }; -QFlags operator|(QgsProjectionSelectionWidget::CrsOption f1, QFlags f2); - diff --git a/python/gui/auto_additions/qgscodeeditor.py b/python/gui/auto_additions/qgscodeeditor.py index 72a89a67634..f04f7958639 100644 --- a/python/gui/auto_additions/qgscodeeditor.py +++ b/python/gui/auto_additions/qgscodeeditor.py @@ -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'} + QgsCodeEditor.__attribute_docs__ = {'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'} 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 163a8bf0415..b5b23148ceb 100644 --- a/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in +++ b/python/gui/auto_generated/codeeditors/qgscodeeditor.sip.in @@ -98,7 +98,11 @@ A text editor based on QScintilla2. typedef QFlags Flags; - static const int SEARCH_RESULT_INDICATOR; + static const int SEARCH_RESULT_INDICATOR +%Docstring +Indicator index for search results +%End + = QsciScintilla::INDIC_MAX - 1; QgsCodeEditor( QWidget *parent /TransferThis/ = 0, const QString &title = QString(), bool folding = false, bool margin = false, QgsCodeEditor::Flags flags = QgsCodeEditor::Flags(), QgsCodeEditor::Mode mode = QgsCodeEditor::Mode::ScriptEditor ); %Docstring diff --git a/python/gui/auto_generated/layout/qgslayoutview.sip.in b/python/gui/auto_generated/layout/qgslayoutview.sip.in index e80b9e46fca..8d317e7d459 100644 --- a/python/gui/auto_generated/layout/qgslayoutview.sip.in +++ b/python/gui/auto_generated/layout/qgslayoutview.sip.in @@ -270,15 +270,7 @@ Returns the delta (in layout coordinates) by which to move items for the given key ``event``. %End - void setPaintingEnabled( bool enabled ); -%Docstring -Sets whether widget repainting should be allowed for the view. This is -used to temporarily halt painting while exporting layouts. -.. note:: - - Not available in Python bindings. -%End void setSectionLabel( const QString &label ); %Docstring Sets a section ``label``, to display above the first page shown in the diff --git a/python/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in b/python/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in index 76dcf0d4213..10a922324d0 100644 --- a/python/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in +++ b/python/gui/auto_generated/maptools/qgsmaptoolcapture.sip.in @@ -329,10 +329,34 @@ Stop capturing %End private: - - - - + virtual void geometryCaptured( const QgsGeometry &geometry ); +%Docstring +Called when the geometry is captured +A more specific handler is also called afterwards (pointCaptured, lineCaptured or polygonCaptured) + +.. versionadded:: 3.26 +%End + virtual void pointCaptured( const QgsPoint &point ); +%Docstring +Called when a point is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End + virtual void lineCaptured( const QgsCurve *line ); +%Docstring +Called when a line is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End + virtual void polygonCaptured( const QgsCurvePolygon *polygon ); +%Docstring +Called when a polygon is captured +geometryCaptured is called just before + +.. versionadded:: 3.26 +%End }; QFlags operator|(QgsMapToolCapture::Capability f1, QFlags f2); diff --git a/python/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in b/python/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in index b374b00805b..92f3a0eb79e 100644 --- a/python/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in +++ b/python/gui/auto_generated/maptools/qgsmaptoolcapturelayergeometry.sip.in @@ -28,10 +28,26 @@ Constructor %End private: - - - - + virtual void layerGeometryCaptured( const QgsGeometry &geometry ); +%Docstring +Called when the geometry is captured +A more specific handler is also called afterwards (layerPointCaptured, layerLineCaptured or layerPolygonCaptured) +%End + virtual void layerPointCaptured( const QgsPoint &point ); +%Docstring +Called when a point is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this point-specific signal. +%End + virtual void layerLineCaptured( const QgsCurve *line ); +%Docstring +Called when a line is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this line-specific signal. +%End + virtual void layerPolygonCaptured( const QgsCurvePolygon *polygon ); +%Docstring +Called when a polygon is captured +The generic :py:func:`~QgsMapToolCaptureLayerGeometry.geometryCaptured` signal will be emitted immediately before this polygon-specific signal. +%End }; /************************************************************************ diff --git a/python/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in b/python/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in index b20f5b448ca..2115c681a24 100644 --- a/python/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in +++ b/python/gui/auto_generated/maptools/qgsmaptooldigitizefeature.sip.in @@ -90,7 +90,12 @@ Check if CaptureMode matches layer type. Default is ``True``. %End private: - + virtual void featureDigitized( const QgsFeature &feature ); +%Docstring +Called when the feature has been digitized + +.. versionadded:: 3.26 +%End }; /************************************************************************ diff --git a/python/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in b/python/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in index 5e2f8e2fd20..96ff2bf89ef 100644 --- a/python/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in +++ b/python/gui/auto_generated/proj/qgsprojectionselectionwidget.sip.in @@ -32,10 +32,7 @@ A widget for selecting a projection. CrsNotSet, }; - typedef QFlags CrsOptions; - - - explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); + explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); %Docstring Constructor for QgsProjectionSelectionWidget, with the specified ``parent`` widget. @@ -213,8 +210,6 @@ Opens the dialog for selecting a new CRS }; -QFlags operator|(QgsProjectionSelectionWidget::CrsOption f1, QFlags f2); - diff --git a/scripts/sipify.py b/scripts/sipify.py index a336cf14567..0e646f4f709 100755 --- a/scripts/sipify.py +++ b/scripts/sipify.py @@ -2503,6 +2503,8 @@ while CONTEXT.line_idx < CONTEXT.line_count: if match: flags = match.group(2) flag = CONTEXT.qflag_hash.get(flags) + if flag is None: + exit_with_error(f"error reading flags: {flags}") CONTEXT.current_line = ( f"{match.group(1)}QFlags<{flag}> operator|({flag} f1, QFlags<{flag}> f2);\n" ) diff --git a/src/gui/codeeditors/qgscodeeditor.h b/src/gui/codeeditors/qgscodeeditor.h index 97ac6ef690a..6406ef7188b 100644 --- a/src/gui/codeeditors/qgscodeeditor.h +++ b/src/gui/codeeditors/qgscodeeditor.h @@ -154,7 +154,8 @@ class GUI_EXPORT QgsCodeEditor : public QsciScintilla Q_FLAG( Flags ) //! Indicator index for search results - static constexpr int SEARCH_RESULT_INDICATOR = QsciScintilla::INDIC_MAX - 1; + static constexpr int SEARCH_RESULT_INDICATOR + = QsciScintilla::INDIC_MAX - 1; /** * Construct a new code editor. diff --git a/src/gui/editorwidgets/core/qgseditorwidgetfactory.h b/src/gui/editorwidgets/core/qgseditorwidgetfactory.h index a7a8be7ef36..2e0bcee0f31 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetfactory.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetfactory.h @@ -105,7 +105,10 @@ class GUI_EXPORT QgsEditorWidgetFactory * \returns A map of widget type names and weight values * \note not available in Python bindings */ - virtual QHash supportedWidgetTypes() SIP_SKIP { return QHash(); } + virtual QHash supportedWidgetTypes() SIP_SKIP + { + return QHash(); + } /** * This method allows disabling this editor widget type for a certain field. diff --git a/src/gui/editorwidgets/core/qgswidgetwrapper.h b/src/gui/editorwidgets/core/qgswidgetwrapper.h index 3d100231d79..984b23558b5 100644 --- a/src/gui/editorwidgets/core/qgswidgetwrapper.h +++ b/src/gui/editorwidgets/core/qgswidgetwrapper.h @@ -180,7 +180,10 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject * * \note not available in Python bindings */ - QgsPropertyCollection &dataDefinedProperties() SIP_SKIP { return mPropertyCollection; } + QgsPropertyCollection &dataDefinedProperties() SIP_SKIP + { + return mPropertyCollection; + } /** * Returns a reference to the editor widget's property collection, used for data defined overrides. diff --git a/src/gui/layout/qgslayoutview.h b/src/gui/layout/qgslayoutview.h index 28231aba8fb..c1b76369ff9 100644 --- a/src/gui/layout/qgslayoutview.h +++ b/src/gui/layout/qgslayoutview.h @@ -285,8 +285,7 @@ class GUI_EXPORT QgsLayoutView : public QGraphicsView * used to temporarily halt painting while exporting layouts. * \note Not available in Python bindings. */ - void setPaintingEnabled( bool enabled ); - SIP_SKIP + void setPaintingEnabled( bool enabled ) SIP_SKIP; /** * Sets a section \a label, to display above the first page shown in the diff --git a/src/gui/maptools/qgsmaptoolcapture.h b/src/gui/maptools/qgsmaptoolcapture.h index ac60fd609e6..57222ac541c 100644 --- a/src/gui/maptools/qgsmaptoolcapture.h +++ b/src/gui/maptools/qgsmaptoolcapture.h @@ -342,32 +342,28 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing * A more specific handler is also called afterwards (pointCaptured, lineCaptured or polygonCaptured) * \since QGIS 3.26 */ - virtual void geometryCaptured( const QgsGeometry &geometry ) { Q_UNUSED( geometry ) } - SIP_FORCE + virtual void geometryCaptured( const QgsGeometry &geometry ) SIP_FORCE { Q_UNUSED( geometry ) } /** * Called when a point is captured * geometryCaptured is called just before * \since QGIS 3.26 */ - virtual void pointCaptured( const QgsPoint &point ) { Q_UNUSED( point ) } - SIP_FORCE + virtual void pointCaptured( const QgsPoint &point ) SIP_FORCE { Q_UNUSED( point ) } /** * Called when a line is captured * geometryCaptured is called just before * \since QGIS 3.26 */ - virtual void lineCaptured( const QgsCurve *line ) { Q_UNUSED( line ) } - SIP_FORCE + virtual void lineCaptured( const QgsCurve *line ) SIP_FORCE { Q_UNUSED( line ) } /** * Called when a polygon is captured * geometryCaptured is called just before * \since QGIS 3.26 */ - virtual void polygonCaptured( const QgsCurvePolygon *polygon ) { Q_UNUSED( polygon ) } - SIP_FORCE + virtual void polygonCaptured( const QgsCurvePolygon *polygon ) SIP_FORCE { Q_UNUSED( polygon ) } //! whether tracing has been requested by the user bool tracingEnabled(); diff --git a/src/gui/maptools/qgsmaptoolcapturelayergeometry.h b/src/gui/maptools/qgsmaptoolcapturelayergeometry.h index f5f69e53976..be90f0274d1 100644 --- a/src/gui/maptools/qgsmaptoolcapturelayergeometry.h +++ b/src/gui/maptools/qgsmaptoolcapturelayergeometry.h @@ -43,29 +43,25 @@ class GUI_EXPORT QgsMapToolCaptureLayerGeometry : public QgsMapToolCapture * Called when the geometry is captured * A more specific handler is also called afterwards (layerPointCaptured, layerLineCaptured or layerPolygonCaptured) */ - virtual void layerGeometryCaptured( const QgsGeometry &geometry ) { Q_UNUSED( geometry ) } - SIP_FORCE + virtual void layerGeometryCaptured( const QgsGeometry &geometry ) SIP_FORCE { Q_UNUSED( geometry ) } /** * Called when a point is captured * The generic geometryCaptured() signal will be emitted immediately before this point-specific signal. */ - virtual void layerPointCaptured( const QgsPoint &point ) { Q_UNUSED( point ) } - SIP_FORCE + virtual void layerPointCaptured( const QgsPoint &point ) SIP_FORCE { Q_UNUSED( point ) } /** * Called when a line is captured * The generic geometryCaptured() signal will be emitted immediately before this line-specific signal. */ - virtual void layerLineCaptured( const QgsCurve *line ) { Q_UNUSED( line ) } - SIP_FORCE + virtual void layerLineCaptured( const QgsCurve *line ) SIP_FORCE { Q_UNUSED( line ) } /** * Called when a polygon is captured * The generic geometryCaptured() signal will be emitted immediately before this polygon-specific signal. */ - virtual void layerPolygonCaptured( const QgsCurvePolygon *polygon ) { Q_UNUSED( polygon ) } - SIP_FORCE + virtual void layerPolygonCaptured( const QgsCurvePolygon *polygon ) SIP_FORCE { Q_UNUSED( polygon ) } }; #endif // QGSMAPTOOLCAPTURELAYERGEOMETRY_H diff --git a/src/gui/maptools/qgsmaptooldigitizefeature.h b/src/gui/maptools/qgsmaptooldigitizefeature.h index e5e93a46d73..a85c0294846 100644 --- a/src/gui/maptools/qgsmaptooldigitizefeature.h +++ b/src/gui/maptools/qgsmaptooldigitizefeature.h @@ -102,13 +102,13 @@ class GUI_EXPORT QgsMapToolDigitizeFeature : public QgsMapToolCaptureLayerGeomet * Called when the feature has been digitized * \since QGIS 3.26 */ - virtual void featureDigitized( const QgsFeature &feature ) { Q_UNUSED( feature ) } - SIP_FORCE + virtual void featureDigitized( const QgsFeature &feature ) SIP_FORCE { Q_UNUSED( feature ) } /** * individual layer per digitizing session */ - QgsMapLayer *mLayer = nullptr; + QgsMapLayer *mLayer + = nullptr; /** * layer used before digitizing session diff --git a/src/gui/processing/qgsprocessingtoolboxmodel.h b/src/gui/processing/qgsprocessingtoolboxmodel.h index d77f60624f5..9256277c7e0 100644 --- a/src/gui/processing/qgsprocessingtoolboxmodel.h +++ b/src/gui/processing/qgsprocessingtoolboxmodel.h @@ -100,7 +100,10 @@ class GUI_EXPORT QgsProcessingToolboxModelNode : public QObject * Returns a list of children belonging to the node. * \note Not available in Python bindings */ - QList children() const SIP_SKIP { return mChildren; } + QList children() const SIP_SKIP + { + return mChildren; + } /** * Removes the specified \a node from this node's children, and gives diff --git a/src/gui/proj/qgsprojectionselectionwidget.h b/src/gui/proj/qgsprojectionselectionwidget.h index a069d5d3dbe..24519a953b3 100644 --- a/src/gui/proj/qgsprojectionselectionwidget.h +++ b/src/gui/proj/qgsprojectionselectionwidget.h @@ -64,17 +64,16 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget * Flags for predefined CRS options shown in widget. * \since QGIS 3.36 */ - Q_DECLARE_FLAGS( CrsOptions, CrsOption ) - SIP_SKIP; + SIP_SKIP Q_DECLARE_FLAGS( CrsOptions, CrsOption ) - /** + /** * Constructor for QgsProjectionSelectionWidget, with the specified \a parent widget. * * Since QGIS 3.36, the optional \a filter argument can be used to specify filters on the systems * shown in the widget. The default is to show all horizontal and compound CRS in order to match * the behavior of older QGIS releases. The \a filter can be altered to also include vertical CRS if desired. */ - explicit QgsProjectionSelectionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); + explicit QgsProjectionSelectionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound ); /** * Returns the currently selected CRS for the widget @@ -260,9 +259,7 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget void updateWarning(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProjectionSelectionWidget::CrsOptions ) -SIP_SKIP - +SIP_SKIP Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProjectionSelectionWidget::CrsOptions ); ///@cond PRIVATE diff --git a/src/gui/qgscheckablecombobox.h b/src/gui/qgscheckablecombobox.h index ad2b944dbde..3af2bd9482e 100644 --- a/src/gui/qgscheckablecombobox.h +++ b/src/gui/qgscheckablecombobox.h @@ -209,7 +209,10 @@ class GUI_EXPORT QgsCheckableComboBox : public QComboBox * \see QgsCheckableItemModel * \since QGIS 3.16 */ - QgsCheckableItemModel *model() const SIP_SKIP { return mModel; } + QgsCheckableItemModel *model() const SIP_SKIP + { + return mModel; + } /** * Hides the list of items in the combobox if it is currently diff --git a/src/gui/qgsexpressionstoredialog.h b/src/gui/qgsexpressionstoredialog.h index 44b215dad40..7473b10fb3e 100644 --- a/src/gui/qgsexpressionstoredialog.h +++ b/src/gui/qgsexpressionstoredialog.h @@ -56,7 +56,10 @@ class GUI_EXPORT QgsExpressionStoreDialog : public QDialog, private Ui::QgsExpre * Returns whether the label text was modified either manually by the user, * or automatically because it contained slashes or leading/trailing whitespace characters */ - bool isLabelModified() const SIP_SKIP { return mLabel->text() != mOriginalLabel; } + bool isLabelModified() const SIP_SKIP + { + return mLabel->text() != mOriginalLabel; + } private: QStringList mExistingLabels; diff --git a/src/gui/qgslayerpropertiesdialog.h b/src/gui/qgslayerpropertiesdialog.h index 4cc82c8d8bb..c5e466323d3 100644 --- a/src/gui/qgslayerpropertiesdialog.h +++ b/src/gui/qgslayerpropertiesdialog.h @@ -197,12 +197,14 @@ class GUI_EXPORT QgsLayerPropertiesDialog : public QgsOptionsDialogBase SIP_ABST /** * Resets the dialog to the current layer state. */ - virtual void syncToLayer() SIP_SKIP = 0; + virtual void syncToLayer() SIP_SKIP + = 0; /** * Applies the dialog settings to the layer. */ - virtual void apply() SIP_SKIP = 0; + virtual void apply() SIP_SKIP + = 0; /** * Rolls back changes made to the layer. diff --git a/src/gui/qgsmapcanvas.h b/src/gui/qgsmapcanvas.h index 8353b8fee80..0da6a9d4d73 100644 --- a/src/gui/qgsmapcanvas.h +++ b/src/gui/qgsmapcanvas.h @@ -766,7 +766,10 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsExpressionContex * \see defaultExpressionContextScope() * \note not available in Python bindings */ - const QgsExpressionContextScope &expressionContextScope() const SIP_SKIP { return mExpressionContextScope; } + const QgsExpressionContextScope &expressionContextScope() const SIP_SKIP + { + return mExpressionContextScope; + } /** * Creates a new scope which contains default variables and functions relating to the map canvas. diff --git a/src/gui/qgsmapcanvasannotationitem.h b/src/gui/qgsmapcanvasannotationitem.h index 46af2204322..3950cd09a30 100644 --- a/src/gui/qgsmapcanvasannotationitem.h +++ b/src/gui/qgsmapcanvasannotationitem.h @@ -77,7 +77,10 @@ class GUI_EXPORT QgsMapCanvasAnnotationItem : public QObject, public QgsMapCanva * Returns the item's annotation. * \note not available in Python bindings */ - const QgsAnnotation *annotation() const SIP_SKIP { return mAnnotation; } + const QgsAnnotation *annotation() const SIP_SKIP + { + return mAnnotation; + } /** * Returns the item's annotation. diff --git a/src/gui/qgsoptionswidgetfactory.h b/src/gui/qgsoptionswidgetfactory.h index 7ca208250a9..e4653c30d46 100644 --- a/src/gui/qgsoptionswidgetfactory.h +++ b/src/gui/qgsoptionswidgetfactory.h @@ -54,7 +54,10 @@ class GUI_EXPORT QgsOptionsPageWidget : public QWidget * Returns the registered highlight widgets used to search and highlight text in * options dialogs. */ - QHash registeredHighlightWidgets() SIP_SKIP { return mHighlightWidgets; } + QHash registeredHighlightWidgets() SIP_SKIP + { + return mHighlightWidgets; + } /** * Validates the current state of the widget. diff --git a/src/gui/qgspropertyoverridebutton.h b/src/gui/qgspropertyoverridebutton.h index 53147f512e5..aef3db4fc22 100644 --- a/src/gui/qgspropertyoverridebutton.h +++ b/src/gui/qgspropertyoverridebutton.h @@ -209,7 +209,10 @@ class GUI_EXPORT QgsPropertyOverrideButton : public QToolButton * by the widget. If not specified, a default created symbol will be used instead. * \note not available in Python bindings */ - void setSymbol( std::shared_ptr symbol ) SIP_SKIP { mSymbol = symbol; } + void setSymbol( std::shared_ptr symbol ) SIP_SKIP + { + mSymbol = symbol; + } public slots: diff --git a/src/gui/qgssourceselectprovider.h b/src/gui/qgssourceselectprovider.h index d24bd125a5f..018de85a4b7 100644 --- a/src/gui/qgssourceselectprovider.h +++ b/src/gui/qgssourceselectprovider.h @@ -60,7 +60,8 @@ class GUI_EXPORT QgsSourceSelectProvider Q_DECLARE_FLAGS( Capabilities, Capability ) Q_FLAG( Capabilities ) - virtual ~QgsSourceSelectProvider() = default; + virtual ~QgsSourceSelectProvider() + = default; //! Data Provider key virtual QString providerKey() const = 0;