Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format on src/gui + fix windows builds #59760

Merged
merged 12 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ UseTab: Never
Macros:
- SIP_ENUM_BASETYPE(x)=x
- SIP_MONKEYPATCH_SCOPEENUM_UNNEST(x,y)=x

AttributeMacros:
- SIP_SKIP
---

Language: ObjC
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ repos:
exclude: |
(?x)^(
src/core/.*|
src/gui/.*|
src/3d/.*|
src/server/.*|
tests/code_layout/sipify/sipifyheader.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
QgsAdvancedDigitizingDockWidget.CadCapacities.baseClass = QgsAdvancedDigitizingDockWidget
CadCapacities = QgsAdvancedDigitizingDockWidget # dirty hack since SIP seems to introduce the flags in module
QgsAdvancedDigitizingDockWidget.ReturnPressed = QgsAdvancedDigitizingDockWidget.WidgetSetMode.ReturnPressed
QgsAdvancedDigitizingDockWidget.FocusOut = QgsAdvancedDigitizingDockWidget.WidgetSetMode.FocusOut
QgsAdvancedDigitizingDockWidget.TextEdited = QgsAdvancedDigitizingDockWidget.WidgetSetMode.TextEdited
QgsAdvancedDigitizingDockWidget.CadConstraint.NoLock = QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode.NoLock
QgsAdvancedDigitizingDockWidget.CadConstraint.SoftLock = QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode.SoftLock
QgsAdvancedDigitizingDockWidget.CadConstraint.HardLock = QgsAdvancedDigitizingDockWidget.CadConstraint.LockMode.HardLock
Expand Down
18 changes: 8 additions & 10 deletions python/PyQt6/gui/auto_generated/actions/qgsactionmenu.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ This class is a menu that is populated automatically with the actions defined fo
#include "qgsactionmenu.h"
%End
public:

struct ActionData
{

ActionData();
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );

Qgis::ActionType actionType;
QVariant actionData;
QgsFeatureId featureId;
QgsMapLayer *mapLayer;
ActionData();
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );

Qgis::ActionType actionType;
QVariant actionData;
QgsFeatureId featureId;
QgsMapLayer *mapLayer;
};

explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ The class can be used in two manners:
#include "qgsmaplayeraction.h"
%End
public:

QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, Qgis::MapLayerActionTargets targets = Qgis::MapLayerActionTarget::AllActions, const QIcon &icon = QIcon(), Qgis::MapLayerActionFlags flags = Qgis::MapLayerActionFlags() );
%Docstring
Creates a map layer action which can run on any layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Encapsulates the context in which a :py:class:`QgsMapLayerAction` action is exec
#include "qgsmaplayeractioncontext.h"
%End
public:

QgsMapLayerActionContext();

QgsAttributeDialog *attributeDialog() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ An interface for objects which can create a :py:class:`QgsMapLayerActionContext`
#include "qgsmaplayeractioncontextgenerator.h"
%End
public:

virtual ~QgsMapLayerActionContextGenerator();

virtual QgsMapLayerActionContext createActionContext() = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ This class tracks map layer actions.
#include "qgsmaplayeractionregistry.h"
%End
public:

QgsMapLayerActionRegistry( QObject *parent = 0 );
%Docstring
Constructor for QgsMapLayerActionRegistry.
Expand Down Expand Up @@ -61,7 +60,6 @@ Returns the default action for a layer

protected:


signals:
void changed();
%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



class QgsAnnotationItemCommonPropertiesWidget: QWidget
class QgsAnnotationItemCommonPropertiesWidget : QWidget
{
%Docstring(signature="appended")

Expand All @@ -22,7 +22,6 @@ A widget for configuring common properties for :py:class:`QgsAnnotationItems`
#include "qgsannotationitemcommonpropertieswidget.h"
%End
public:

QgsAnnotationItemCommonPropertiesWidget( QWidget *parent /TransferThis/ );
%Docstring
Constructor for QgsAnnotationItemCommonPropertiesWidget.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ the components related to the GUI behavior of an annotation item.
#include "qgsannotationitemguiregistry.h"
%End
public:

QgsAnnotationItemAbstractGuiMetadata( const QString &type, const QString &visibleName, const QString &groupId = QString(), Qgis::AnnotationItemGuiFlags flags = Qgis::AnnotationItemGuiFlags() );
%Docstring
Constructor for QgsAnnotationItemAbstractGuiMetadata with the specified class ``type``.
Expand Down Expand Up @@ -114,7 +113,6 @@ to display grouped within toolbars.
#include "qgsannotationitemguiregistry.h"
%End
public:

QgsAnnotationItemGuiGroup( const QString &id = QString(), const QString &name = QString(), const QIcon &icon = QIcon() );
%Docstring
Constructor for QgsAnnotationItemGuiGroup.
Expand All @@ -125,7 +123,6 @@ Constructor for QgsAnnotationItemGuiGroup.
QString name;

QIcon icon;

};


Expand All @@ -147,7 +144,6 @@ the components related to the GUI behavior of annotation items.
#include "qgsannotationitemguiregistry.h"
%End
public:

QgsAnnotationItemGuiRegistry( QObject *parent = 0 );
%Docstring
Creates a new empty item GUI registry.
Expand Down Expand Up @@ -218,7 +214,7 @@ called for items added programmatically.
Creates a new instance of an annotation item configuration widget for the specified ``item``.
%End

QList< int > itemMetadataIds() const;
QList<int> itemMetadataIds() const;
%Docstring
Returns a list of available item metadata ids handled by the registry.
%End
Expand All @@ -240,9 +236,6 @@ Emitted whenever a new item type is added to the registry, with the specified
QgsAnnotationItemGuiRegistry( const QgsAnnotationItemGuiRegistry &rh );
};




/************************************************************************
* This file has been generated automatically from *
* *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@



class QgsAnnotationItemBaseWidget: QgsPanelWidget
class QgsAnnotationItemBaseWidget : QgsPanelWidget
{
%Docstring(signature="appended")

Expand All @@ -23,7 +23,6 @@ All annotation item widgets should inherit from this base class.
#include "qgsannotationitemwidget.h"
%End
public:

QgsAnnotationItemBaseWidget( QWidget *parent /TransferThis/ );
%Docstring
Constructor for QgsAnnotationItemBaseWidget.
Expand Down Expand Up @@ -114,7 +113,6 @@ Emitted when the annotation item definition in the widget is changed by the user
%End

protected:

virtual bool setNewItem( QgsAnnotationItem *item );
%Docstring
Attempts to update the widget to show the properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ whenever this signal is emitted.
#include "qgscreateannotationitemmaptool.h"
%End
public:

QgsCreateAnnotationItemMapToolHandler( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, QObject *parent = 0 );
%Docstring
Constructor for QgsCreateAnnotationItemMapToolHandler, with the specified ``parent`` object.
Expand Down Expand Up @@ -85,7 +84,6 @@ whenever this signal is emitted.
%End
public:


virtual ~QgsCreateAnnotationItemMapToolInterface();

virtual QgsCreateAnnotationItemMapToolHandler *handler() const = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ QItemDelegate).
#include "qgsattributetabledelegate.h"
%End
public:

QgsAttributeTableDelegate( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@



class QgsAttributeTableFilterModel: QSortFilterProxyModel, QgsFeatureModel
class QgsAttributeTableFilterModel : QSortFilterProxyModel, QgsFeatureModel
{

%TypeHeaderCode
#include "qgsattributetablefiltermodel.h"
%End
public:

enum FilterMode /BaseType=IntEnum/
{
ShowAll,
Expand Down Expand Up @@ -253,7 +252,6 @@ Emitted when an error occurred while filtering features
%End

protected:

virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;

%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@



class QgsAttributeTableModel: QAbstractTableModel
class QgsAttributeTableModel : QAbstractTableModel
{
%Docstring(signature="appended")
A model backed by a :py:class:`QgsVectorLayerCache` which is able to provide
Expand All @@ -27,7 +27,6 @@ Is mostly referred to as "master model" within this doc and the source.
%End
public:


enum class CustomRole /BaseType=IntEnum/
{
FeatureId,
Expand All @@ -38,7 +37,6 @@ Is mostly referred to as "master model" within this doc and the source.
};

public:

QgsAttributeTableModel( QgsVectorLayerCache *layerCache, QObject *parent = 0 );
%Docstring
Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Or this can be used within the :py:class:`QgsDualView` stacked widget.
#include "qgsattributetableview.h"
%End
public:

QgsAttributeTableView( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsAttributeTableView
Expand Down Expand Up @@ -82,8 +81,8 @@ Closes the editor delegate for the current item, committing its changes to the m

.. versionadded:: 3.30
%End
protected:

protected:
virtual void mousePressEvent( QMouseEvent *event );

%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ and the attributes for the currently selected feature are shown in a form.
#include "qgsdualview.h"
%End
public:

enum ViewMode /BaseType=IntEnum/
{

Expand All @@ -51,11 +50,7 @@ Constructor
%End
~QgsDualView();

void init( QgsVectorLayer *layer,
QgsMapCanvas *mapCanvas,
const QgsFeatureRequest &request = QgsFeatureRequest(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
bool loadFeatures = true, bool showFirstFeature = true );
void init( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const QgsFeatureRequest &request = QgsFeatureRequest(), const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), bool loadFeatures = true, bool showFirstFeature = true );
%Docstring
Has to be called to initialize the dual view.

Expand Down Expand Up @@ -241,7 +236,7 @@ Toggles whether search mode should be enabled in the form.
Copy the content of the selected cell in the clipboard.
%End

void cancelProgress( );
void cancelProgress();
%Docstring
Cancel the progress dialog (if any)
%End
Expand Down Expand Up @@ -306,7 +301,6 @@ class QgsAttributeTableAction : QAction
#include "qgsdualview.h"
%End
public:

QgsAttributeTableAction( const QString &name, QgsDualView *dualView, QUuid action, const QModelIndex &fieldIdx );
%Docstring
Create a new attribute table action.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class QgsFeatureListModel : QSortFilterProxyModel, QgsFeatureModel
struct FeatureInfo
{
public:

FeatureInfo();

bool isNew;
Expand All @@ -35,7 +34,6 @@ class QgsFeatureListModel : QSortFilterProxyModel, QgsFeatureModel
};

public:

explicit QgsFeatureListModel( QgsAttributeTableFilterModel *sourceModel, QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsFeatureListModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Uses a :py:class:`QgsFeatureListModel` as source model.
#include "qgsfeaturelistview.h"
%End
public:

explicit QgsFeatureListView( QWidget *parent /TransferThis/ = 0 );
%Docstring
Creates a feature list view
Expand Down Expand Up @@ -202,7 +201,6 @@ editLastFeature will try to edit the last feature of the list
%End



};

/************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ A widget for customizing conditional formatting options.
#include "qgsfieldconditionalformatwidget.h"
%End
public:

explicit QgsFieldConditionalFormatWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsFieldConditionalFormatWidget.
Expand Down Expand Up @@ -99,7 +98,6 @@ A widget for customizing an individual conditional formatting rule.
#include "qgsfieldconditionalformatwidget.h"
%End
public:

explicit QgsEditConditionalFormatRuleWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for :py:class:`QgsFieldConditionalFormatWidget`, with the specified ``parent`` widget.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Dialog for organising (hiding and reordering) columns in the attributes table.
#include "qgsorganizetablecolumnsdialog.h"
%End
public:

QgsOrganizeTableColumnsDialog( const QgsVectorLayer *vl, const QgsAttributeTableConfig &config, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::Window );
%Docstring
Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Widget for viewing and editing authentication identities database
#include "qgsauthauthoritieseditor.h"
%End
public:

explicit QgsAuthAuthoritiesEditor( QWidget *parent /TransferThis/ = 0 );
%Docstring
Widget for viewing and editing certificate authorities directly in database
Expand Down
Loading
Loading