Skip to content

Commit

Permalink
Followup c49b5b7, more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 7, 2015
1 parent 911929e commit c6df096
Show file tree
Hide file tree
Showing 188 changed files with 602 additions and 597 deletions.
20 changes: 10 additions & 10 deletions python/core/dxf/qgsdxfexport.sip
Expand Up @@ -61,39 +61,39 @@ class QgsDxfExport
void writeDouble( double d );
void writeString( const QString &s );
void writeGroup( int code, const QgsPoint &p, double z = 0.0, bool skipz = false ) /PyName=writeGroupPoint/;
void writeGroup( QColor color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
void writeGroup( const QColor& color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );

//! Write handle
int writeHandle( int code = 5, int handle = 0 );

//! Draw dxf polyline
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, QColor color, double width = -1 );
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Draw dxf polygon (HATCH)
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, QColor color );
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor& color );

/** Draw solid
* @deprecated see writePolygon
*/
void writeSolid( const QString &layer, QColor color, const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, const QgsPoint &pt4 ) /Deprecated/;
void writeSolid( const QString &layer, const QColor& color, const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, const QgsPoint &pt4 ) /Deprecated/;

//! write line (as a polyline)
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, QColor color, double width = -1 );
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Write point
void writePoint( const QString &layer, QColor color, const QgsPoint &pt );
void writePoint( const QString &layer, const QColor& color, const QgsPoint &pt );

//! Write filled circle (as hatch)
void writeFilledCircle( const QString &layer, QColor color, const QgsPoint &pt, double radius );
void writeFilledCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius );

//! Write circle (as polyline)
void writeCircle( const QString &layer, QColor color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width );
void writeCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width );

//! Write text (TEXT)
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, QColor color );
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor& color );

//! Write mtext (MTEXT)
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, QColor color );
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor& color );

static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, QGis::UnitType mapUnits );

Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsconditionalstyle.sip
Expand Up @@ -90,13 +90,13 @@ class QgsConditionalStyle
* @brief Set the background color for the style
* @param value QColor for background color
*/
void setBackgroundColor( QColor value );
void setBackgroundColor( const QColor& value );

/**
* @brief Set the text color for the style
* @param value QColor for text color
*/
void setTextColor( QColor value );
void setTextColor( const QColor& value );

/**
* @brief Set the font for the the style
Expand Down
2 changes: 1 addition & 1 deletion python/core/raster/qgshuesaturationfilter.sip
Expand Up @@ -35,7 +35,7 @@ class QgsHueSaturationFilter : QgsRasterInterface

void setColorizeOn( bool colorizeOn );
bool colorizeOn() const;
void setColorizeColor( QColor colorizeColor );
void setColorizeColor( const QColor& colorizeColor );
QColor colorizeColor() const;
void setColorizeStrength( int colorizeStrength );
int colorizeStrength() const;
Expand Down
4 changes: 2 additions & 2 deletions python/core/raster/qgsrasterlayer.sip
Expand Up @@ -180,11 +180,11 @@ class QgsRasterLayer : QgsMapLayer

/** \brief Draws a preview of the rasterlayer into a pixmap
@note - use previewAsImage() for rendering with QGIS>=2.4 */
QPixmap previewAsPixmap( QSize size, QColor bgColor = QColor( 255, 255, 255 ) ) /Deprecated/;
QPixmap previewAsPixmap( const QSize& size, const QColor& bgColor = QColor( 255, 255, 255 ) ) /Deprecated/;

/** \brief Draws a preview of the rasterlayer into a QImage
@note added in 2.4 */
QImage previewAsImage( QSize size, QColor bgColor = QColor( 255, 255, 255 ),
QImage previewAsImage( const QSize& size, const QColor& bgColor = QColor( 255, 255, 255 ),
QImage::Format format = QImage::Format_ARGB32_Premultiplied );

/**
Expand Down
16 changes: 8 additions & 8 deletions python/core/symbology-ng/qgsfillsymbollayerv2.sip
Expand Up @@ -5,9 +5,9 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
%End

public:
QgsSimpleFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
QgsSimpleFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR,
Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
QColor borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
const QColor& borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
Qt::PenStyle borderStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
Expand Down Expand Up @@ -40,7 +40,7 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
void setBrushStyle( Qt::BrushStyle style );

QColor borderColor() const;
void setBorderColor( QColor borderColor );
void setBorderColor( const QColor& borderColor );

/** Get outline color.
* @note added in 2.1 */
Expand Down Expand Up @@ -128,8 +128,8 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2
Repeat
};

QgsGradientFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
QColor color2 = Qt::white,
QgsGradientFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR,
const QColor& color2 = Qt::white,
GradientColorType gradientColorType = SimpleTwoColor,
GradientType gradientType = Linear,
GradientCoordinateMode coordinateMode = Feature,
Expand Down Expand Up @@ -172,7 +172,7 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2

/** Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor*/
QColor color2() const;
void setColor2( QColor color2 );
void setColor2( const QColor& color2 );

/** Coordinate mode for gradient. Controls how the gradient stops are positioned.*/
GradientCoordinateMode coordinateMode() const;
Expand Down Expand Up @@ -230,7 +230,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
ColorRamp
};

QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
QgsShapeburstFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR, const QColor& color2 = Qt::white,
ShapeburstColorType colorType = SimpleTwoColor,
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );

Expand Down Expand Up @@ -362,7 +362,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
* @see setColorType
* @see color2
*/
void setColor2( QColor color2 );
void setColor2( const QColor& color2 );
/** Returns the color used for the endpoint of the shapeburst fill. This color is only used if the colorType is set to ShapeburstColorType::SimpleTwoColor
* @returns a QColor indicating the color of the endpoint of the gradient
* @note added in 2.3
Expand Down
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgslinesymbollayerv2.sip
Expand Up @@ -5,7 +5,7 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
%End

public:
QgsSimpleLineSymbolLayerV2( QColor color = DEFAULT_SIMPLELINE_COLOR,
QgsSimpleLineSymbolLayerV2( const QColor& color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );

Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsmarkersymbollayerv2.sip
Expand Up @@ -39,7 +39,7 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
void setName( const QString& name );

QColor borderColor() const;
void setBorderColor( QColor color );
void setBorderColor( const QColor& color );

Qt::PenStyle outlineStyle() const;
void setOutlineStyle( Qt::PenStyle outlineStyle );
Expand Down Expand Up @@ -157,7 +157,7 @@ class QgsFontMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
QgsFontMarkerSymbolLayerV2( const QString& fontFamily = DEFAULT_FONTMARKER_FONT,
QChar chr = DEFAULT_FONTMARKER_CHR,
double pointSize = DEFAULT_FONTMARKER_SIZE,
QColor color = DEFAULT_FONTMARKER_COLOR,
const QColor& color = DEFAULT_FONTMARKER_COLOR,
double angle = DEFAULT_FONTMARKER_ANGLE );

~QgsFontMarkerSymbolLayerV2();
Expand Down
6 changes: 3 additions & 3 deletions python/core/symbology-ng/qgssymbollayerv2utils.sip
Expand Up @@ -6,7 +6,7 @@ class QgsSymbolLayerV2Utils

public:

static QString encodeColor( QColor color );
static QString encodeColor( const QColor& color );
static QColor decodeColor( const QString& str );

static QString encodeSldAlpha( int alpha );
Expand Down Expand Up @@ -122,14 +122,14 @@ class QgsSymbolLayerV2Utils
static bool needSvgFill( QDomElement &element );

static void fillToSld( QDomDocument &doc, QDomElement &element,
Qt::BrushStyle brushStyle, QColor color = QColor() );
Qt::BrushStyle brushStyle, const QColor& color = QColor() );
static bool fillFromSld( QDomElement &element,
Qt::BrushStyle &brushStyle, QColor &color );

//! @note not available in python bindings
/*
static void lineToSld( QDomDocument &doc, QDomElement &element,
Qt::PenStyle penStyle, QColor color, double width = -1,
Qt::PenStyle penStyle, const QColor& color, double width = -1,
const Qt::PenJoinStyle *penJoinStyle = 0, const Qt::PenCapStyle *penCapStyle = 0,
const QVector<qreal> *customDashPattern = 0, double dashOffset = 0.0 );
*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsvectorcolorrampv2.sip
Expand Up @@ -75,8 +75,8 @@ class QgsVectorGradientColorRampV2 : QgsVectorColorRampV2

QColor color1() const;
QColor color2() const;
void setColor1( QColor color );
void setColor2( QColor color );
void setColor1( const QColor& color );
void setColor2( const QColor& color );

bool isDiscrete() const;
void setDiscrete( bool discrete );
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgscolorbuttonv2.sip
Expand Up @@ -112,7 +112,7 @@ class QgsColorButtonV2 : QToolButton
* option.
* @see defaultColor
*/
void setDefaultColor( const QColor color );
void setDefaultColor( const QColor& color );

/** Returns the default color for the button, which is shown in the button's drop down menu for the
* "default color" option.
Expand Down
4 changes: 2 additions & 2 deletions python/gui/qgslegendinterface.sip
Expand Up @@ -88,11 +88,11 @@ class QgsLegendInterface : QObject

//! Add a new group
//! a parent group can be given to nest the new group in it
virtual int addGroup( QString name, bool expand = true, QTreeWidgetItem* parent = 0 ) = 0;
virtual int addGroup( const QString& name, bool expand = true, QTreeWidgetItem* parent = 0 ) = 0;

//! Add a new group
//! a parent group index has to be given to nest the new group in it
virtual int addGroup( QString name, bool expand, int parentIndex ) = 0;
virtual int addGroup( const QString& name, bool expand, int parentIndex ) = 0;

//! Remove group on index
virtual void removeGroup( int groupIndex ) = 0;
Expand Down
6 changes: 3 additions & 3 deletions python/gui/qgspluginmanagerinterface.sip
Expand Up @@ -20,19 +20,19 @@ class QgsPluginManagerInterface : QObject
virtual void clearPythonPluginMetadata() = 0;

//! add a single plugin to the metadata registry
virtual void addPluginMetadata( QMap<QString, QString> metadata ) = 0;
virtual void addPluginMetadata( const QMap<QString, QString>& metadata ) = 0;

//! refresh plugin list model (and metadata browser content if necessary)
virtual void reloadModel() = 0;

//! return given plugin metadata
virtual const QMap<QString, QString> * pluginMetadata( QString key ) const = 0;
virtual const QMap<QString, QString> * pluginMetadata( const QString& key ) const = 0;

//! clear the repository listWidget
virtual void clearRepositoryList() = 0;

//! add repository to the repository listWidget
virtual void addToRepositoryList( QMap<QString, QString> repository ) = 0;
virtual void addToRepositoryList( const QMap<QString, QString>& repository ) = 0;

//! show the Plugin Manager window and optionally open tab tabIndex
virtual void showPluginManager( int tabIndex = -1 ) = 0;
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsvectorlayertools.sip
Expand Up @@ -13,7 +13,7 @@ class QgsVectorLayerTools
* @param defaultGeometry A default geometry to add to the feature
* @return True in case of success, False if the operation failed/was aborted
*/
virtual bool addFeature( QgsVectorLayer* layer, QgsAttributeMap defaultValues = QgsAttributeMap(), const QgsGeometry& defaultGeometry = QgsGeometry() ) const = 0;
virtual bool addFeature( QgsVectorLayer* layer, const QgsAttributeMap& defaultValues = QgsAttributeMap(), const QgsGeometry& defaultGeometry = QgsGeometry() ) const = 0;


/**
Expand Down
Expand Up @@ -26,5 +26,5 @@ class QgsVectorGradientColorRampV2Dialog : QDialog

void updateStops();
void updatePreview();
void setStopColor( QTreeWidgetItem* item, QColor color );
void setStopColor( QTreeWidgetItem* item, const QColor& color );
};
2 changes: 1 addition & 1 deletion src/analysis/vector/qgszonalstatistics.h
Expand Up @@ -49,7 +49,7 @@ class ANALYSIS_EXPORT QgsZonalStatistics
Q_DECLARE_FLAGS( Statistics, Statistic )

QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile, const QString& attributePrefix = "", int rasterBand = 1,
const QgsZonalStatistics::Statistics& stats = Statistics( Count | Sum | Mean ) );
const Statistics& stats = Statistics( Count | Sum | Mean ) );
~QgsZonalStatistics();

/** Starts the calculation
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgsatlascompositionwidget.cpp
Expand Up @@ -237,7 +237,7 @@ void QgsAtlasCompositionWidget::updateAtlasFeatures()
}
}

void QgsAtlasCompositionWidget::changesSortFeatureField( QString fieldName )
void QgsAtlasCompositionWidget::changesSortFeatureField( const QString& fieldName )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand Down Expand Up @@ -270,7 +270,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::pageNameExpressionChanged( QString expression, bool valid )
void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString& expression, bool valid )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || ( !valid && !expression.isEmpty() ) )
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgsatlascompositionwidget.h
Expand Up @@ -43,12 +43,12 @@ class QgsAtlasCompositionWidget:
void on_mAtlasSingleFileCheckBox_stateChanged( int state );

void on_mAtlasSortFeatureCheckBox_stateChanged( int state );
void changesSortFeatureField( QString fieldName );
void changesSortFeatureField( const QString& fieldName );
void on_mAtlasSortFeatureDirectionButton_clicked();
void on_mAtlasFeatureFilterEdit_editingFinished();
void on_mAtlasFeatureFilterButton_clicked();
void on_mAtlasFeatureFilterCheckBox_stateChanged( int state );
void pageNameExpressionChanged( QString expression, bool valid );
void pageNameExpressionChanged( const QString& expression, bool valid );

private slots:
void updateGuiElements();
Expand Down
8 changes: 4 additions & 4 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -937,12 +937,12 @@ void QgsComposer::statusZoomCombo_zoomEntered()
mView->setZoomLevel( zoom.toDouble() / 100 );
}

void QgsComposer::updateStatusCompositionMsg( QString message )
void QgsComposer::updateStatusCompositionMsg( const QString& message )
{
mStatusCompositionLabel->setText( message );
}

void QgsComposer::updateStatusAtlasMsg( QString message )
void QgsComposer::updateStatusAtlasMsg( const QString& message )
{
mStatusAtlasLabel->setText( message );
}
Expand Down Expand Up @@ -3994,7 +3994,7 @@ void QgsComposer::createComposerView()
connect( tab, SIGNAL( activated() ), mActionHidePanels, SLOT( trigger() ) );
}

void QgsComposer::writeWorldFile( QString worldFileName, double a, double b, double c, double d, double e, double f ) const
void QgsComposer::writeWorldFile( const QString& worldFileName, double a, double b, double c, double d, double e, double f ) const
{
QFile worldFile( worldFileName );
if ( !worldFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
Expand Down Expand Up @@ -4066,7 +4066,7 @@ void QgsComposer::updateAtlasMapLayerAction( QgsVectorLayer *coverageLayer )
}
}

void QgsComposer::setPrinterPageOrientation( QString orientation )
void QgsComposer::setPrinterPageOrientation( const QString& orientation )
{
if ( orientation == tr( "Landscape" ) )
{
Expand Down
8 changes: 4 additions & 4 deletions src/app/composer/qgscomposer.h
Expand Up @@ -437,10 +437,10 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
void statusZoomCombo_zoomEntered();

//! Updates status bar composition message
void updateStatusCompositionMsg( QString message );
void updateStatusCompositionMsg( const QString& message );

//! Updates status bar atlas message
void updateStatusAtlasMsg( QString message );
void updateStatusAtlasMsg( const QString& message );

private:

Expand Down Expand Up @@ -488,7 +488,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
void createComposerView();

//! Write a world file
void writeWorldFile( QString fileName, double a, double b, double c, double d, double e, double f ) const;
void writeWorldFile( const QString& fileName, double a, double b, double c, double d, double e, double f ) const;

//! Updates the grid/guide action status based on compositions grid/guide settings
void restoreGridSettings();
Expand Down Expand Up @@ -644,7 +644,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
void updateAtlasMapLayerAction( QgsVectorLayer* coverageLayer );

//! Sets the printer page orientation when the page orientation changes
void setPrinterPageOrientation( QString orientation );
void setPrinterPageOrientation( const QString& orientation );

void disablePreviewMode();
void activateGrayscalePreview();
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscompositionwidget.h
Expand Up @@ -26,7 +26,7 @@ class QgsDataDefinedButton;
*/
struct QgsCompositionPaper
{
QgsCompositionPaper( QString name, double width, double height ) {mName = name; mWidth = width; mHeight = height;}
QgsCompositionPaper( const QString& name, double width, double height ) {mName = name; mWidth = width; mHeight = height;}
QString mName;
double mWidth;
double mHeight;
Expand Down

0 comments on commit c6df096

Please sign in to comment.