Skip to content

Commit fe221d5

Browse files
committed
Don't return QStrings by reference, since they're implicitly shared
anyway
1 parent f0930ca commit fe221d5

29 files changed

+79
-79
lines changed

python/core/composer/qgsatlascomposition.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public:
177177
bool prepareForFeature( const QgsFeature * feat );
178178

179179
/** Returns the current filename. Must be called after prepareForFeature() */
180-
const QString& currentFilename() const;
180+
QString currentFilename() const;
181181

182182
void writeXML( QDomElement& elem, QDomDocument& doc ) const;
183183

python/core/qgsdistancearea.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class QgsDistanceArea
4646
bool setEllipsoid( double semiMajor, double semiMinor );
4747

4848
//! returns ellipsoid's acronym
49-
const QString& ellipsoid() const;
49+
QString ellipsoid() const;
5050

5151
//! returns ellipsoid's semi major axis
5252
double ellipsoidSemiMajor() const;

python/core/qgsfield.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class QgsField
4444
bool operator!=( const QgsField& other ) const;
4545

4646
//! Gets the name of the field
47-
const QString& name() const;
47+
QString name() const;
4848

4949
//! Gets variant type of the field as it will be retrieved from data source
5050
QVariant::Type type() const;
@@ -55,7 +55,7 @@ class QgsField
5555
the data store reports it, with no attempt to standardize the value.
5656
@return QString containing the field type
5757
*/
58-
const QString& typeName() const;
58+
QString typeName() const;
5959

6060
/**
6161
Gets the length of the field.
@@ -72,7 +72,7 @@ class QgsField
7272
/**
7373
Returns the field comment
7474
*/
75-
const QString& comment() const;
75+
QString comment() const;
7676

7777
/**
7878
Set the field name.

python/core/qgsmaplayer.sip

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,39 @@ class QgsMapLayer : QObject
6969
/** Get the display name of the layer
7070
* @return the layer name
7171
*/
72-
const QString & name() const;
72+
QString name() const;
7373

7474
/** Get the original name of the layer */
75-
const QString & originalName() const;
75+
QString originalName() const;
7676

7777
void setTitle( const QString& title );
78-
const QString& title() const;
78+
QString title() const;
7979

8080
void setAbstract( const QString& abstract );
81-
const QString& abstract() const;
81+
QString abstract() const;
8282

8383
void setKeywordList( const QString& keywords );
84-
const QString& keywordList() const;
84+
QString keywordList() const;
8585

8686
/* Layer dataUrl information */
8787
void setDataUrl( const QString& dataUrl );
88-
const QString& dataUrl() const;
88+
QString dataUrl() const;
8989
void setDataUrlFormat( const QString& dataUrlFormat );
90-
const QString& dataUrlFormat() const;
90+
QString dataUrlFormat() const;
9191

9292
/* Layer attribution information */
9393
void setAttribution( const QString& attrib );
94-
const QString& attribution() const;
94+
QString attribution() const;
9595
void setAttributionUrl( const QString& attribUrl );
96-
const QString& attributionUrl() const;
96+
QString attributionUrl() const;
9797

9898
/* Layer metadataUrl information */
9999
void setMetadataUrl( const QString& metaUrl );
100-
const QString& metadataUrl() const;
100+
QString metadataUrl() const;
101101
void setMetadataUrlType( const QString& metaUrlType );
102-
const QString& metadataUrlType() const;
102+
QString metadataUrlType() const;
103103
void setMetadataUrlFormat( const QString& metaUrlFormat );
104-
const QString& metadataUrlFormat() const;
104+
QString metadataUrlFormat() const;
105105

106106
/** Set the blending mode used for rendering a layer */
107107
void setBlendMode( const QPainter::CompositionMode &blendMode );
@@ -146,7 +146,7 @@ class QgsMapLayer : QObject
146146
QString publicSource() const;
147147

148148
/** Returns the source for the layer */
149-
const QString &source() const;
149+
QString source() const;
150150

151151
/**
152152
* Returns the sublayers of this layer
@@ -356,9 +356,9 @@ class QgsMapLayer : QObject
356356

357357
/* Layer legendUrl information */
358358
void setLegendUrl( const QString& legendUrl );
359-
const QString& legendUrl() const;
359+
QString legendUrl() const;
360360
void setLegendUrlFormat( const QString& legendUrlFormat );
361-
const QString& legendUrlFormat() const;
361+
QString legendUrlFormat() const;
362362

363363
/** @deprecated since 2.4 - returns NULL */
364364
QImage *cacheImage() /Deprecated/;

python/core/qgsmultirenderchecker.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ class QgsMultiRenderChecker
7979
*
8080
* @return A report
8181
*/
82-
const QString& report() const;
82+
QString report() const;
8383

8484
/**
8585
* @brief controlImagePath
8686
* @return
8787
*/
88-
const QString controlImagePath() const;
88+
QString controlImagePath() const;
8989

9090
/** Draws a checkboard pattern for image backgrounds, so that transparency is visible
9191
* without requiring a transparent background for the image

python/core/qgspallabeling.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ class QgsLabelComponent
608608

609609
// methods
610610

611-
const QString& text() const;
611+
QString text() const;
612612
void setText( const QString& text );
613613

614614
const QgsPoint& origin() const;

python/core/qgsproject.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class QgsProject : QObject
4646
void setTitle( const QString& title );
4747

4848
/** Returns title */
49-
const QString & title() const;
49+
QString title() const;
5050
//@}
5151

5252
/**

python/core/qgsprovidermetadata.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ class QgsProviderMetadata
2525

2626
This key string is used for the associative container in QgsProviderRegistry
2727
*/
28-
const QString & key() const;
28+
QString key() const;
2929

3030
/** This returns descriptive text for the provider
3131

3232
This is used to provide a descriptive list of available data providers.
3333
*/
34-
const QString & description() const;
34+
QString description() const;
3535

3636
/** This returns the library file name
3737

3838
This is used to QLibrary calls to load the data provider.
3939
*/
40-
const QString & library() const;
40+
QString library() const;
4141

4242

4343
}; // class QgsProviderMetadata

python/core/qgsrenderchecker.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class QgsRenderChecker
4747
*
4848
* @return The path to the rendered image
4949
*/
50-
const QString& renderedImage();
50+
QString renderedImage();
5151

5252
//! @deprecated since 2.4 - use setMapSettings()
5353
void setMapRenderer( QgsMapRenderer * thepMapRenderer ) /Deprecated/;
@@ -113,7 +113,7 @@ class QgsRenderChecker
113113
*
114114
* @return Path to the expected image file
115115
*/
116-
const QString& expectedImageFile() const;
116+
QString expectedImageFile() const;
117117

118118
/**
119119
* Call this to enable internal buffering of dash messages. You may later call

python/gui/qgsfiledropedit.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class QgsFileDropEdit: QLineEdit
1717
bool isFileOnly() const;
1818
void setFileOnly( bool isFileOnly );
1919

20-
const QString& suffixFilter() const;
20+
QString suffixFilter() const;
2121
void setSuffixFilter( const QString& suffix );
2222

2323
protected:

0 commit comments

Comments
 (0)