Skip to content
Permalink
Browse files

Change all signals to use const refs for non trivial objects

  • Loading branch information
nyalldawson committed Oct 26, 2015
1 parent 70bff3f commit f1633a17961a7a6e3a64877d5bb356b812c93d1e
Showing with 126 additions and 126 deletions.
  1. +1 −1 python/analysis/network/qgsgraphdirector.sip
  2. +1 −1 python/core/composer/qgsatlascomposition.sip
  3. +1 −1 python/core/layertree/qgslayertreenode.sip
  4. +1 −1 python/core/layertree/qgslayertreeregistrybridge.sip
  5. +1 −1 python/core/qgsgeometryvalidator.sip
  6. +1 −1 python/core/qgshttptransaction.sip
  7. +1 −1 python/core/qgsmaplayer.sip
  8. +6 −6 python/core/qgsmaplayerregistry.sip
  9. +1 −1 python/core/qgsmessagelog.sip
  10. +2 −2 python/core/qgsproject.sip
  11. +3 −3 python/core/qgsvectorlayer.sip
  12. +1 −1 python/core/raster/qgsrasterdataprovider.sip
  13. +1 −1 python/core/symbology-ng/qgsstylev2.sip
  14. +1 −1 python/gui/attributetable/qgsattributetableview.sip
  15. +1 −1 python/gui/attributetable/qgsdualview.sip
  16. +1 −1 python/gui/attributetable/qgsfeaturelistview.sip
  17. +1 −1 python/gui/attributetable/qgsfeatureselectionmodel.sip
  18. +2 −2 python/gui/attributetable/qgsifeatureselectionmanager.sip
  19. +1 −1 python/gui/editorwidgets/qgsrelationreferencewidget.sip
  20. +1 −1 python/gui/qgisinterface.sip
  21. +1 −1 python/gui/qgsattributeform.sip
  22. +1 −1 python/gui/qgsfieldcombobox.sip
  23. +2 −2 python/gui/qgsfieldexpressionwidget.sip
  24. +1 −1 python/gui/qgslegendinterface.sip
  25. +1 −1 python/gui/qgsmaplayeractionregistry.sip
  26. +1 −1 python/gui/qgsmaptool.sip
  27. +1 −1 python/gui/qgsmaptoolidentify.sip
  28. +1 −1 python/gui/qgsmessagebaritem.sip
  29. +1 −1 python/gui/qgsprojectionselectionwidget.sip
  30. +1 −1 python/gui/qgsprojectionselector.sip
  31. +1 −1 src/analysis/network/qgsgraphdirector.h
  32. +1 −1 src/app/composer/qgscompositionwidget.h
  33. +2 −2 src/app/qgisapp.h
  34. +1 −1 src/app/qgisappinterface.h
  35. +1 −1 src/app/qgsmaptoolidentifyaction.h
  36. +1 −1 src/app/qgsrasterlayerproperties.h
  37. +2 −2 src/app/qgsvectorlayerproperties.h
  38. +1 −1 src/core/composer/qgsatlascomposition.h
  39. +1 −1 src/core/composer/qgscomposition.h
  40. +1 −1 src/core/layertree/qgslayertreenode.h
  41. +1 −1 src/core/layertree/qgslayertreeregistrybridge.h
  42. +1 −1 src/core/qgsbrowsermodel.h
  43. +1 −1 src/core/qgsgeometryvalidator.h
  44. +1 −1 src/core/qgshttptransaction.h
  45. +1 −1 src/core/qgsmaplayer.h
  46. +6 −6 src/core/qgsmaplayerregistry.h
  47. +1 −1 src/core/qgsmessagelog.h
  48. +2 −2 src/core/qgsproject.h
  49. +5 −5 src/core/qgsvectorlayer.h
  50. +1 −1 src/core/raster/qgsrasterdataprovider.h
  51. +1 −1 src/core/symbology-ng/qgsstylev2.h
  52. +1 −1 src/gui/attributetable/qgsattributetableview.h
  53. +1 −1 src/gui/attributetable/qgsdualview.h
  54. +1 −1 src/gui/attributetable/qgsfeaturelistview.h
  55. +1 −1 src/gui/attributetable/qgsfeatureselectionmodel.h
  56. +2 −2 src/gui/attributetable/qgsifeatureselectionmanager.h
  57. +1 −1 src/gui/attributetable/qgsvectorlayerselectionmanager.h
  58. +1 −1 src/gui/editorwidgets/core/qgssearchwidgetwrapper.h
  59. +1 −1 src/gui/editorwidgets/qgsrelationreferencewidget.h
  60. +1 −1 src/gui/qgisinterface.h
  61. +1 −1 src/gui/qgsattributeform.h
  62. +1 −1 src/gui/qgscredentialdialog.h
  63. +1 −1 src/gui/qgsdial.h
  64. +1 −1 src/gui/qgsfieldcombobox.h
  65. +2 −2 src/gui/qgsfieldexpressionwidget.h
  66. +1 −1 src/gui/qgslegendinterface.h
  67. +1 −1 src/gui/qgsmaplayeractionregistry.h
  68. +1 −1 src/gui/qgsmaptool.h
  69. +1 −1 src/gui/qgsmaptoolidentify.h
  70. +1 −1 src/gui/qgsmessagebaritem.h
  71. +1 −1 src/gui/qgsprojectionselectionwidget.h
  72. +1 −1 src/gui/qgsprojectionselector.h
  73. +1 −1 src/gui/qgsslider.h
  74. +2 −2 src/gui/symbology-ng/qgsrendererv2widget.h
  75. +1 −1 src/helpviewer/qgshelpviewer.h
  76. +2 −2 src/plugins/coordinate_capture/coordinatecapturemaptool.h
  77. +1 −1 src/plugins/dxf2shp_converter/dxf2shpconvertergui.h
  78. +1 −1 src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h
  79. +12 −12 src/plugins/gps_importer/qgsgpsplugingui.h
  80. +1 −1 src/providers/delimitedtext/qgsdelimitedtextsourceselect.h
  81. +1 −1 src/providers/gdal/qgsgdalprovider.h
  82. +1 −1 src/providers/mssql/qgsmssqldataitems.h
  83. +2 −2 src/providers/mssql/qgsmssqlsourceselect.h
  84. +2 −2 src/providers/postgres/qgscolumntypethread.h
  85. +1 −1 src/providers/postgres/qgspostgresdataitems.h
  86. +1 −1 src/providers/wfs/qgswfsprovider.h
  87. +1 −1 src/providers/wfs/qgswfssourceselect.h
@@ -23,7 +23,7 @@ class QgsGraphDirector : QObject

signals:
void buildProgress( int, int ) const;
void buildMessage( QString ) const;
void buildMessage( const QString& ) const;

public:
//! Destructor
@@ -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 );
@@ -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 );

@@ -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 );

};
@@ -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& );
@@ -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 );
};
@@ -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();
@@ -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
@@ -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();
@@ -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();

@@ -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.
@@ -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:
@@ -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
@@ -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();

@@ -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
@@ -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 );

@@ -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.
@@ -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 );
};
@@ -70,5 +70,5 @@ class QgsRelationReferenceWidget : QWidget
void init();

signals:
void foreignKeyChanged( QVariant );
void foreignKeyChanged( const QVariant& );
};
@@ -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 );
};
@@ -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.
@@ -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
@@ -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();

@@ -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();
@@ -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 );
@@ -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();
@@ -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:
@@ -41,6 +41,6 @@ class QgsMessageBarItem: QWidget

signals:
//! emitted when the message level has changed
void styleChanged( QString styleSheet );
void styleChanged( const QString& styleSheet );
};

@@ -46,7 +46,7 @@ class QgsProjectionSelectionWidget : QWidget

/** Emitted when the selected CRS is changed
*/
void crsChanged( QgsCoordinateReferenceSystem );
void crsChanged( const QgsCoordinateReferenceSystem& );

public slots:

@@ -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
@@ -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
@@ -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 */
@@ -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
@@ -478,7 +478,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual int messageTimeout() override;

signals:
void currentThemeChanged( QString );
void currentThemeChanged( const QString& );

private slots:

@@ -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:

0 comments on commit f1633a1

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