Skip to content
Permalink
Browse files

* fix cppcheck warnings

* some sip updates
* [API] fix spelling QgsMultiRenderChecker::drawBackround
* [API] fix spelling QgsSymbolLayerV2Utils::drawStippledBackround
* [API] fix spelling QgsMapSettings::layerTransfrom
  • Loading branch information
jef-n committed Nov 20, 2014
1 parent d897aa5 commit a57066a48d5d9c6103d455ca49b5edd472a2cb74
Showing with 412 additions and 300 deletions.
  1. +3 −3 python/core/composer/qgscomposertablev2.sip
  2. +17 −17 python/core/qgscolorscheme.sip
  3. +4 −4 python/core/qgscoordinatetransform.sip
  4. +5 −2 python/core/qgsdataitem.sip
  5. +18 −29 python/core/qgsmaplayer.sip
  6. +1 −1 python/core/qgsmapsettings.sip
  7. +1 −1 python/core/qgsmultirenderchecker.sip
  8. +42 −7 python/core/qgsrenderchecker.sip
  9. +11 −6 python/core/symbology-ng/qgssymbollayerv2utils.sip
  10. +54 −0 python/gui/qgsattributeform.sip
  11. +4 −2 python/gui/qgscolorbuttonv2.sip
  12. +1 −1 python/gui/qgscolordialog.sip
  13. +8 −8 python/gui/qgscolorschemelist.sip
  14. +10 −8 python/gui/qgscolorswatchgrid.sip
  15. +7 −8 python/gui/qgscolorwidgets.sip
  16. +1 −1 python/gui/raster/qgsrasterhistogramwidget.sip
  17. +2 −1 src/analysis/interpolation/Bezier3D.cc
  18. +2 −0 src/app/gps/qwtpolar-0.1/qwt_polar_curve.cpp
  19. +1 −0 src/app/gps/qwtpolar-0.1/qwt_polar_itemdict.h
  20. +1 −0 src/app/gps/qwtpolar-0.1/qwt_polar_layout.h
  21. +3 −0 src/app/gps/qwtpolar-0.1/qwt_polar_marker.cpp
  22. +5 −0 src/app/gps/qwtpolar-0.1/qwt_polar_spectrogram.cpp
  23. +2 −0 src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp
  24. +1 −0 src/app/gps/qwtpolar-1.0/qwt_polar_itemdict.h
  25. +2 −0 src/app/gps/qwtpolar-1.0/qwt_polar_layout.h
  26. +2 −0 src/app/gps/qwtpolar-1.0/qwt_polar_marker.cpp
  27. +3 −0 src/app/gps/qwtpolar-1.0/qwt_polar_spectrogram.cpp
  28. +1 −0 src/app/main.cpp
  29. +3 −3 src/core/composer/qgscomposermapgrid.cpp
  30. +1 −1 src/core/composer/qgscomposertablev2.cpp
  31. +1 −1 src/core/composer/qgscomposertablev2.h
  32. +2 −0 src/core/pal/pal.cpp
  33. +1 −1 src/core/pal/pointset.cpp
  34. +3 −0 src/core/pal/priorityqueue.h
  35. +2 −2 src/core/pal/rtree.hpp
  36. +9 −10 src/core/qgscolorscheme.cpp
  37. +16 −16 src/core/qgscolorscheme.h
  38. +4 −4 src/core/qgscoordinatetransform.cpp
  39. +3 −3 src/core/qgscoordinatetransform.h
  40. +2 −2 src/core/qgsdataitem.h
  41. +1 −1 src/core/qgsgeometry.cpp
  42. +1 −1 src/core/qgsgml.cpp
  43. +1 −1 src/core/qgslegacyhelpers.cpp
  44. +1 −1 src/core/qgslegacyhelpers.h
  45. +1 −1 src/core/qgsmaphittest.cpp
  46. +1 −3 src/core/qgsmaplayer.cpp
  47. +1 −1 src/core/qgsmaplayer.h
  48. +1 −1 src/core/qgsmaprenderercustompainterjob.cpp
  49. +1 −1 src/core/qgsmaprendererjob.cpp
  50. +9 −9 src/core/qgsmapsettings.cpp
  51. +1 −1 src/core/qgsmapsettings.h
  52. +1 −1 src/core/qgsmultirenderchecker.h
  53. +2 −2 src/core/qgsrenderchecker.cpp
  54. +5 −3 src/core/qgsrenderchecker.h
  55. +1 −0 src/core/qgsvectorlayercache.h
  56. +1 −1 src/core/qgsvectorlayerrenderer.cpp
  57. +3 −3 src/core/symbology-ng/qgssymbollayerv2utils.cpp
  58. +2 −2 src/core/symbology-ng/qgssymbollayerv2utils.h
  59. +0 −6 src/gui/attributetable/qgsattributetablefiltermodel.cpp
  60. +1 −1 src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
  61. +1 −1 src/gui/qgsattributeform.cpp
  62. +1 −1 src/gui/qgsattributeform.h
  63. +1 −1 src/gui/qgsattributetypeloaddialog.cpp
  64. +2 −2 src/gui/qgscolorbuttonv2.cpp
  65. +3 −3 src/gui/qgscolorbuttonv2.h
  66. +1 −1 src/gui/qgscolordialog.cpp
  67. +1 −1 src/gui/qgscolordialog.h
  68. +6 −6 src/gui/qgscolorschemelist.cpp
  69. +7 −7 src/gui/qgscolorschemelist.h
  70. +4 −4 src/gui/qgscolorswatchgrid.cpp
  71. +8 −8 src/gui/qgscolorswatchgrid.h
  72. +7 −9 src/gui/qgscolorwidgets.cpp
  73. +8 −9 src/gui/qgscolorwidgets.h
  74. +8 −8 src/gui/qgsdetaileditemdelegate.cpp
  75. +8 −8 src/gui/qgsdetaileditemdelegate.h
  76. +1 −1 src/gui/qgshighlight.cpp
  77. +1 −1 src/gui/raster/qgsrasterhistogramwidget.cpp
  78. +1 −1 src/gui/raster/qgsrasterhistogramwidget.h
  79. +1 −3 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  80. +23 −24 src/mapserver/qgssldconfigparser.cpp
  81. +0 −3 src/mapserver/qgssoaprequesthandler.cpp
  82. +3 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_creationinterface.h
  83. +4 −2 src/plugins/dxf2shp_converter/dxflib/src/dl_extrusion.h
  84. +3 −2 src/plugins/globe/osgEarthUtil/Controls.cpp
  85. +2 −0 src/plugins/spatialquery/qgsrubberselectid.h
  86. +1 −0 src/plugins/topology/topolTest.cpp
  87. +1 −1 src/providers/wms/qgswmsprovider.cpp
  88. +2 −2 tests/src/core/qgscompositionchecker.cpp
  89. +2 −2 tests/src/core/testqgscolorscheme.cpp
  90. +2 −2 tests/src/core/testqgscolorschemeregistry.cpp
  91. +5 −5 tests/src/python/qgscompositionchecker.py
@@ -27,7 +27,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame

public:

/*! Controls how headers are horizontally aligned in a table
/*! Controls how headers are horizontally aligned in a table
*/
enum HeaderHAlignment
{
@@ -318,7 +318,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame

protected:

/**Calculates the maximum width of text shown in columns.
/**Calculates the maximum width of text shown in columns.
*/
virtual bool calculateMaxColumnWidths();

@@ -355,7 +355,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame
* @param frameIndex index number for frame
* @returns row range
*/
QPair<int, int> rowRange( const QRectF extent, const int frameIndex ) const;
QPair<int, int> rowRange( const QRectF &extent, const int frameIndex ) const;

/**Draws the horizontal grid lines for the table.
* @param painter destination painter for grid lines
@@ -52,8 +52,8 @@ class QgsColorScheme
* to colors related to the base color.
* @returns a list of QPairs of color and color name
*/
virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() ) = 0;
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() ) = 0;

/**Returns whether the color scheme is editable
* @returns true if scheme is editable
@@ -68,7 +68,7 @@ class QgsColorScheme
* @returns true if colors were set successfully
* @see isEditable
*/
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

/**Clones a color scheme
* @returns copy of color scheme
@@ -97,10 +97,10 @@ class QgsGplColorScheme : QgsColorScheme

virtual ~QgsGplColorScheme();

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

protected:

@@ -117,7 +117,7 @@ class QgsGplColorScheme : QgsColorScheme
* subfolder off the user's QGIS settings folder.
* \note Added in version 2.5
*/
class QgsUserColorScheme : QgsGplColorScheme
class QgsUserColorScheme : QgsGplColorScheme
{
%TypeHeaderCode
#include <qgscolorscheme.h>
@@ -128,7 +128,7 @@ class QgsUserColorScheme : QgsGplColorScheme
/**Constructs a new user color scheme, using a specified gpl palette file
* @param filename filename of gpl palette file stored in the users "palettes" folder
*/
QgsUserColorScheme( const QString filename );
QgsUserColorScheme( const QString &filename );

virtual ~QgsUserColorScheme();

@@ -141,7 +141,7 @@ class QgsUserColorScheme : QgsGplColorScheme
/**Sets the name for the scheme
* @param name new name
*/
void setName( const QString name );
void setName( const QString &name );

/**Erases the associated gpl palette file from the users "palettes" folder
* @returns true if erase was successful
@@ -175,8 +175,8 @@ class QgsRecentColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsRecentColorScheme
@@ -202,12 +202,12 @@ class QgsCustomColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool isEditable() const;

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsCustomColorScheme
@@ -232,12 +232,12 @@ class QgsProjectColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool isEditable() const;

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsProjectColorScheme
@@ -94,7 +94,7 @@ class QgsCoordinateTransform : QObject
* @param direction TransformDirection (defaults to ForwardTransform)
* @return QgsPoint in Destination Coordinate System
*/
QgsPoint transform( const QgsPoint p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
QgsPoint transform( const QgsPoint &p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

/*! Transform the point specified by x,y from Source Coordinate System to Destination Coordinate System
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
@@ -118,12 +118,12 @@ class QgsCoordinateTransform : QObject
* longitude line is required
* @return QgsRectangle in Destination Coordinate System
*/
QgsRectangle transformBoundingBox( const QgsRectangle theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);
QgsRectangle transformBoundingBox( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);

// Same as for the other transform() functions, but alters the x
// and y variables in place. The second one works with good old-fashioned
// C style arrays.
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform) const throw (QgsCsException);
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

//! @note not available in python bindings
// void transformInPlace( QVector<double>& x, QVector<double>& y, QVector<double>& z,
@@ -142,7 +142,7 @@ class QgsCoordinateTransform : QObject
* @param direction TransformDirection (defaults to ForwardTransform)
* @return QgsRectangle in Destination Coordinate System
*/
QgsRectangle transform( const QgsRectangle theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
QgsRectangle transform( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

/*! Transform an array of coordinates to a different Coordinate System
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
@@ -20,8 +20,6 @@ class QgsDataItem : QObject

int rowCount();

//

virtual void refresh();

// Create vector of children
@@ -56,6 +54,8 @@ class QgsDataItem : QObject
// try to process the data dropped on this item
virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ );

//

enum Capability
{
NoCapabilities,
@@ -83,6 +83,9 @@ class QgsDataItem : QObject
QString path() const;
void setPath( const QString );

// Because QIcon (QPixmap) must not be used in outside the GUI thread, it is
// not possible to set mIcon in constructor. Either use mIconName/setIconName()
// or implement icon().
void setIcon( QIcon icon );
void setIconName( const QString & icon );

@@ -40,7 +40,7 @@ class QgsMapLayer : QObject
{
VectorLayer,
RasterLayer,
PluginLayer // added in 1.5
PluginLayer
};

/** Constructor
@@ -58,9 +58,7 @@ class QgsMapLayer : QObject
*/
QgsMapLayer::LayerType type() const;

/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @note added in 1.7
*/
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry */
QString id() const;

/** Set the display name of the layer
@@ -73,9 +71,7 @@ class QgsMapLayer : QObject
*/
const QString & name() const;

/** Get the original name of the layer
* @note added in 1.9
*/
/** Get the original name of the layer */
const QString & originalName() const;

void setTitle( const QString& title );
@@ -113,7 +109,7 @@ class QgsMapLayer : QObject
QPainter::CompositionMode blendMode() const;

/**Synchronises with changes in the datasource
@note added in version 1.6*/
*/
virtual void reload();

/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
@@ -190,6 +186,7 @@ class QgsMapLayer : QObject
/** stores state in Dom node
@param layerElement is a Dom element corresponding to ``maplayer'' tag
@param document is a the dom document being written
@param relativeBasePath base path for relative paths
@note

The Dom node corresponds to a Dom document project file XML element to be
@@ -202,28 +199,25 @@ class QgsMapLayer : QObject

@returns true if successful
*/
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document );
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document, QString relativeBasePath = QString::null );

/** Returns the given layer as a layer definition document
Layer definitions store the data source as well as styling and custom properties.

Layer definitions can be used to load a layer and styling all from a single file.
*/
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers );
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers, QString relativeBasePath = QString::null );

/** Creates a new layer from a layer defininition document
*/
static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString qlrfile );
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString &qlrfile );

/** Set a custom property for layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Set a custom property for layer. Properties are stored in a map and saved in project file. */
void setCustomProperty( const QString& key, const QVariant& value );
/** Read a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Read a custom property from layer. Properties are stored in a map and saved in project file. */
QVariant customProperty( const QString& value, const QVariant& defaultValue = QVariant() ) const;
/** Remove a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Remove a custom property from layer. Properties are stored in a map and saved in project file. */
void removeCustomProperty( const QString& key );


@@ -244,8 +238,7 @@ class QgsMapLayer : QObject
*/
const QgsCoordinateReferenceSystem& crs() const;

/** Sets layer's spatial reference system
@note emitSignal added in 1.4 */
/** Sets layer's spatial reference system */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );

/** A convenience function to (un)capitalise the layer name */
@@ -256,7 +249,6 @@ class QgsMapLayer : QObject
* record in the users style table in their personal qgis.db)
* @return a QString with the style file name
* @see also loadNamedStyle () and saveNamedStyle ();
* @note This method was added in QGIS 1.8
*/
virtual QString styleURI();

@@ -373,6 +365,7 @@ class QgsMapLayer : QObject
*/
void setLegend( QgsMapLayerLegend* legend /Transfer/ );
/**
* Can be null.
* @note added in 2.6
*/
QgsMapLayerLegend* legend() const;
@@ -423,9 +416,7 @@ class QgsMapLayer : QObject
/** Emit a signal that the layer name has been changed */
void layerNameChanged();

/** Emit a signal that layer's CRS has been reset
added in 1.4
*/
/** Emit a signal that layer's CRS has been reset */
void layerCrsChanged();

/** By emitting this signal the layer tells that either appearance or content have been changed
@@ -439,8 +430,7 @@ class QgsMapLayer : QObject
/** This is used to send a request that any mapcanvas using this layer update its extents */
void recalculateExtents();

/** data of layer changed
* added in 1.5 */
/** data of layer changed */
void dataChanged();

/** Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode() */
@@ -459,8 +449,7 @@ class QgsMapLayer : QObject
/** Set the extent */
virtual void setExtent( const QgsRectangle &rect );

/** set whether layer is valid or not - should be used in constructor.
\note added in v1.5 */
/** set whether layer is valid or not - should be used in constructor. */
void setValid( bool valid );

/** called by readLayerXML(), used by children to read state specific to them from
@@ -474,12 +463,12 @@ class QgsMapLayer : QObject
virtual bool writeXml( QDomNode & layer_node, QDomDocument & document );


/** Read custom properties from project file. Added in v1.4
/** Read custom properties from project file.
@param layerNode note to read from
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)*/
void readCustomProperties( const QDomNode& layerNode, const QString& keyStartsWith = "" );

/** Write custom properties to project file. Added in v1.4 */
/** Write custom properties to project file. */
void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc ) const;

/** debugging member - invoked when a connect() is made to this object */
@@ -152,7 +152,7 @@ class QgsMapSettings
* @param layer
* @return transform - may be null if the transform is not needed
*/
const QgsCoordinateTransform* layerTransfrom( QgsMapLayer *layer ) const;
const QgsCoordinateTransform* layerTransform( QgsMapLayer *layer ) const;

//! returns current extent of layer set
QgsRectangle fullExtent() const;
@@ -90,6 +90,6 @@ class QgsMultiRenderChecker
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
* without requiring a transparent background for the image
*/
static void drawBackround( QImage* image );
static void drawBackground( QImage* image );
};

0 comments on commit a57066a

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