Skip to content
Permalink
Browse files

Qt 5.5 prefers Q_FLAG over Q_FLAGS

this also allow to use QMetaEnum for flags
  • Loading branch information
3nids committed Feb 19, 2018
1 parent 1a1b197 commit 42908ebbe9a9449947464fa68f374488005916ad
@@ -32,7 +32,6 @@ class QgsFieldModel;
class CORE_EXPORT QgsFieldProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_FLAGS( Filters )

public:

@@ -50,6 +49,7 @@ class CORE_EXPORT QgsFieldProxyModel : public QSortFilterProxyModel
AllTypes = Numeric | Date | String | Time, //!< All field types
};
Q_DECLARE_FLAGS( Filters, Filter )
Q_FLAG( Filters )

/**
* \brief QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model.
@@ -33,7 +33,6 @@ class QgsMapLayer;
class CORE_EXPORT QgsMapLayerProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_FLAGS( Filters )

Q_PROPERTY( QgsMapLayerProxyModel::Filters filters READ filters WRITE setFilters )
Q_PROPERTY( QList<QgsMapLayer *> exceptedLayerList READ exceptedLayerList WRITE setExceptedLayerList )
@@ -54,6 +53,7 @@ class CORE_EXPORT QgsMapLayerProxyModel : public QSortFilterProxyModel
All = RasterLayer | VectorLayer | PluginLayer
};
Q_DECLARE_FLAGS( Filters, Filter )
Q_FLAG( Filters )

/**
* \brief QgsMapLayerProxModel creates a proxy model with a QgsMapLayerModel as source model.
@@ -42,7 +42,6 @@ class QgsPointXY;
class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private Ui::QgsAdvancedDigitizingDockWidgetBase
{
Q_OBJECT
Q_FLAGS( CadCapacities )

public:

@@ -58,6 +57,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
RelativeCoordinates = 4, //!< This corresponds to distance and relative coordinates
};
Q_DECLARE_FLAGS( CadCapacities, CadCapacity )
Q_FLAG( CadCapacities )

/**
* Additional constraints which can be enabled
@@ -37,7 +37,6 @@ class QgsVectorLayer;
class GUI_EXPORT QgsFieldComboBox : public QComboBox
{
Q_OBJECT
Q_FLAGS( QgsFieldProxyModel::Filters )
Q_PROPERTY( QgsFieldProxyModel::Filters filters READ filters WRITE setFilters )
Q_PROPERTY( bool allowEmptyFieldName READ allowEmptyFieldName WRITE setAllowEmptyFieldName )

@@ -50,8 +50,6 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
Q_PROPERTY( QgsFieldProxyModel::Filters filters READ filters WRITE setFilters )
Q_PROPERTY( bool allowEvalErrors READ allowEvalErrors WRITE setAllowEvalErrors NOTIFY allowEvalErrorsChanged )

Q_FLAGS( QgsFieldProxyModel::Filters )

public:

/**
@@ -34,7 +34,6 @@ class QgsFeature;
class GUI_EXPORT QgsMapLayerAction : public QAction
{
Q_OBJECT
Q_FLAGS( Availability )

public:
enum Target
@@ -45,6 +44,7 @@ class GUI_EXPORT QgsMapLayerAction : public QAction
AllActions = Layer | SingleFeature | MultipleFeatures
};
Q_DECLARE_FLAGS( Targets, Target )
Q_FLAG( Targets )

/**
* Creates a map layer action which can run on any layer
@@ -34,7 +34,6 @@ class QgsVectorLayer;
class GUI_EXPORT QgsMapLayerComboBox : public QComboBox
{
Q_OBJECT
Q_FLAGS( QgsMapLayerProxyModel::Filters )
Q_PROPERTY( QgsMapLayerProxyModel::Filters filters READ filters WRITE setFilters )
Q_PROPERTY( bool allowEmptyLayer READ allowEmptyLayer WRITE setAllowEmptyLayer )
Q_PROPERTY( bool showCrs READ showCrs WRITE setShowCrs )
@@ -46,7 +46,6 @@ class QgsDistanceArea;
class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool
{
Q_OBJECT
Q_FLAGS( LayerType )

public:

@@ -67,6 +66,7 @@ class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool
AllLayers = VectorLayer | RasterLayer
};
Q_DECLARE_FLAGS( LayerType, Type )
Q_FLAG( LayerType )

struct IdentifyResult
{

0 comments on commit 42908eb

Please sign in to comment.
You can’t perform that action at this time.