Fix clazy fully-qualified-moc-types warnings

From the clazy docs:

"Warns when a signal, slot or invokable declaration is not using fully-qualified
type names, which will break old-style connects and interacting with QML."
This commit is contained in:
Nyall Dawson 2018-02-02 12:11:54 +10:00
parent b2b500d5b2
commit a08c05b20c
15 changed files with 57 additions and 57 deletions

View File

@ -264,7 +264,7 @@ the item's frame, only the way the picture is drawn within the item.
.. seealso:: :py:func:`pictureRotation`
%End
void setResizeMode( ResizeMode mode );
void setResizeMode( QgsLayoutItemPicture::ResizeMode mode );
%Docstring
Sets the resize ``mode`` used for drawing the picture within the item bounds.

View File

@ -189,12 +189,12 @@ Returns the conversion factor between the specified distance units.
%End
static DistanceUnitType unitType( AreaUnit unit );
static DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
%Docstring
Returns the type for an areal unit.
%End
static QString encodeUnit( AreaUnit unit );
static QString encodeUnit( QgsUnitTypes::AreaUnit unit );
%Docstring
Encodes an areal unit to a string.
@ -217,7 +217,7 @@ Decodes an areal unit from a string.
.. seealso:: :py:func:`encodeUnit`
%End
static QString toString( AreaUnit unit );
static QString toString( QgsUnitTypes::AreaUnit unit );
%Docstring
Returns a translated string representing an areal unit.
@ -226,7 +226,7 @@ Returns a translated string representing an areal unit.
.. seealso:: :py:func:`stringToAreaUnit`
%End
static QString toAbbreviatedString( AreaUnit unit );
static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );
%Docstring
Returns a translated abbreviation representing an areal unit.
@ -247,7 +247,7 @@ Converts a translated string to an areal unit.
.. seealso:: :py:func:`toString`
%End
static double fromUnitToUnitFactor( AreaUnit fromUnit, AreaUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::AreaUnit fromUnit, QgsUnitTypes::AreaUnit toUnit );
%Docstring
Returns the conversion factor between the specified areal units.
@ -257,7 +257,7 @@ Returns the conversion factor between the specified areal units.
:return: multiplication factor to convert between units
%End
static AreaUnit distanceToAreaUnit( QgsUnitTypes::DistanceUnit distanceUnit );
static QgsUnitTypes::AreaUnit distanceToAreaUnit( QgsUnitTypes::DistanceUnit distanceUnit );
%Docstring
Converts a distance unit to its corresponding area unit, e.g., meters to square meters
@ -267,7 +267,7 @@ Converts a distance unit to its corresponding area unit, e.g., meters to square
%End
static QString encodeUnit( AngleUnit unit );
static QString encodeUnit( QgsUnitTypes::AngleUnit unit );
%Docstring
Encodes an angular unit to a string.
@ -278,7 +278,7 @@ Encodes an angular unit to a string.
.. seealso:: :py:func:`decodeAngleUnit`
%End
static AngleUnit decodeAngleUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::AngleUnit decodeAngleUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes an angular unit from a string.
@ -290,14 +290,14 @@ Decodes an angular unit from a string.
.. seealso:: :py:func:`encodeUnit`
%End
static QString toString( AngleUnit unit );
static QString toString( QgsUnitTypes::AngleUnit unit );
%Docstring
Returns a translated string representing an angular unit.
:param unit: unit to convert to string
%End
static double fromUnitToUnitFactor( AngleUnit fromUnit, AngleUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::AngleUnit fromUnit, QgsUnitTypes::AngleUnit toUnit );
%Docstring
Returns the conversion factor between the specified angular units.
@ -307,7 +307,7 @@ Returns the conversion factor between the specified angular units.
:return: multiplication factor to convert between units
%End
static QString formatAngle( double angle, int decimals, AngleUnit unit );
static QString formatAngle( double angle, int decimals, QgsUnitTypes::AngleUnit unit );
%Docstring
Returns an angle formatted as a friendly string.
@ -376,7 +376,7 @@ square kilometers
%End
static QString encodeUnit( RenderUnit unit );
static QString encodeUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Encodes a render unit to a string.
@ -387,7 +387,7 @@ Encodes a render unit to a string.
.. seealso:: :py:func:`decodeRenderUnit`
%End
static RenderUnit decodeRenderUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::RenderUnit decodeRenderUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes a render unit from a string.
@ -399,7 +399,7 @@ Decodes a render unit from a string.
.. seealso:: :py:func:`encodeUnit`
%End
static QString toString( RenderUnit unit );
static QString toString( QgsUnitTypes::RenderUnit unit );
%Docstring
Returns a translated string representing a render ``unit``.
@ -408,7 +408,7 @@ Returns a translated string representing a render ``unit``.
static QString encodeUnit( LayoutUnit unit );
static QString encodeUnit( QgsUnitTypes::LayoutUnit unit );
%Docstring
Encodes a layout unit to a string.
@ -421,7 +421,7 @@ Encodes a layout unit to a string.
.. versionadded:: 3.0
%End
static LayoutUnit decodeLayoutUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::LayoutUnit decodeLayoutUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes a layout unit from a string.
@ -435,21 +435,21 @@ Decodes a layout unit from a string.
.. versionadded:: 3.0
%End
static LayoutUnitType unitType( const LayoutUnit units );
static QgsUnitTypes::LayoutUnitType unitType( const QgsUnitTypes::LayoutUnit units );
%Docstring
Returns the type for a unit of measurement.
.. versionadded:: 3.0
%End
static QString toAbbreviatedString( LayoutUnit unit );
static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );
%Docstring
Returns a translated abbreviation representing a layout ``unit`` (e.g. "mm").
.. versionadded:: 3.0
%End
static QString toString( LayoutUnit unit );
static QString toString( QgsUnitTypes::LayoutUnit unit );
%Docstring
Returns a translated string representing a layout ``unit``.

View File

@ -66,21 +66,21 @@ Views using this model should connect to and properly process this signal.
public slots:
virtual void select( const QModelIndex &index, SelectionFlags command );
virtual void select( const QModelIndex &index, QItemSelectionModel::SelectionFlags command );
%Docstring
Overwritten to do NOTHING (we handle selection ourselves)
.. seealso:: :py:func:`selectFeatures`
%End
virtual void select( const QItemSelection &selection, SelectionFlags command );
virtual void select( const QItemSelection &selection, QItemSelectionModel::SelectionFlags command );
%Docstring
Overwritten to do NOTHING (we handle selection ourselves)
.. seealso:: :py:func:`selectFeatures`
%End
virtual void selectFeatures( const QItemSelection &selection, SelectionFlags command );
virtual void selectFeatures( const QItemSelection &selection, QItemSelectionModel::SelectionFlags command );
%Docstring
Select features on this table. Is to be used in favor of the stock select methods.

View File

@ -222,7 +222,7 @@ Emit this signal, whenever the value changed.
:param value: The new value
%End
void constraintStatusChanged( const QString &constraint, const QString &desc, const QString &err, ConstraintResult status );
void constraintStatusChanged( const QString &constraint, const QString &desc, const QString &err, QgsEditorWidgetWrapper::ConstraintResult status );
%Docstring
Emit this signal when the constraint status changed.
constraintStatusChanged

View File

@ -95,7 +95,7 @@ Sets the color for the widget
.. seealso:: :py:func:`color`
%End
virtual void setComponent( const ColorComponent component );
virtual void setComponent( const QgsColorWidget::ColorComponent component );
%Docstring
Sets the color component which the widget controls

View File

@ -105,12 +105,12 @@ to this anchor widget whenever the widget's parent is resized or moved.
Emitted when the anchor widget changes
%End
void anchorPointChanged( AnchorPoint point );
void anchorPointChanged( QgsFloatingWidget::AnchorPoint point );
%Docstring
Emitted when the anchor point changes
%End
void anchorWidgetPointChanged( AnchorPoint point );
void anchorWidgetPointChanged( QgsFloatingWidget::AnchorPoint point );
%Docstring
Emitted when the anchor widget point changes
%End

View File

@ -61,7 +61,7 @@ class APP_EXPORT QgsMapToolIdentifyAction : public QgsMapToolIdentify
public slots:
void handleCopyToClipboard( QgsFeatureStore & );
void handleChangedRasterResults( QList<IdentifyResult> &results );
void handleChangedRasterResults( QList<QgsMapToolIdentify::IdentifyResult> &results );
signals:

View File

@ -51,7 +51,7 @@ class QgsAuthPkiPathsEdit : public QgsAuthMethodEdit, private Ui::QgsAuthPkiPath
private slots:
void clearPkiMessage( QLineEdit *lineedit );
void writePkiMessage( QLineEdit *lineedit, const QString &msg, Validity valid = Unknown );
void writePkiMessage( QLineEdit *lineedit, const QString &msg, QgsAuthPkiPathsEdit::Validity valid = Unknown );
void clearPkiPathsCertPath();
void clearPkiPathsKeyPath();

View File

@ -51,7 +51,7 @@ class QgsAuthPkcs12Edit : public QgsAuthMethodEdit, private Ui::QgsAuthPkcs12Edi
private slots:
void clearPkiMessage( QLineEdit *lineedit );
void writePkiMessage( QLineEdit *lineedit, const QString &msg, Validity valid = Unknown );
void writePkiMessage( QLineEdit *lineedit, const QString &msg, QgsAuthPkcs12Edit::Validity valid = Unknown );
void clearPkcs12BundlePath();
void clearPkcs12BundlePass();

View File

@ -245,7 +245,7 @@ class CORE_EXPORT QgsLayoutItemPicture: public QgsLayoutItem
* \param mode ResizeMode to use for image file
* \see resizeMode
*/
void setResizeMode( ResizeMode mode );
void setResizeMode( QgsLayoutItemPicture::ResizeMode mode );
/**
* Recalculates the source image (if using an expression for picture's source)

View File

@ -233,7 +233,7 @@ class CORE_EXPORT QgsUnitTypes
/**
* Returns the type for an areal unit.
*/
Q_INVOKABLE static DistanceUnitType unitType( AreaUnit unit );
Q_INVOKABLE static DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
/**
* Encodes an areal unit to a string.
@ -241,7 +241,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns encoded string
* \see decodeAreaUnit()
*/
Q_INVOKABLE static QString encodeUnit( AreaUnit unit );
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::AreaUnit unit );
/**
* Decodes an areal unit from a string.
@ -257,7 +257,7 @@ class CORE_EXPORT QgsUnitTypes
* \param unit unit to convert to string
* \see stringToAreaUnit()
*/
Q_INVOKABLE static QString toString( AreaUnit unit );
Q_INVOKABLE static QString toString( QgsUnitTypes::AreaUnit unit );
/**
* Returns a translated abbreviation representing an areal unit.
@ -266,7 +266,7 @@ class CORE_EXPORT QgsUnitTypes
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toAbbreviatedString( AreaUnit unit );
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );
/**
* Converts a translated string to an areal unit.
@ -282,14 +282,14 @@ class CORE_EXPORT QgsUnitTypes
* \param toUnit area unit to convert to
* \returns multiplication factor to convert between units
*/
Q_INVOKABLE static double fromUnitToUnitFactor( AreaUnit fromUnit, AreaUnit toUnit );
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::AreaUnit fromUnit, QgsUnitTypes::AreaUnit toUnit );
/**
* Converts a distance unit to its corresponding area unit, e.g., meters to square meters
* \param distanceUnit distance unit to convert
* \returns matching areal unit
*/
Q_INVOKABLE static AreaUnit distanceToAreaUnit( QgsUnitTypes::DistanceUnit distanceUnit );
Q_INVOKABLE static QgsUnitTypes::AreaUnit distanceToAreaUnit( QgsUnitTypes::DistanceUnit distanceUnit );
// ANGULAR UNITS
@ -299,7 +299,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns encoded string
* \see decodeAngleUnit()
*/
Q_INVOKABLE static QString encodeUnit( AngleUnit unit );
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::AngleUnit unit );
/**
* Decodes an angular unit from a string.
@ -308,13 +308,13 @@ class CORE_EXPORT QgsUnitTypes
* \returns decoded units
* \see encodeUnit()
*/
Q_INVOKABLE static AngleUnit decodeAngleUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::AngleUnit decodeAngleUnit( const QString &string, bool *ok SIP_OUT = nullptr );
/**
* Returns a translated string representing an angular unit.
* \param unit unit to convert to string
*/
Q_INVOKABLE static QString toString( AngleUnit unit );
Q_INVOKABLE static QString toString( QgsUnitTypes::AngleUnit unit );
/**
* Returns the conversion factor between the specified angular units.
@ -322,7 +322,7 @@ class CORE_EXPORT QgsUnitTypes
* \param toUnit angle unit to convert to
* \returns multiplication factor to convert between units
*/
Q_INVOKABLE static double fromUnitToUnitFactor( AngleUnit fromUnit, AngleUnit toUnit );
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::AngleUnit fromUnit, QgsUnitTypes::AngleUnit toUnit );
/**
* Returns an angle formatted as a friendly string.
@ -331,7 +331,7 @@ class CORE_EXPORT QgsUnitTypes
* \param unit unit of angle
* \returns formatted angle string
*/
Q_INVOKABLE static QString formatAngle( double angle, int decimals, AngleUnit unit );
Q_INVOKABLE static QString formatAngle( double angle, int decimals, QgsUnitTypes::AngleUnit unit );
/**
@ -390,7 +390,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns encoded string
* \see decodeRenderUnit()
*/
Q_INVOKABLE static QString encodeUnit( RenderUnit unit );
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::RenderUnit unit );
/**
* Decodes a render unit from a string.
@ -399,13 +399,13 @@ class CORE_EXPORT QgsUnitTypes
* \returns decoded units
* \see encodeUnit()
*/
Q_INVOKABLE static RenderUnit decodeRenderUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::RenderUnit decodeRenderUnit( const QString &string, bool *ok SIP_OUT = nullptr );
/**
* Returns a translated string representing a render \a unit.
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toString( RenderUnit unit );
Q_INVOKABLE static QString toString( QgsUnitTypes::RenderUnit unit );
// LAYOUT UNITS
@ -417,7 +417,7 @@ class CORE_EXPORT QgsUnitTypes
* \see decodeLayoutUnit()
* \since QGIS 3.0
*/
Q_INVOKABLE static QString encodeUnit( LayoutUnit unit );
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::LayoutUnit unit );
/**
* Decodes a layout unit from a string.
@ -427,28 +427,28 @@ class CORE_EXPORT QgsUnitTypes
* \see encodeUnit()
* \since QGIS 3.0
*/
Q_INVOKABLE static LayoutUnit decodeLayoutUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::LayoutUnit decodeLayoutUnit( const QString &string, bool *ok SIP_OUT = nullptr );
/**
* Returns the type for a unit of measurement.
*
* \since QGIS 3.0
*/
Q_INVOKABLE static LayoutUnitType unitType( const LayoutUnit units );
Q_INVOKABLE static QgsUnitTypes::LayoutUnitType unitType( const QgsUnitTypes::LayoutUnit units );
/**
* Returns a translated abbreviation representing a layout \a unit (e.g. "mm").
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toAbbreviatedString( LayoutUnit unit );
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );
/**
* Returns a translated string representing a layout \a unit.
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toString( LayoutUnit unit );
Q_INVOKABLE static QString toString( QgsUnitTypes::LayoutUnit unit );
};

View File

@ -88,14 +88,14 @@ class GUI_EXPORT QgsFeatureSelectionModel : public QItemSelectionModel
*
* \see selectFeatures( const QItemSelection&, SelectionFlags )
*/
void select( const QModelIndex &index, SelectionFlags command ) override { Q_UNUSED( index ); Q_UNUSED( command ); }
void select( const QModelIndex &index, QItemSelectionModel::SelectionFlags command ) override { Q_UNUSED( index ); Q_UNUSED( command ); }
/**
* Overwritten to do NOTHING (we handle selection ourselves)
*
* \see selectFeatures( const QItemSelection&, SelectionFlags )
*/
void select( const QItemSelection &selection, SelectionFlags command ) override { Q_UNUSED( selection ); Q_UNUSED( command ); }
void select( const QItemSelection &selection, QItemSelectionModel::SelectionFlags command ) override { Q_UNUSED( selection ); Q_UNUSED( command ); }
/**
* Select features on this table. Is to be used in favor of the stock select methods.
@ -103,7 +103,7 @@ class GUI_EXPORT QgsFeatureSelectionModel : public QItemSelectionModel
* \param selection The QItemSelection which will be selected
* \param command The command to apply. Select, Deselect and ClearAndSelect are processed.
*/
virtual void selectFeatures( const QItemSelection &selection, SelectionFlags command );
virtual void selectFeatures( const QItemSelection &selection, QItemSelectionModel::SelectionFlags command );
virtual void setFeatureSelectionManager( QgsIFeatureSelectionManager *featureSelectionManager SIP_TRANSFER );

View File

@ -230,7 +230,7 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper
* \param err the error represented as a string. Empty if none.
* \param status
*/
void constraintStatusChanged( const QString &constraint, const QString &desc, const QString &err, ConstraintResult status );
void constraintStatusChanged( const QString &constraint, const QString &desc, const QString &err, QgsEditorWidgetWrapper::ConstraintResult status );
/**
* Emit this signal when the constraint result visibility changed.

View File

@ -108,7 +108,7 @@ class GUI_EXPORT QgsColorWidget : public QWidget
* \param component color component for widget
* \see component
*/
virtual void setComponent( const ColorComponent component );
virtual void setComponent( const QgsColorWidget::ColorComponent component );
/**
* Alters the widget's color by setting the value for the widget's color component

View File

@ -112,10 +112,10 @@ class GUI_EXPORT QgsFloatingWidget: public QWidget
void anchorWidgetChanged( QWidget *widget );
//! Emitted when the anchor point changes
void anchorPointChanged( AnchorPoint point );
void anchorPointChanged( QgsFloatingWidget::AnchorPoint point );
//! Emitted when the anchor widget point changes
void anchorWidgetPointChanged( AnchorPoint point );
void anchorWidgetPointChanged( QgsFloatingWidget::AnchorPoint point );
protected:
void showEvent( QShowEvent *e ) override;