Skip to content
Permalink
Browse files

Fix big parameter passed by value warnings

  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent bca1560 commit c1fe68c8212932ec2a536e847351219f98785830
@@ -41,7 +41,7 @@ class QgsDualView : QStackedWidget
* @param request Use a modified request to limit the shown features
* @param context The context in which this view is shown
*/
void init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest& request = QgsFeatureRequest(), QgsAttributeEditorContext context = QgsAttributeEditorContext() );
void init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest& request = QgsFeatureRequest(), const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

/**
* Change the current view mode.
@@ -51,7 +51,7 @@ class QgsEditorWidgetRegistry : QObject
const QgsEditorWidgetConfig& config,
QWidget* editor,
QWidget* parent /TransferThis/,
const QgsAttributeEditorContext context = QgsAttributeEditorContext() ) /Factory/;
const QgsAttributeEditorContext& context = QgsAttributeEditorContext() ) /Factory/;

/**
* Creates a configuration widget
@@ -27,7 +27,7 @@ class QgsRelationReferenceWidget : QWidget
//! returns the related feature foreign key
QVariant foreignKey();

void setEditorContext( QgsAttributeEditorContext context, QgsMapCanvas* canvas, QgsMessageBar* messageBar );
void setEditorContext( const QgsAttributeEditorContext& context, QgsMapCanvas* canvas, QgsMessageBar* messageBar );

//! determines if the form of the related feature will be shown
bool embedForm();
@@ -17,7 +17,7 @@ class QgsAttributeDialog : QDialog
*
* @deprecated
*/
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget* parent = 0, bool showDialogButtons = true ) /Deprecated/;
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, const QgsDistanceArea& myDa, QWidget* parent = 0, bool showDialogButtons = true ) /Deprecated/;

/**
* Create an attribute dialog for a given layer and feature
@@ -30,7 +30,7 @@ class QgsAttributeDialog : QDialog
* @param context The context in which this dialog is created
*
*/
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget* parent = 0, bool showDialogButtons = true, QgsAttributeEditorContext context = QgsAttributeEditorContext() );
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget* parent = 0, bool showDialogButtons = true, const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

/** Saves the size and position for the next time
* this dialog box will be used.
@@ -20,7 +20,7 @@ class QgsAttributeForm : QWidget
%End

public:
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature feature = QgsFeature(), QgsAttributeEditorContext context = QgsAttributeEditorContext(), QWidget *parent = 0 );
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature& feature = QgsFeature(), const QgsAttributeEditorContext& context = QgsAttributeEditorContext(), QWidget *parent = 0 );
~QgsAttributeForm();

const QgsFeature& feature();
@@ -60,7 +60,7 @@ QgsDualView::QgsDualView( QWidget* parent )
connect( mFeatureList, SIGNAL( displayExpressionChanged( QString ) ), this, SLOT( previewExpressionChanged( QString ) ) );
}

void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest &request, QgsAttributeEditorContext context )
void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest &request, const QgsAttributeEditorContext &context )
{
mEditorContext = context;

@@ -78,7 +78,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
* @param request Use a modified request to limit the shown features
* @param context The context in which this view is shown
*/
void init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest& request = QgsFeatureRequest(), QgsAttributeEditorContext context = QgsAttributeEditorContext() );
void init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest& request = QgsFeatureRequest(), const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

/**
* Change the current view mode.
@@ -81,7 +81,7 @@ QgsEditorWidgetRegistry::~QgsEditorWidgetRegistry()
qDeleteAll( mWidgetFactories.values() );
}

QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::create( const QString& widgetId, QgsVectorLayer* vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* editor, QWidget* parent, const QgsAttributeEditorContext context )
QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::create( const QString& widgetId, QgsVectorLayer* vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* editor, QWidget* parent, const QgsAttributeEditorContext &context )
{
if ( mWidgetFactories.contains( widgetId ) )
{
@@ -81,7 +81,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject
const QgsEditorWidgetConfig& config,
QWidget* editor,
QWidget* parent,
const QgsAttributeEditorContext context = QgsAttributeEditorContext() );
const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

/**
* Creates a configuration widget
@@ -47,7 +47,7 @@ void QgsWidgetWrapper::setConfig( const QgsEditorWidgetConfig& config )
mConfig = config;
}

void QgsWidgetWrapper::setContext( const QgsAttributeEditorContext context )
void QgsWidgetWrapper::setContext( const QgsAttributeEditorContext &context )
{
mContext = context;
}
@@ -77,7 +77,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
*
* @param context context information
*/
void setContext( const QgsAttributeEditorContext context );
void setContext( const QgsAttributeEditorContext& context );

/**
* Use this inside your overriden classes to access the configuration.
@@ -346,7 +346,7 @@ QVariant QgsRelationReferenceWidget::foreignKey()
}
}

void QgsRelationReferenceWidget::setEditorContext( QgsAttributeEditorContext context, QgsMapCanvas* canvas, QgsMessageBar* messageBar )
void QgsRelationReferenceWidget::setEditorContext( const QgsAttributeEditorContext &context, QgsMapCanvas* canvas, QgsMessageBar* messageBar )
{
mEditorContext = context;
mCanvas = canvas;
@@ -60,7 +60,7 @@ class GUI_EXPORT QgsRelationReferenceWidget : public QWidget
//! returns the related feature foreign key
QVariant foreignKey();

void setEditorContext( QgsAttributeEditorContext context, QgsMapCanvas* canvas, QgsMessageBar* messageBar );
void setEditorContext( const QgsAttributeEditorContext& context, QgsMapCanvas* canvas, QgsMessageBar* messageBar );

//! determines if the form of the related feature will be shown
bool embedForm() {return mEmbedForm;}
@@ -25,7 +25,7 @@
#include <QSettings>


QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget* parent, bool showDialogButtons )
QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, const QgsDistanceArea &myDa, QWidget* parent, bool showDialogButtons )
: QDialog( parent )
, mHighlight( 0 )
, mOwnedFeature( featureOwner ? thepFeature : 0 )
@@ -39,7 +39,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeat
mAttributeForm->hideButtonBox();
}

QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, QWidget* parent, bool showDialogButtons, QgsAttributeEditorContext context )
QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer* vl, QgsFeature* thepFeature, bool featureOwner, QWidget* parent, bool showDialogButtons, const QgsAttributeEditorContext &context )
: QDialog( parent )
, mHighlight( 0 )
, mOwnedFeature( featureOwner ? thepFeature : 0 )
@@ -97,7 +97,7 @@ void QgsAttributeDialog::show( bool autoDelete )
activateWindow();
}

void QgsAttributeDialog::init( QgsVectorLayer* layer, QgsFeature* feature, QgsAttributeEditorContext& context, QWidget* parent )
void QgsAttributeDialog::init( QgsVectorLayer* layer, QgsFeature* feature, const QgsAttributeEditorContext &context, QWidget* parent )
{
setWindowTitle( tr( "%1 - Feature Attributes" ).arg( layer->name() ) );
setLayout( new QGridLayout() );
@@ -49,7 +49,7 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
*
* @deprecated
*/
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget* parent = 0, bool showDialogButtons = true );
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, const QgsDistanceArea& myDa, QWidget* parent = 0, bool showDialogButtons = true );

/**
* Create an attribute dialog for a given layer and feature
@@ -62,7 +62,7 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
* @param context The context in which this dialog is created
*
*/
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget* parent = 0, bool showDialogButtons = true, QgsAttributeEditorContext context = QgsAttributeEditorContext() );
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget* parent = 0, bool showDialogButtons = true, const QgsAttributeEditorContext& context = QgsAttributeEditorContext() );

~QgsAttributeDialog();

@@ -126,7 +126,7 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
void show( bool autoDelete = true );

private:
void init( QgsVectorLayer* layer, QgsFeature* feature, QgsAttributeEditorContext& context, QWidget* parent );
void init( QgsVectorLayer* layer, QgsFeature* feature, const QgsAttributeEditorContext& context, QWidget* parent );

QString mSettingsPath;
// Used to sync multiple widgets for the same field
@@ -37,7 +37,7 @@

int QgsAttributeForm::sFormCounter = 0;

QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature, QgsAttributeEditorContext context, QWidget* parent )
QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature, const QgsAttributeEditorContext &context, QWidget* parent )
: QWidget( parent )
, mLayer( vl )
, mContext( context )
@@ -31,7 +31,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
Q_OBJECT

public:
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature = QgsFeature(), QgsAttributeEditorContext context = QgsAttributeEditorContext(), QWidget *parent = 0 );
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature = QgsFeature(), const QgsAttributeEditorContext& context = QgsAttributeEditorContext(), QWidget *parent = 0 );
~QgsAttributeForm();

const QgsFeature& feature() { return mFeature; }
@@ -119,7 +119,7 @@ void QgsWCSConnectionItem::deleteConnection()

// ---------------------------------------------------------------------------

QgsWCSLayerItem::QgsWCSLayerItem( QgsDataItem* parent, QString name, QString path, QgsWcsCapabilitiesProperty capabilitiesProperty, QgsDataSourceURI dataSourceUri, QgsWcsCoverageSummary coverageSummary )
QgsWCSLayerItem::QgsWCSLayerItem( QgsDataItem* parent, QString name, QString path, QgsWcsCapabilitiesProperty capabilitiesProperty, QgsDataSourceURI dataSourceUri, const QgsWcsCoverageSummary& coverageSummary )
: QgsLayerItem( parent, name, path, QString(), QgsLayerItem::Raster, "wcs" ),
mCapabilities( capabilitiesProperty ),
mDataSourceUri( dataSourceUri ),
@@ -49,7 +49,7 @@ class QgsWCSLayerItem : public QgsLayerItem
Q_OBJECT
public:
QgsWCSLayerItem( QgsDataItem* parent, QString name, QString path,
QgsWcsCapabilitiesProperty capabilitiesProperty, QgsDataSourceURI dataSourceUri, QgsWcsCoverageSummary coverageSummary );
QgsWcsCapabilitiesProperty capabilitiesProperty, QgsDataSourceURI dataSourceUri, const QgsWcsCoverageSummary& coverageSummary );
~QgsWCSLayerItem();

QString createUri();
@@ -1198,7 +1198,7 @@ int QgsWcsProvider::capabilities() const
return capability;
}

QString QgsWcsProvider::coverageMetadata( QgsWcsCoverageSummary coverage )
QString QgsWcsProvider::coverageMetadata( const QgsWcsCoverageSummary &coverage )
{
QString metadata;

@@ -232,7 +232,7 @@ class QgsWcsProvider : public QgsRasterDataProvider, QgsGdalProviderBase
*/
QString prepareUri( QString uri ) const;

QString coverageMetadata( QgsWcsCoverageSummary c );
QString coverageMetadata( const QgsWcsCoverageSummary& c );

//! remove query item and replace it with a new value
void setQueryItem( QUrl &url, QString key, QString value );

0 comments on commit c1fe68c

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