Skip to content
Permalink
Browse files
[sipify] Add check that doxygen //!< command is only used for enum
documentation

sipify can't handle it in other contexts
  • Loading branch information
nyalldawson committed Jul 19, 2021
1 parent 2724315 commit 4bb7f82f2e56f9decca15f9b9a88f35adf20f0cb
@@ -140,11 +140,11 @@ Sets the query execution time to ``queryExecutionTime`` milliseconds.

struct SqlVectorLayerOptions
{
QString sql; //!< The SQL expression that defines the SQL (query) layer
QString filter; //!< Additional subset string (provider-side filter), not all data providers support this feature: check support with SqlLayerDefinitionCapability::Filters capability
QString layerName; //!< Optional name for the new layer
QStringList primaryKeyColumns; //!< List of primary key column names
QString geometryColumn; //!< Name of the geometry column
QString sql;
QString filter;
QString layerName;
QStringList primaryKeyColumns;
QString geometryColumn;
bool disableSelectAtId;
};

@@ -29,9 +29,9 @@ to a data provider for remote calculation.

struct AggregateInfo
{
QString function; //!< The expression function
QString name; //!< A translated, human readable name
QSet<QVariant::Type> supportedTypes; //!< This aggregate function can only be used with these datatypes
QString function;
QString name;
QSet<QVariant::Type> supportedTypes;
};

enum Aggregate
@@ -39,8 +39,11 @@ Constructor for ColumnConfig


QgsAttributeTableConfig::Type type;
QString name; //!< The name of the attribute if this column represents a field

QString name;

bool hidden;

int width;
};

@@ -55,8 +55,9 @@ Copy constructor
{
SizeClass( double size, const QString &label );

double size; //!< Marker size in units used by the symbol (usually millimeters). May be further scaled before rendering if size scale transformer is enabled.
QString label; //!< Label to be shown with the particular symbol size
double size;

QString label;
};

void setLegendType( LegendType type );
@@ -106,13 +106,14 @@ end of iterating: free the resources / lock

struct FetchJoinInfo
{
const QgsVectorLayerJoinInfo *joinInfo;//!< Canonical source of information about the join
QgsAttributeList attributes; //!< Attributes to fetch
int indexOffset; //!< At what position the joined fields start
const QgsVectorLayerJoinInfo *joinInfo;
QgsAttributeList attributes;
int indexOffset;


int targetField; //!< Index of field (of this layer) that drives the join
int joinField; //!< Index of field (of the joined layer) must have equal value
int targetField;

int joinField;

void addJoinedAttributesCached( QgsFeature &f, const QVariant &joinValue ) const;
void addJoinedAttributesDirect( QgsFeature &f, const QVariant &joinValue ) const;
@@ -44,10 +44,14 @@ class QgsSublayersDialog : QDialog
struct LayerDefinition
{
int layerId;
QString layerName; //!< Name of the layer (not necessarily unique)

QString layerName;

int count;
QString type; //!< Extra type depending on the use (e.g. geometry type for vector sublayers)
QString description; //!< Description. Added in QGIS 3.10

QString type;

QString description;
};

typedef QList<QgsSublayersDialog::LayerDefinition> LayerDefinitionList;
@@ -122,6 +126,7 @@ Returns column with count or -1
protected:



};

/************************************************************************
@@ -794,7 +794,7 @@ sub detect_non_method_member{
next;
}

# insert metaoject for Q_GADGET
# insert metaobject for Q_GADGET
if ($LINE =~ m/^\s*Q_GADGET\b.*?$/){
if ($LINE !~ m/SIP_SKIP/){
dbg_info('Q_GADGET');
@@ -990,7 +990,7 @@ sub detect_non_method_member{
pop(@CLASSNAME);
if ($#ACCESS == 0){
dbg_info("reached top level");
# top level should stasy public
# top level should stay public
$ACCESS[$#ACCESS] = PUBLIC;
}
$COMMENT = '';
@@ -1151,6 +1151,10 @@ sub detect_non_method_member{
}
}

if( $LINE =~ /.*\/\/\!\</ ) {
exit_with_error("\"\\\\!<\" doxygen command must only be used for enum documentation")
}

$IS_OVERRIDE = 1 if ( $LINE =~ m/\boverride\b/);
$IS_OVERRIDE = 1 if ( $LINE =~ m/\bFINAL\b/);

@@ -235,12 +235,18 @@ class CORE_EXPORT QgsAbstractDatabaseProviderConnection : public QgsAbstractProv
*/
struct CORE_EXPORT SqlVectorLayerOptions
{
QString sql; //!< The SQL expression that defines the SQL (query) layer
QString filter; //!< Additional subset string (provider-side filter), not all data providers support this feature: check support with SqlLayerDefinitionCapability::Filters capability
QString layerName; //!< Optional name for the new layer
QStringList primaryKeyColumns; //!< List of primary key column names
QString geometryColumn; //!< Name of the geometry column
bool disableSelectAtId = false; //!< If SelectAtId is disabled (default is false), not all data providers support this feature: check support with SqlLayerDefinitionCapability::SelectAtId capability
//! The SQL expression that defines the SQL (query) layer
QString sql;
//! Additional subset string (provider-side filter), not all data providers support this feature: check support with SqlLayerDefinitionCapability::Filters capability
QString filter;
//! Optional name for the new layer
QString layerName;
//! List of primary key column names
QStringList primaryKeyColumns;
//! Name of the geometry column
QString geometryColumn;
//! If SelectAtId is disabled (default is false), not all data providers support this feature: check support with SqlLayerDefinitionCapability::SelectAtId capability
bool disableSelectAtId = false;
};

/**
@@ -52,9 +52,12 @@ class CORE_EXPORT QgsAggregateCalculator
*/
struct AggregateInfo
{
QString function; //!< The expression function
QString name; //!< A translated, human readable name
QSet<QVariant::Type> supportedTypes; //!< This aggregate function can only be used with these datatypes
//! The expression function
QString function;
//! A translated, human readable name
QString name;
//! This aggregate function can only be used with these datatypes
QSet<QVariant::Type> supportedTypes;
};

/**
@@ -57,10 +57,17 @@ class CORE_EXPORT QgsAttributeTableConfig
// TODO c++20 - replace with = default
bool operator== ( const QgsAttributeTableConfig::ColumnConfig &other ) const SIP_SKIP;

QgsAttributeTableConfig::Type type = Field; //!< The type of this column.
QString name; //!< The name of the attribute if this column represents a field
bool hidden = false; //!< Flag that controls if the column is hidden
int width = -1; //!< Width of column, or -1 for default width
//! The type of this column.
QgsAttributeTableConfig::Type type = Field;

//! The name of the attribute if this column represents a field
QString name;

//! Flag that controls if the column is hidden
bool hidden = false;

//! Width of column, or -1 for default width
int width = -1;
};

/**
@@ -73,8 +73,11 @@ class CORE_EXPORT QgsDataDefinedSizeLegend
{
SizeClass( double size, const QString &label ): size( size ), label( label ) {}

double size; //!< Marker size in units used by the symbol (usually millimeters). May be further scaled before rendering if size scale transformer is enabled.
QString label; //!< Label to be shown with the particular symbol size
//! Marker size in units used by the symbol (usually millimeters). May be further scaled before rendering if size scale transformer is enabled.
double size;

//! Label to be shown with the particular symbol size
QString label;
};

//! Sets how the legend should be rendered
@@ -849,8 +849,10 @@ class CORE_EXPORT QgsMapSettings : public QgsTemporalRangeObject
QgsLabelingEngineSettings mLabelingEngineSettings;

// derived properties
bool mValid = false; //!< Whether the actual settings are valid (set in updateDerived())
QgsRectangle mVisibleExtent; //!< Extent with some additional white space that matches the output aspect ratio
//! Whether the actual settings are valid (set in updateDerived())
bool mValid = false;
//! Extent with some additional white space that matches the output aspect ratio
QgsRectangle mVisibleExtent;
double mMapUnitsPerPixel = 1;
double mScale = 1;

@@ -146,10 +146,14 @@ class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeatureItera
*/
struct CORE_EXPORT FetchJoinInfo
{
const QgsVectorLayerJoinInfo *joinInfo;//!< Canonical source of information about the join
QgsAttributeList attributes; //!< Attributes to fetch
QMap<int, int> attributesSourceToDestLayerMap SIP_SKIP; //!< Mapping from original attribute index to the joined layer index
int indexOffset; //!< At what position the joined fields start
//! Canonical source of information about the join
const QgsVectorLayerJoinInfo *joinInfo;
//! Attributes to fetch
QgsAttributeList attributes;
//! Mapping from original attribute index to the joined layer index
QMap<int, int> attributesSourceToDestLayerMap SIP_SKIP;
//! At what position the joined fields start
int indexOffset;

#ifndef SIP_RUN

@@ -170,8 +174,11 @@ class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeatureItera
QgsFields joinLayerFields;
#endif

int targetField; //!< Index of field (of this layer) that drives the join
int joinField; //!< Index of field (of the joined layer) must have equal value
//! Index of field (of this layer) that drives the join
int targetField;

//!< Index of field (of the joined layer) must have equal value
int joinField;

void addJoinedAttributesCached( QgsFeature &f, const QVariant &joinValue ) const;
void addJoinedAttributesDirect( QgsFeature &f, const QVariant &joinValue ) const;
@@ -76,11 +76,24 @@ class GUI_EXPORT QgsSublayersDialog : public QDialog, private Ui::QgsSublayersDi
*/
struct LayerDefinition
{
int layerId = -1 ; //!< Identifier of the layer (one unique layer id may have multiple types though)
QString layerName; //!< Name of the layer (not necessarily unique)
int count = -1 ; //!< Number of features (might be unused)
QString type; //!< Extra type depending on the use (e.g. geometry type for vector sublayers)
QString description; //!< Description. Added in QGIS 3.10
//! Identifier of the layer (one unique layer id may have multiple types though)
int layerId = -1;

//! Name of the layer (not necessarily unique)
QString layerName;

//! Number of features (might be unused)
int count = -1;

//! Extra type depending on the use (e.g. geometry type for vector sublayers)
QString type;

/**
* Description.
*
* \since QGIS 3.10
*/
QString description;
};

/**
@@ -160,13 +173,17 @@ class GUI_EXPORT QgsSublayersDialog : public QDialog, private Ui::QgsSublayersDi
*/
QString mName;
QStringList mSelectedSubLayers;
bool mShowCount = false; //!< Whether to show number of features in the table
bool mShowType = false; //!< Whether to show type in the table
bool mShowDescription = false; //!< Whether to show description in the table

private:
//! Whether to show number of features in the table
bool mShowCount = false;
//! Whether to show type in the table
bool mShowType = false;
//! Whether to show description in the table
bool mShowDescription = false;

bool mShowAddToGroupCheckbox = false; //!< Whether to show the add to group checkbox
private:
//! Whether to show the add to group checkbox
bool mShowAddToGroupCheckbox = false;
};

#endif

0 comments on commit 4bb7f82

Please sign in to comment.