Change all signals to use const refs for non trivial objects

This commit is contained in:
Nyall Dawson 2015-10-26 22:46:25 +11:00
parent 70bff3f6aa
commit f1633a1796
87 changed files with 126 additions and 126 deletions

View File

@ -23,7 +23,7 @@ class QgsGraphDirector : QObject
signals:
void buildProgress( int, int ) const;
void buildMessage( QString ) const;
void buildMessage( const QString& ) const;
public:
//! Destructor

View File

@ -280,7 +280,7 @@ public:
void toggled( bool );
/** Is emitted when the atlas has an updated status bar message for the composer window*/
void statusMsgChanged( QString message );
void statusMsgChanged( const QString& message );
/** Is emitted when the coverage layer for an atlas changes*/
void coverageLayerChanged( QgsVectorLayer* layer );

View File

@ -116,7 +116,7 @@ class QgsLayerTreeNode : QObject
//! Emitted when check state of a node within the tree has been changed
void visibilityChanged( QgsLayerTreeNode *node, Qt::CheckState state );
//! Emitted when a custom property of a node within the tree has been changed or removed
void customPropertyChanged( QgsLayerTreeNode *node, QString key );
void customPropertyChanged( QgsLayerTreeNode *node, const QString& key );
//! Emitted when the collapsed/expanded state of a node within the tree has been changed
void expandedChanged( QgsLayerTreeNode *node, bool expanded );

View File

@ -32,6 +32,6 @@ class QgsLayerTreeRegistryBridge : QObject
signals:
//! Tell others we have just added layers to the tree (used in QGIS to auto-select first newly added layer)
//! @note added in 2.6
void addedLayersToLayerTree( QList<QgsMapLayer*> layers );
void addedLayersToLayerTree( const QList<QgsMapLayer*>& layers );
};

View File

@ -16,7 +16,7 @@ class QgsGeometryValidator : QThread
static void validateGeometry( const QgsGeometry *g, QList<QgsGeometry::Error> &errors );
signals:
void errorFound( QgsGeometry::Error );
void errorFound( const QgsGeometry::Error& );
public slots:
void addError( const QgsGeometry::Error& );

View File

@ -93,5 +93,5 @@ class QgsHttpTransaction : QObject
void totalSteps( int theTotalSteps );
/** \brief emit a signal to be caught by qgisapp and display a msg on status bar */
void statusChanged( QString theStatusQString );
void statusChanged( const QString& theStatusQString );
};

View File

@ -471,7 +471,7 @@ class QgsMapLayer : QObject
void drawingProgress( int theProgress, int theTotalSteps );
/** Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar) */
void statusChanged( QString theStatus );
void statusChanged( const QString& theStatus );
/** Emit a signal that the layer name has been changed */
void layerNameChanged();

View File

@ -138,7 +138,7 @@ class QgsMapLayerRegistry : QObject
*
* @param theLayerIds A list of ids of the layers which are removed.
*/
void layersWillBeRemoved( QStringList theLayerIds );
void layersWillBeRemoved( const QStringList& theLayerIds );
/**
* Emitted when a layer is removed from the registry
@ -147,14 +147,14 @@ class QgsMapLayerRegistry : QObject
*
* @note Consider using {@link layersWillBeRemoved()} instead
*/
void layerWillBeRemoved( QString theLayerId );
void layerWillBeRemoved( const QString& theLayerId );
/**
* Emitted after one or more layers were removed from the registry
*
* @param theLayerIds A list of ids of the layers which were removed.
*/
void layersRemoved( QStringList theLayerIds );
void layersRemoved( const QStringList& theLayerIds );
/**
* Emitted after a layer was removed from the registry
@ -163,7 +163,7 @@ class QgsMapLayerRegistry : QObject
*
* @note Consider using {@link layersRemoved()} instead
*/
void layerRemoved( QString theLayerId );
void layerRemoved( const QString& theLayerId );
/**
@ -183,7 +183,7 @@ class QgsMapLayerRegistry : QObject
*
* @see legendLayersAdded()
*/
void layersAdded( QList<QgsMapLayer *> theMapLayers );
void layersAdded( const QList<QgsMapLayer *>& theMapLayers );
/**
* Emitted when a layer is added to the registry.
@ -202,7 +202,7 @@ class QgsMapLayerRegistry : QObject
*
* @param theMapLayers The {@link QgsMapLayer}s which are added to the legend.
*/
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
void legendLayersAdded( const QList<QgsMapLayer*>& theMapLayers );
private:
QgsMapLayerRegistry(); // private 'cause it's a singleton

View File

@ -18,7 +18,7 @@ class QgsMessageLog : QObject
static void logMessage( const QString& message, const QString& tag = QString::null, MessageLevel level = WARNING );
signals:
void messageReceived( QString message, QString tag, MessageLevel level );
void messageReceived( const QString& message, const QString& tag, MessageLevel level );
private:
QgsMessageLog();

View File

@ -317,14 +317,14 @@ class QgsProject : QObject
void projectSaved();
//! emitted when an old project file is read.
void oldProjectVersionWarning( QString );
void oldProjectVersionWarning( const QString& );
//! emitted when a layer from a projects was read
// @param i current layer
// @param n number of layers
void layerLoaded( int i, int n );
void loadingLayer( QString );
void loadingLayer( const QString& );
void snapSettingsChanged();

View File

@ -435,7 +435,7 @@ class QgsVectorLayer : QgsMapLayer
/**
* Change selection to the new set of features. Dismisses the current selection.
* Will emit the { @link selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) } signal with the
* Will emit the { @link selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) } signal with the
* clearAndSelect flag set.
*
* @param ids The ids which will be the new selection
@ -1317,7 +1317,7 @@ class QgsVectorLayer : QgsMapLayer
* @param deselected Ids of all features which have previously been selected but are not any more
* @param clearAndSelect In case this is set to true, the old selection was dismissed and the new selection corresponds to selected
*/
void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
void selectionChanged( const QgsFeatureIds& selected, const QgsFeatureIds& deselected, const bool clearAndSelect );
/** This signal is emitted when selection was changed */
void selectionChanged();
@ -1369,7 +1369,7 @@ class QgsVectorLayer : QgsMapLayer
*
* @param fids The feature ids that have been deleted.
*/
void featuresDeleted( QgsFeatureIds fids );
void featuresDeleted( const QgsFeatureIds& fids );
/**
* Is emitted, whenever the fields available from this layer have been changed.
* This can be due to manually adding attributes or due to a join.

View File

@ -276,7 +276,7 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
signals:
/** Emit a signal to notify of the progress event.
* Emitted theProgress is in percents (0.0-100.0) */
void progress( int theType, double theProgress, QString theMessage );
void progress( int theType, double theProgress, const QString& theMessage );
void progressUpdate( int theProgress );
protected:

View File

@ -252,7 +252,7 @@ class QgsStyleV2 : QObject
bool importXML( const QString& filename );
signals:
void symbolSaved( QString name, QgsSymbolV2* symbol );
void symbolSaved( const QString& name, QgsSymbolV2* symbol );
protected:
//! convenience function to open the DB and return a sqlite3 object

View File

@ -85,7 +85,7 @@ class QgsAttributeTableView : QTableView
* @param atIndex The QModelIndex, to which the context menu belongs. Relative to the source model.
* In most cases, this will be a @link QgsAttributeTableFilterModel @endlink
*/
void willShowContextMenu( QMenu* menu, QModelIndex atIndex );
void willShowContextMenu( QMenu* menu, const QModelIndex& atIndex );
void finished();

View File

@ -133,7 +133,7 @@ class QgsDualView : QStackedWidget
* Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied
*/
void displayExpressionChanged( const QString expression );
void displayExpressionChanged( const QString& expression );
/**
* Is emitted, whenever the filter changes

View File

@ -94,7 +94,7 @@ class QgsFeatureListView : QListView
* Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied
*/
void displayExpressionChanged( const QString expression );
void displayExpressionChanged( const QString& expression );
//void aboutToChangeEditSelection( bool& ok );

View File

@ -42,7 +42,7 @@ class QgsFeatureSelectionModel : QItemSelectionModel
*
* @param indexes The model indexes which need to be repainted
*/
void requestRepaint( QModelIndexList indexes );
void requestRepaint( const QModelIndexList& indexes );
/**
* Request a repaint of the visible items of connected views.

View File

@ -50,7 +50,7 @@ class QgsIFeatureSelectionManager : QObject
/**
* Change selection to the new set of features. Dismisses the current selection.
* Will emit the { @link selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) } signal with the
* Will emit the { @link selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) } signal with the
* clearAndSelect flag set.
*
* @param ids The ids which will be the new selection
@ -73,5 +73,5 @@ class QgsIFeatureSelectionManager : QObject
* @param deselected Ids of all features which have previously been selected but are not any more
* @param clearAndSelect In case this is set to true, the old selection was dismissed and the new selection corresponds to selected
*/
void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
void selectionChanged( const QgsFeatureIds& selected, const QgsFeatureIds& deselected, const bool clearAndSelect );
};

View File

@ -70,5 +70,5 @@ class QgsRelationReferenceWidget : QWidget
void init();
signals:
void foreignKeyChanged( QVariant );
void foreignKeyChanged( const QVariant& );
};

View File

@ -543,5 +543,5 @@ class QgisInterface : QObject
@note
added in version 2.7
*/
void layerSavedAs( QgsMapLayer* l, QString path );
void layerSavedAs( QgsMapLayer* l, const QString& path );
};

View File

@ -94,7 +94,7 @@ class QgsAttributeForm : QWidget
* @param attribute The name of the attribute that changed.
* @param value The new value of the attribute.
*/
void attributeChanged( QString attribute, const QVariant& value );
void attributeChanged( const QString& attribute, const QVariant& value );
/**
* Will be emitted before the feature is saved. Use this signal to perform sanity checks.

View File

@ -33,7 +33,7 @@ class QgsFieldComboBox : QComboBox
signals:
//! the signal is emitted when the currently selected field changes
void fieldChanged( QString fieldName );
void fieldChanged( const QString& fieldName );
public slots:
//! set the layer of which the fields are listed

View File

@ -63,10 +63,10 @@ class QgsFieldExpressionWidget : QWidget
signals:
//! the signal is emitted when the currently selected field changes
void fieldChanged( QString fieldName );
void fieldChanged( const QString& fieldName );
//! fieldChanged signal with indication of the validity of the expression
void fieldChanged( QString fieldName, bool isValid );
void fieldChanged( const QString& fieldName, bool isValid );
// void returnPressed();

View File

@ -75,7 +75,7 @@ class QgsLegendInterface : QObject
void groupRelationsChanged();
/* //! emitted when an item (group/layer) is added */
void itemAdded( QModelIndex index );
void itemAdded( const QModelIndex& index );
/* //! emitted when an item (group/layer) is removed */
void itemRemoved();

View File

@ -45,7 +45,7 @@ class QgsMapLayerAction : QAction
signals:
/** Triggered when action has been run for a specific list of features */
void triggeredForFeatures( QgsMapLayer* layer, const QList<QgsFeature> featureList );
void triggeredForFeatures( QgsMapLayer* layer, const QList<QgsFeature>& featureList );
/** Triggered when action has been run for a specific feature */
void triggeredForFeature( QgsMapLayer* layer, const QgsFeature& feature );

View File

@ -126,7 +126,7 @@ class QgsMapTool : QObject
signals:
//! emit a message
void messageEmitted( QString message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO );
void messageEmitted( const QString& message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO );
//! emit signal to clear previous message
void messageDiscarded();

View File

@ -87,7 +87,7 @@ class QgsMapToolIdentify : QgsMapTool
signals:
void identifyProgress( int, int );
void identifyMessage( QString );
void identifyMessage( const QString& );
void changedRasterResults( QList<QgsMapToolIdentify::IdentifyResult>& );
protected:

View File

@ -41,6 +41,6 @@ class QgsMessageBarItem: QWidget
signals:
//! emitted when the message level has changed
void styleChanged( QString styleSheet );
void styleChanged( const QString& styleSheet );
};

View File

@ -46,7 +46,7 @@ class QgsProjectionSelectionWidget : QWidget
/** Emitted when the selected CRS is changed
*/
void crsChanged( QgsCoordinateReferenceSystem );
void crsChanged( const QgsCoordinateReferenceSystem& );
public slots:

View File

@ -97,7 +97,7 @@ class QgsProjectionSelector : QWidget
void resizeEvent( QResizeEvent * theEvent );
signals:
void sridSelected( QString theSRID );
void sridSelected( const QString& theSRID );
//! Refresh any listening canvases
void refresh();
//! Let listeners know if find has focus so they can adjust the default button

View File

@ -38,7 +38,7 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
signals:
void buildProgress( int, int ) const;
void buildMessage( QString ) const;
void buildMessage( const QString& ) const;
public:
//! Destructor

View File

@ -70,7 +70,7 @@ class QgsCompositionWidget: public QWidget, private Ui::QgsCompositionWidgetBase
signals:
/** Is emitted when page orientation changes*/
void pageOrientationChanged( QString orientation );
void pageOrientationChanged( const QString& orientation );
private slots:
/* when a new map is added */

View File

@ -1281,7 +1281,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
/** Signal emitted when the current theme is changed so plugins
* can change there tool button icons. */
void currentThemeChanged( QString );
void currentThemeChanged( const QString& );
/** This signal is emitted when a new composer instance has been created
*/
@ -1303,7 +1303,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
/** This signal is emitted when a layer has been saved using save as
@note added in version 2.7
*/
void layerSavedAs( QgsMapLayer* l, QString path );
void layerSavedAs( QgsMapLayer* l, const QString& path );
private:
/** This method will open a dialog so the user can select GDAL sublayers to load

View File

@ -478,7 +478,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual int messageTimeout() override;
signals:
void currentThemeChanged( QString );
void currentThemeChanged( const QString& );
private slots:

View File

@ -68,7 +68,7 @@ class APP_EXPORT QgsMapToolIdentifyAction : public QgsMapToolIdentify
signals:
void identifyProgress( int, int );
void identifyMessage( QString );
void identifyMessage( const QString& );
void copyToClipboard( QgsFeatureStore & );
private slots:

View File

@ -120,7 +120,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
signals:
/** Emitted when changes to layer were saved to update legend */
void refreshLegend( QString layerID, bool expandItem );
void refreshLegend( const QString& layerID, bool expandItem );
private:
/** \brief A constant that signals property not used */

View File

@ -124,8 +124,8 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
signals:
/** Emitted when changes to layer were saved to update legend */
void refreshLegend( QString layerID, bool expandItem );
void refreshLegend( QString layerID );
void refreshLegend( const QString& layerID, bool expandItem );
void refreshLegend( const QString& layerID );
void toggleEditing( QgsMapLayer * );

View File

@ -311,7 +311,7 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
void toggled( bool );
/** Is emitted when the atlas has an updated status bar message for the composer window*/
void statusMsgChanged( QString message );
void statusMsgChanged( const QString& message );
/** Is emitted when the coverage layer for an atlas changes*/
void coverageLayerChanged( QgsVectorLayer* layer );

View File

@ -1080,7 +1080,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
void refreshItemsTriggered();
/** Is emitted when the composition has an updated status bar message for the composer window*/
void statusMsgChanged( QString message );
void statusMsgChanged( const QString& message );
friend class QgsComposerObject; //for accessing dataDefinedEvaluate, readDataDefinedPropertyMap and writeDataDefinedPropertyMap
friend class QgsComposerModel; //for accessing updateZValues (should not be public)

View File

@ -123,7 +123,7 @@ class CORE_EXPORT QgsLayerTreeNode : public QObject
//! Emitted when check state of a node within the tree has been changed
void visibilityChanged( QgsLayerTreeNode *node, Qt::CheckState state );
//! Emitted when a custom property of a node within the tree has been changed or removed
void customPropertyChanged( QgsLayerTreeNode *node, QString key );
void customPropertyChanged( QgsLayerTreeNode *node, const QString& key );
//! Emitted when the collapsed/expanded state of a node within the tree has been changed
void expandedChanged( QgsLayerTreeNode *node, bool expanded );

View File

@ -55,7 +55,7 @@ class CORE_EXPORT QgsLayerTreeRegistryBridge : public QObject
signals:
//! Tell others we have just added layers to the tree (used in QGIS to auto-select first newly added layer)
//! @note added in 2.6
void addedLayersToLayerTree( QList<QgsMapLayer*> layers );
void addedLayersToLayerTree( const QList<QgsMapLayer*>& layers );
protected slots:
void layersAdded( const QList<QgsMapLayer*>& layers );

View File

@ -35,7 +35,7 @@ class CORE_EXPORT QgsBrowserWatcher : public QFutureWatcher<QVector <QgsDataItem
QgsDataItem* item() const { return mItem; }
signals:
void finished( QgsDataItem* item, QVector <QgsDataItem*> items );
void finished( QgsDataItem* item, const QVector <QgsDataItem*>& items );
private:
QgsDataItem *mItem;

View File

@ -35,7 +35,7 @@ class CORE_EXPORT QgsGeometryValidator : public QThread
static void validateGeometry( const QgsGeometry *g, QList<QgsGeometry::Error> &errors );
signals:
void errorFound( QgsGeometry::Error );
void errorFound( const QgsGeometry::Error& );
public slots:
void addError( const QgsGeometry::Error& );

View File

@ -128,7 +128,7 @@ class CORE_EXPORT QgsHttpTransaction : public QObject
void totalSteps( int theTotalSteps );
/** \brief emit a signal to be caught by qgisapp and display a msg on status bar */
void statusChanged( QString theStatusQString );
void statusChanged( const QString& theStatusQString );
private:

View File

@ -490,7 +490,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
void drawingProgress( int theProgress, int theTotalSteps );
/** Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar) */
void statusChanged( QString theStatus );
void statusChanged( const QString& theStatus );
/** Emit a signal that the layer name has been changed */
void layerNameChanged();

View File

@ -163,7 +163,7 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
*
* @param theLayerIds A list of ids of the layers which are removed.
*/
void layersWillBeRemoved( QStringList theLayerIds );
void layersWillBeRemoved( const QStringList& theLayerIds );
/**
* Emitted when a layer is removed from the registry
@ -172,14 +172,14 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
*
* @note Consider using {@link layersWillBeRemoved()} instead
*/
void layerWillBeRemoved( QString theLayerId );
void layerWillBeRemoved( const QString& theLayerId );
/**
* Emitted after one or more layers were removed from the registry
*
* @param theLayerIds A list of ids of the layers which were removed.
*/
void layersRemoved( QStringList theLayerIds );
void layersRemoved( const QStringList& theLayerIds );
/**
* Emitted after a layer was removed from the registry
@ -188,7 +188,7 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
*
* @note Consider using {@link layersRemoved()} instead
*/
void layerRemoved( QString theLayerId );
void layerRemoved( const QString& theLayerId );
/**
@ -208,7 +208,7 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
*
* @see legendLayersAdded()
*/
void layersAdded( QList<QgsMapLayer *> theMapLayers );
void layersAdded( const QList<QgsMapLayer *>& theMapLayers );
/**
* Emitted when a layer is added to the registry.
@ -227,7 +227,7 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
*
* @param theMapLayers The {@link QgsMapLayer}s which are added to the legend.
*/
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
void legendLayersAdded( const QList<QgsMapLayer*>& theMapLayers );
protected:
#if 0

View File

@ -46,7 +46,7 @@ class CORE_EXPORT QgsMessageLog : public QObject
static void logMessage( const QString& message, const QString& tag = QString::null, MessageLevel level = WARNING );
signals:
void messageReceived( QString message, QString tag, QgsMessageLog::MessageLevel level );
void messageReceived( const QString& message, const QString& tag, QgsMessageLog::MessageLevel level );
void messageReceived( bool received );

View File

@ -362,14 +362,14 @@ class CORE_EXPORT QgsProject : public QObject
void projectSaved();
//! emitted when an old project file is read.
void oldProjectVersionWarning( QString );
void oldProjectVersionWarning( const QString& );
//! emitted when a layer from a projects was read
// @param i current layer
// @param n number of layers
void layerLoaded( int i, int n );
void loadingLayer( QString );
void loadingLayer( const QString& );
void snapSettingsChanged();

View File

@ -934,7 +934,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
/**
* Change selection to the new set of features. Dismisses the current selection.
* Will emit the { @link selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) } signal with the
* Will emit the { @link selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&qt_check_for_QOBJECT_macro, bool ) } signal with the
* clearAndSelect flag set.
*
* @param ids The ids which will be the new selection
@ -1853,7 +1853,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
* @param deselected Ids of all features which have previously been selected but are not any more
* @param clearAndSelect In case this is set to true, the old selection was dismissed and the new selection corresponds to selected
*/
void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
void selectionChanged( const QgsFeatureIds& selected, const QgsFeatureIds& deselected, const bool clearAndSelect );
/** This signal is emitted when selection was changed */
void selectionChanged();
@ -1891,7 +1891,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
*
* @param fieldName The name of the attribute to be added
*/
void beforeAddingExpressionField( QString fieldName );
void beforeAddingExpressionField( const QString& fieldName );
/**
* Will be emitted, when an attribute has been deleted from this vector layer.
* Applies only to types {@link QgsFields::OriginEdit}, {@link QgsFields::OriginProvider} and {@link QgsFields::OriginExpression }
@ -1919,7 +1919,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
* Emitted when a feature has been deleted.
*
* If you do expensive operations in a slot connected to this, you should prever to use
* {@link featuresDeleted(QgsFeatureIds)}.
* {@link featuresDeleted( const QgsFeatureIds& )}.
*
* @param fid The id of the feature which has been deleted
*/
@ -1933,7 +1933,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
*
* @param fids The feature ids that have been deleted.
*/
void featuresDeleted( QgsFeatureIds fids );
void featuresDeleted( const QgsFeatureIds& fids );
/**
* Is emitted, whenever the fields available from this layer have been changed.
* This can be due to manually adding attributes or due to a join.

View File

@ -410,7 +410,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
signals:
/** Emit a signal to notify of the progress event.
* Emitted theProgress is in percents (0.0-100.0) */
void progress( int theType, double theProgress, QString theMessage );
void progress( int theType, double theProgress, const QString& theMessage );
void progressUpdate( int theProgress );
protected:

View File

@ -315,7 +315,7 @@ class CORE_EXPORT QgsStyleV2 : public QObject
bool importXML( const QString& filename );
signals:
void symbolSaved( QString name, QgsSymbolV2* symbol );
void symbolSaved( const QString& name, QgsSymbolV2* symbol );
protected:

View File

@ -126,7 +126,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView
* @param atIndex The QModelIndex, to which the context menu belongs. Relative to the source model.
* In most cases, this will be a @link QgsAttributeTableFilterModel @endlink
*/
void willShowContextMenu( QMenu* menu, QModelIndex atIndex );
void willShowContextMenu( QMenu* menu, const QModelIndex& atIndex );
void finished();

View File

@ -170,7 +170,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
* Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied
*/
void displayExpressionChanged( const QString expression );
void displayExpressionChanged( const QString& expression );
/**
* Is emitted, whenever the filter changes

View File

@ -133,7 +133,7 @@ class GUI_EXPORT QgsFeatureListView : public QListView
* Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied
*/
void displayExpressionChanged( const QString expression );
void displayExpressionChanged( const QString& expression );
void aboutToChangeEditSelection( bool& ok );

View File

@ -51,7 +51,7 @@ class GUI_EXPORT QgsFeatureSelectionModel : public QItemSelectionModel
*
* @param indexes The model indexes which need to be repainted
*/
void requestRepaint( QModelIndexList indexes );
void requestRepaint( const QModelIndexList& indexes );
/**
* Request a repaint of the visible items of connected views.

View File

@ -57,7 +57,7 @@ class GUI_EXPORT QgsIFeatureSelectionManager : public QObject
/**
* Change selection to the new set of features. Dismisses the current selection.
* Will emit the { @link selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) } signal with the
* Will emit the { @link selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) } signal with the
* clearAndSelect flag set.
*
* @param ids The ids which will be the new selection
@ -80,7 +80,7 @@ class GUI_EXPORT QgsIFeatureSelectionManager : public QObject
* @param deselected Ids of all features which have previously been selected but are not any more
* @param clearAndSelect In case this is set to true, the old selection was dismissed and the new selection corresponds to selected
*/
void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
void selectionChanged( const QgsFeatureIds& selected, const QgsFeatureIds& deselected, const bool clearAndSelect );
};
#endif // QGSIFEATURESELECTIONMANAGER_H

View File

@ -49,7 +49,7 @@ class GUI_EXPORT QgsVectorLayerSelectionManager : public QgsIFeatureSelectionMan
/**
* Change selection to the new set of features. Dismisses the current selection.
* Will emit the { @link selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) } signal with the
* Will emit the { @link selectionChanged( const QgsFeatureIds&, const QgsFeatureIds&, bool ) } signal with the
* clearAndSelect flag set.
*
* @param ids The ids which will be the new selection

View File

@ -73,7 +73,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper
* Emitted whenever the expression changes
* @param exp The new search expression
*/
void expressionChanged( QString exp );
void expressionChanged( const QString& exp );
protected slots:

View File

@ -125,7 +125,7 @@ class GUI_EXPORT QgsRelationReferenceWidget : public QWidget
void init();
signals:
void foreignKeyChanged( QVariant );
void foreignKeyChanged( const QVariant& );
private slots:
void highlightActionTriggered( QAction* action );

View File

@ -606,7 +606,7 @@ class GUI_EXPORT QgisInterface : public QObject
@note
added in version 2.7
*/
void layerSavedAs( QgsMapLayer* l, QString path );
void layerSavedAs( QgsMapLayer* l, const QString& path );
};
#endif //#ifndef QGISINTERFACE_H

View File

@ -105,7 +105,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
* @param attribute The name of the attribute that changed.
* @param value The new value of the attribute.
*/
void attributeChanged( QString attribute, const QVariant& value );
void attributeChanged( const QString& attribute, const QVariant& value );
/**
* Will be emitted before the feature is saved. Use this signal to perform sanity checks.

View File

@ -36,7 +36,7 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr
~QgsCredentialDialog();
signals:
void credentialsRequested( QString, QString *, QString *, QString, bool * );
void credentialsRequested( const QString&, QString *, QString *, const QString&, bool * );
void credentialsRequestedMasterPassword( QString *, bool, bool * );

View File

@ -33,7 +33,7 @@ class GUI_EXPORT QgsDial : public QDial
QVariant variantValue() const;
signals:
void valueChanged( QVariant );
void valueChanged( const QVariant& );
protected slots:
void valueChanged( int );

View File

@ -57,7 +57,7 @@ class GUI_EXPORT QgsFieldComboBox : public QComboBox
signals:
//! the signal is emitted when the currently selected field changes
void fieldChanged( QString fieldName );
void fieldChanged( const QString& fieldName );
public slots:
//! set the layer of which the fields are listed

View File

@ -102,10 +102,10 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
signals:
//! the signal is emitted when the currently selected field changes
void fieldChanged( QString fieldName );
void fieldChanged( const QString& fieldName );
//! fieldChanged signal with indication of the validity of the expression
void fieldChanged( QString fieldName, bool isValid );
void fieldChanged( const QString& fieldName, bool isValid );
// void returnPressed();

View File

@ -108,7 +108,7 @@ class GUI_EXPORT QgsLegendInterface : public QObject
void groupRelationsChanged();
/* //! emitted when an item (group/layer) is added */
void itemAdded( QModelIndex index );
void itemAdded( const QModelIndex& index );
/* //! emitted when an item (group/layer) is removed */
void itemRemoved();

View File

@ -74,7 +74,7 @@ class GUI_EXPORT QgsMapLayerAction : public QAction
signals:
/** Triggered when action has been run for a specific list of features */
void triggeredForFeatures( QgsMapLayer* layer, const QList<QgsFeature> featureList );
void triggeredForFeatures( QgsMapLayer* layer, const QList<QgsFeature>& featureList );
/** Triggered when action has been run for a specific feature */
void triggeredForFeature( QgsMapLayer* layer, const QgsFeature& feature );

View File

@ -148,7 +148,7 @@ class GUI_EXPORT QgsMapTool : public QObject
signals:
//! emit a message
void messageEmitted( QString message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO );
void messageEmitted( const QString& message, QgsMessageBar::MessageLevel = QgsMessageBar::INFO );
//! emit signal to clear previous message
void messageDiscarded();

View File

@ -132,7 +132,7 @@ class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool
signals:
void identifyProgress( int, int );
void identifyMessage( QString );
void identifyMessage( const QString& );
void changedRasterResults( QList<IdentifyResult>& );
protected:

View File

@ -67,7 +67,7 @@ class GUI_EXPORT QgsMessageBarItem : public QWidget
signals:
//! emitted when the message level has changed
void styleChanged( QString styleSheet );
void styleChanged( const QString& styleSheet );
private:

View File

@ -71,7 +71,7 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget
/** Emitted when the selected CRS is changed
*/
void crsChanged( QgsCoordinateReferenceSystem );
void crsChanged( const QgsCoordinateReferenceSystem& );
public slots:

View File

@ -200,7 +200,7 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti
QStringList authorities();
signals:
void sridSelected( QString theSRID );
void sridSelected( const QString& theSRID );
//! Refresh any listening canvases
void refresh();
//! Let listeners know if find has focus so they can adjust the default button

View File

@ -34,7 +34,7 @@ class GUI_EXPORT QgsSlider : public QSlider
QVariant variantValue() const;
signals:
void valueChanged( QVariant );
void valueChanged( const QVariant& );
protected slots:
void valueChanged( int );

View File

@ -137,8 +137,8 @@ class QgsRendererV2DataDefinedMenus : public QObject
signals:
void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName );
void rotationFieldChanged( const QString& fldName );
void sizeScaleFieldChanged( const QString& fldName );
void scaleMethodChanged( QgsSymbolV2::ScaleMethod scaleMethod );
protected:

View File

@ -36,7 +36,7 @@ class QgsReaderThread : public QThread
virtual void run() override;
signals:
void helpRead( QString help );
void helpRead( const QString& help );
};

View File

@ -51,8 +51,8 @@ class CoordinateCaptureMapTool : public QgsMapTool
public slots:
signals:
void mouseMoved( QgsPoint );
void mouseClicked( QgsPoint );
void mouseMoved( const QgsPoint& );
void mouseClicked( const QgsPoint& );
private:
//! Rubber band for highlighting identified feature

View File

@ -44,7 +44,7 @@ class dxf2shpConverterGui: public QDialog, private Ui::dxf2shpConverterGui
void on_btnBrowseOutputDir_clicked();
signals:
void createLayer( QString, QString );
void createLayer( const QString&, const QString& );
};
#endif

View File

@ -84,7 +84,7 @@ class eVisDatabaseConnectionGui : public QDialog, private Ui::eVisDatabaseConnec
signals:
/** \brief signal emitted by the drawNewVectorLayer slot */
void drawVectorLayer( QString, QString, QString );
void drawVectorLayer( const QString&, const QString&, const QString& );
};
#endif

View File

@ -83,22 +83,22 @@ class QgsGPSPluginGui : public QDialog, private Ui::QgsGPSPluginGuiBase
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
signals:
void drawRasterLayer( QString );
void drawVectorLayer( QString, QString, QString );
void loadGPXFile( QString fileName, bool showWaypoints, bool showRoutes,
void drawRasterLayer( const QString& );
void drawVectorLayer( const QString&, const QString&, const QString& );
void loadGPXFile( const QString& fileName, bool showWaypoints, bool showRoutes,
bool showTracks );
void importGPSFile( QString inputFileName, QgsBabelFormat* importer,
void importGPSFile( const QString& inputFileName, QgsBabelFormat* importer,
bool importWaypoints, bool importRoutes,
bool importTracks, QString outputFileName,
QString layerName );
void convertGPSFile( QString inputFileName,
bool importTracks, const QString& outputFileName,
const QString& layerName );
void convertGPSFile( const QString& inputFileName,
int convertType,
QString outputFileName,
QString layerName );
void downloadFromGPS( QString device, QString port, bool downloadWaypoints,
const QString& outputFileName,
const QString& layerName );
void downloadFromGPS( const QString& device, const QString& port, bool downloadWaypoints,
bool downloadRoutes, bool downloadTracks,
QString outputFileName, QString layerName );
void uploadToGPS( QgsVectorLayer* gpxLayer, QString device, QString port );
const QString& outputFileName, const QString& layerName );
void uploadToGPS( QgsVectorLayer* gpxLayer, const QString& device, const QString& port );
private:

View File

@ -73,7 +73,7 @@ class QgsDelimitedTextSourceSelect : public QDialog, private Ui::QgsDelimitedTex
bool validate();
signals:
void addVectorLayer( QString, QString, QString );
void addVectorLayer( const QString&, const QString&, const QString& );
};
#endif // QGSDELIMITEDTEXTSOURCESELECT_H

View File

@ -248,7 +248,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
const QStringList & theConfigOptions, const QString & fileFormat );
signals:
void statusChanged( QString );
void statusChanged( const QString& );
private:
// update mode

View File

@ -65,7 +65,7 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
QString connInfo() const { return mConnInfo; }
signals:
void addGeometryColumn( QgsMssqlLayerProperty );
void addGeometryColumn( const QgsMssqlLayerProperty& );
public slots:
void editConnection();

View File

@ -62,7 +62,7 @@ class QgsMssqlGeomColumnTypeThread : public QThread
virtual void run() override;
signals:
void setLayerType( QgsMssqlLayerProperty layerProperty );
void setLayerType( const QgsMssqlLayerProperty& layerProperty );
public slots:
void addGeometryColumn( const QgsMssqlLayerProperty& layerProperty );
@ -108,7 +108,7 @@ class QgsMssqlSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
signals:
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
void connectionsChanged();
void addGeometryColumn( QgsMssqlLayerProperty );
void addGeometryColumn( const QgsMssqlLayerProperty& );
public slots:
//! Determines the tables the user selected and closes the dialog

View File

@ -35,9 +35,9 @@ class QgsGeomColumnTypeThread : public QThread
virtual void run() override;
signals:
void setLayerType( QgsPostgresLayerProperty layerProperty );
void setLayerType( const QgsPostgresLayerProperty& layerProperty );
void progress( int, int );
void progressMessage( QString );
void progressMessage( const QString& );
public slots:
void stop();

View File

@ -66,7 +66,7 @@ class QgsPGConnectionItem : public QgsDataCollectionItem
bool handleDrop( const QMimeData * data, const QString& toSchema );
signals:
void addGeometryColumn( QgsPostgresLayerProperty );
void addGeometryColumn( const QgsPostgresLayerProperty& );
public slots:
void editConnection();

View File

@ -154,7 +154,7 @@ class QgsWFSProvider : public QgsVectorDataProvider
virtual void reloadData() override;
signals:
void dataReadProgressMessage( QString message );
void dataReadProgressMessage( const QString& message );
void dataChanged();

View File

@ -49,7 +49,7 @@ class QgsWFSSourceSelect: public QDialog, private Ui::QgsWFSSourceSelectBase
~QgsWFSSourceSelect();
signals:
void addWfsLayer( QString uri, QString typeName );
void addWfsLayer( const QString& uri, const QString& typeName );
void connectionsChanged();
private: