Skip to content

Commit fe3417b

Browse files
committed
Partial revert of 70bff3f
Commit was causing crashes in browser. Refs #13738
1 parent e0fc9a9 commit fe3417b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+122
-123
lines changed

python/core/qgsdataitem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class QgsDataItem : QObject
9595
typedef QFlags<QgsDataItem::Capability> Capabilities;
9696

9797
// This will _write_ selected crs in data source
98-
virtual bool setCrs( const QgsCoordinateReferenceSystem& crs );
98+
virtual bool setCrs( QgsCoordinateReferenceSystem crs );
9999

100100
//! @deprecated since 2.8, returned type this will changed to Capabilities
101101
virtual Capability capabilities() /Deprecated/;

python/core/qgspythonrunner.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class QgsPythonRunner
2525
QgsPythonRunner();
2626
virtual ~QgsPythonRunner();
2727

28-
virtual bool runCommand( const QString& command, const QString& messageOnError = QString() ) = 0;
28+
virtual bool runCommand( QString command, QString messageOnError = QString() ) = 0;
2929

30-
virtual bool evalCommand( const QString& command, QString& result ) = 0;
30+
virtual bool evalCommand( QString command, QString& result ) = 0;
3131
};

python/core/raster/qgsrasterdataprovider.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
159159
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the
160160
* list.
161161
*/
162-
virtual QList<QgsRasterPyramid> buildPyramidList( const QList<int>& overviewList = QList<int>() );
162+
virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() );
163163

164164
/** \brief Returns true if raster has at least one populated histogram. */
165165
bool hasPyramids();

src/app/qgisapp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7883,7 +7883,7 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
78837883
public:
78847884
explicit QgsPythonRunnerImpl( QgsPythonUtils* pythonUtils ) : mPythonUtils( pythonUtils ) {}
78857885

7886-
virtual bool runCommand( const QString& command, const QString& messageOnError = QString() ) override
7886+
virtual bool runCommand( QString command, QString messageOnError = QString() ) override
78877887
{
78887888
if ( mPythonUtils && mPythonUtils->isEnabled() )
78897889
{
@@ -7892,7 +7892,7 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
78927892
return false;
78937893
}
78947894

7895-
virtual bool evalCommand( const QString& command, QString &result ) override
7895+
virtual bool evalCommand( QString command, QString &result ) override
78967896
{
78977897
if ( mPythonUtils && mPythonUtils->isEnabled() )
78987898
{

src/core/qgsdataitem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ void QgsDataItem::refresh()
470470
}
471471
}
472472

473-
void QgsDataItem::refresh( const QVector<QgsDataItem*>& children )
473+
void QgsDataItem::refresh( QVector<QgsDataItem*> children )
474474
{
475475
QgsDebugMsgLevel( "mPath = " + mPath, 2 );
476476

src/core/qgsdataitem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class CORE_EXPORT QgsDataItem : public QObject
152152
Q_DECLARE_FLAGS( Capabilities, Capability )
153153

154154
// This will _write_ selected crs in data source
155-
virtual bool setCrs( const QgsCoordinateReferenceSystem& crs )
155+
virtual bool setCrs( QgsCoordinateReferenceSystem crs )
156156
{ Q_UNUSED( crs ); return false; }
157157

158158
//! @deprecated since 2.8, returned type this will changed to Capabilities
@@ -203,7 +203,7 @@ class CORE_EXPORT QgsDataItem : public QObject
203203

204204
protected:
205205
virtual void populate( const QVector<QgsDataItem*>& children );
206-
virtual void refresh( const QVector<QgsDataItem*>& children );
206+
virtual void refresh( QVector<QgsDataItem*> children );
207207
/** The item is scheduled to be deleted. E.g. if deleteLater() is called when
208208
* item is in Populating state (createChildren() running in another thread),
209209
* the deferredDelete() returns true and item will be deleted once Populating finished.

src/core/qgsproviderregistry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef QString databaseDrivers_t();
4242
typedef QString directoryDrivers_t();
4343
typedef QString protocolDrivers_t();
4444
//typedef int dataCapabilities_t();
45-
//typedef QgsDataItem * dataItem_t(const QString&);
45+
//typedef QgsDataItem * dataItem_t(QString);
4646

4747

4848

src/core/qgspythonrunner.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ class CORE_EXPORT QgsPythonRunner
5050
QgsPythonRunner();
5151
virtual ~QgsPythonRunner();
5252

53-
virtual bool runCommand( const QString& command, const QString& messageOnError = QString() ) = 0;
53+
virtual bool runCommand( QString command, QString messageOnError = QString() ) = 0;
5454

55-
virtual bool evalCommand( const QString& command, QString& result ) = 0;
55+
virtual bool evalCommand( QString command, QString& result ) = 0;
5656

5757
static QgsPythonRunner* mInstance;
5858
};

src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ typedef int listStyles_t(
116116

117117
typedef QString getStyleById_t(
118118
const QString& uri,
119-
const QString& styleID,
119+
QString styleID,
120120
QString& errCause
121121
);
122122

src/core/raster/qgsrasterdataprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
281281
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the
282282
* list.
283283
*/
284-
virtual QList<QgsRasterPyramid> buildPyramidList( const QList<int>& overviewList = QList<int>() )
284+
virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() )
285285
{ Q_UNUSED( overviewList ); return QList<QgsRasterPyramid>(); }
286286

287287
/** \brief Returns true if raster has at least one populated histogram. */

src/gui/qgsrasterformatsaveoptionswidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ void QgsRasterFormatSaveOptionsWidget::apply()
234234
}
235235

236236
// typedefs for gdal provider function pointers
237-
typedef QString validateCreationOptionsFormat_t( const QStringList& createOptions, const QString& format );
238-
typedef QString helpCreationOptionsFormat_t( const QString& format );
237+
typedef QString validateCreationOptionsFormat_t( const QStringList& createOptions, QString format );
238+
typedef QString helpCreationOptionsFormat_t( QString format );
239239

240240
void QgsRasterFormatSaveOptionsWidget::helpOptions()
241241
{

src/providers/gdal/qgsgdaldataitems.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString
2424

2525

2626
QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent,
27-
const QString& name, const QString& path, const QString& uri,
27+
QString name, QString path, QString uri,
2828
QStringList *theSublayers )
2929
: QgsLayerItem( parent, name, path, uri, QgsLayerItem::Raster, "gdal" )
3030
{
@@ -58,7 +58,7 @@ QgsLayerItem::Capability QgsGdalLayerItem::capabilities()
5858
return mCapabilities & SetCrs ? SetCrs : NoCapabilities;
5959
}
6060

61-
bool QgsGdalLayerItem::setCrs( const QgsCoordinateReferenceSystem& crs )
61+
bool QgsGdalLayerItem::setCrs( QgsCoordinateReferenceSystem crs )
6262
{
6363
GDALDatasetH hDS = GDALOpen( TO8F( mPath ), GA_Update );
6464
if ( !hDS )

src/providers/gdal/qgsgdaldataitems.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class QgsGdalLayerItem : public QgsLayerItem
2525

2626
public:
2727
QgsGdalLayerItem( QgsDataItem* parent,
28-
const QString& name, const QString& path, const QString& uri,
28+
QString name, QString path, QString uri,
2929
QStringList *theSublayers = NULL );
3030
~QgsGdalLayerItem();
3131

32-
bool setCrs( const QgsCoordinateReferenceSystem& crs ) override;
32+
bool setCrs( QgsCoordinateReferenceSystem crs ) override;
3333
Capability capabilities() override;
3434

3535
QVector<QgsDataItem*> createChildren() override;

src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,7 @@ QList<QgsRasterPyramid> QgsGdalProvider::buildPyramidList()
17811781
}
17821782
#endif
17831783

1784-
QList<QgsRasterPyramid> QgsGdalProvider::buildPyramidList( const QList<int>& overviewList )
1784+
QList<QgsRasterPyramid> QgsGdalProvider::buildPyramidList( QList<int> overviewList )
17851785
{
17861786
int myWidth = mWidth;
17871787
int myHeight = mHeight;
@@ -1790,23 +1790,22 @@ QList<QgsRasterPyramid> QgsGdalProvider::buildPyramidList( const QList<int>& ove
17901790
mPyramidList.clear();
17911791

17921792
// if overviewList is empty (default) build the pyramid list
1793-
QList<int> nonEmptyList = overviewList;
1794-
if ( nonEmptyList.isEmpty() )
1793+
if ( overviewList.isEmpty() )
17951794
{
17961795
int myDivisor = 2;
17971796

17981797
QgsDebugMsg( "Building initial pyramid list" );
17991798

18001799
while (( myWidth / myDivisor > 32 ) && (( myHeight / myDivisor ) > 32 ) )
18011800
{
1802-
nonEmptyList.append( myDivisor );
1801+
overviewList.append( myDivisor );
18031802
//sqare the divisor each step
18041803
myDivisor = ( myDivisor * 2 );
18051804
}
18061805
}
18071806

18081807
// loop over pyramid list
1809-
Q_FOREACH ( int myDivisor, nonEmptyList )
1808+
Q_FOREACH ( int myDivisor, overviewList )
18101809
{
18111810
//
18121811
// First we build up a list of potential pyramid layers
@@ -1875,7 +1874,7 @@ QStringList QgsGdalProvider::subLayers() const
18751874
return mSubLayers;
18761875
}
18771876

1878-
void QgsGdalProvider::emitProgress( int theType, double theProgress, const QString& theMessage )
1877+
void QgsGdalProvider::emitProgress( int theType, double theProgress, QString theMessage )
18791878
{
18801879
emit progress( theType, theProgress, theMessage );
18811880
}
@@ -2708,7 +2707,7 @@ QGISEXTERN QgsGdalProvider * create(
27082707
QGis::DataType type,
27092708
int width, int height, double* geoTransform,
27102709
const QgsCoordinateReferenceSystem& crs,
2711-
const QStringList& createOptions )
2710+
QStringList createOptions )
27122711
{
27132712
//get driver
27142713
GDALDriverH driver = GDALGetDriverByName( format.toLocal8Bit().data() );
@@ -2817,7 +2816,7 @@ QGISEXTERN void buildSupportedRasterFileFilter( QString & theFileFiltersString )
28172816
/**
28182817
Gets creation options metadata for a given format
28192818
*/
2820-
QGISEXTERN QString helpCreationOptionsFormat( const QString& format )
2819+
QGISEXTERN QString helpCreationOptionsFormat( QString format )
28212820
{
28222821
QString message;
28232822
GDALDriverH myGdalDriver = GDALGetDriverByName( format.toLocal8Bit().constData() );
@@ -2849,7 +2848,7 @@ QGISEXTERN QString helpCreationOptionsFormat( const QString& format )
28492848
/**
28502849
Validates creation options for a given format, regardless of layer.
28512850
*/
2852-
QGISEXTERN QString validateCreationOptionsFormat( const QStringList& createOptions, const QString& format )
2851+
QGISEXTERN QString validateCreationOptionsFormat( const QStringList& createOptions, QString format )
28532852
{
28542853
GDALDriverH myGdalDriver = GDALGetDriverByName( format.toLocal8Bit().constData() );
28552854
if ( ! myGdalDriver )

src/providers/gdal/qgsgdalprovider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
224224
const QString & theResamplingMethod = "NEAREST",
225225
QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff,
226226
const QStringList & theCreateOptions = QStringList() ) override;
227-
QList<QgsRasterPyramid> buildPyramidList( const QList<int>& overviewList = QList<int>() ) override;
227+
QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() ) override;
228228

229229
/** \brief Close data set and release related data */
230230
void closeDataset();
231231

232232
/** Emit a signal to notify of the progress event. */
233-
void emitProgress( int theType, double theProgress, const QString& theMessage );
233+
void emitProgress( int theType, double theProgress, QString theMessage );
234234
void emitProgressUpdate( int theProgress );
235235

236236
static QMap<QString, QString> supportedMimes();

src/providers/grass/qgsgrassprovidermodule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class QgsGrassImportItem : public QgsDataItem, public QgsGrassObjectItemBase
227227

228228
protected:
229229
// override refresh to keep Populating state
230-
virtual void refresh( const QVector<QgsDataItem*>& children ) override { Q_UNUSED( children ); }
230+
virtual void refresh( QVector<QgsDataItem*> children ) override { Q_UNUSED( children ); }
231231
//bool mDeleteAction;
232232
QgsGrassImport* mImport;
233233

src/providers/mssql/qgsmssqldataitems.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <QtSql/QSqlError>
3434

3535
// ---------------------------------------------------------------------------
36-
QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, const QString& name, const QString& path )
36+
QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString name, QString path )
3737
: QgsDataCollectionItem( parent, name, path )
3838
, mUseGeometryColumns( false )
3939
, mUseEstimatedMetadata( false )
@@ -406,7 +406,7 @@ bool QgsMssqlConnectionItem::handleDrop( const QMimeData * data, Qt::DropAction
406406

407407

408408
// ---------------------------------------------------------------------------
409-
QgsMssqlLayerItem::QgsMssqlLayerItem( QgsDataItem* parent, const QString& name, const QString& path, QgsLayerItem::LayerType layerType, const QgsMssqlLayerProperty& layerProperty )
409+
QgsMssqlLayerItem::QgsMssqlLayerItem( QgsDataItem* parent, QString name, QString path, QgsLayerItem::LayerType layerType, QgsMssqlLayerProperty layerProperty )
410410
: QgsLayerItem( parent, name, path, QString(), layerType, "mssql" )
411411
, mLayerProperty( layerProperty )
412412
{
@@ -443,7 +443,7 @@ QString QgsMssqlLayerItem::createUri()
443443
}
444444

445445
// ---------------------------------------------------------------------------
446-
QgsMssqlSchemaItem::QgsMssqlSchemaItem( QgsDataItem* parent, const QString& name, const QString& path )
446+
QgsMssqlSchemaItem::QgsMssqlSchemaItem( QgsDataItem* parent, QString name, QString path )
447447
: QgsDataCollectionItem( parent, name, path )
448448
{
449449
mIconName = "mIconDbSchema.png";
@@ -474,7 +474,7 @@ void QgsMssqlSchemaItem::addLayers( QgsDataItem* newLayers )
474474
}
475475
}
476476

477-
QgsMssqlLayerItem* QgsMssqlSchemaItem::addLayer( const QgsMssqlLayerProperty& layerProperty, bool refresh )
477+
QgsMssqlLayerItem* QgsMssqlSchemaItem::addLayer( QgsMssqlLayerProperty layerProperty, bool refresh )
478478
{
479479
QGis::WkbType wkbType = QgsMssqlTableModel::wkbTypeFromMssql( layerProperty.type );
480480
QString tip = tr( "%1 as %2 in %3" ).arg( layerProperty.geometryColName, QgsMssqlTableModel::displayStringForWkbType( wkbType ), layerProperty.srid );
@@ -523,7 +523,7 @@ QgsMssqlLayerItem* QgsMssqlSchemaItem::addLayer( const QgsMssqlLayerProperty& la
523523
}
524524

525525
// ---------------------------------------------------------------------------
526-
QgsMssqlRootItem::QgsMssqlRootItem( QgsDataItem* parent, const QString& name, const QString& path )
526+
QgsMssqlRootItem::QgsMssqlRootItem( QgsDataItem* parent, QString name, QString path )
527527
: QgsDataCollectionItem( parent, name, path )
528528
{
529529
mIconName = "mIconMssql.svg";

src/providers/mssql/qgsmssqldataitems.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QgsMssqlRootItem : public QgsDataCollectionItem
3333
{
3434
Q_OBJECT
3535
public:
36-
QgsMssqlRootItem( QgsDataItem* parent, const QString& name, const QString& path );
36+
QgsMssqlRootItem( QgsDataItem* parent, QString name, QString path );
3737
~QgsMssqlRootItem();
3838

3939
QVector<QgsDataItem*> createChildren() override;
@@ -51,7 +51,7 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
5151
{
5252
Q_OBJECT
5353
public:
54-
QgsMssqlConnectionItem( QgsDataItem* parent, const QString& name, const QString& path );
54+
QgsMssqlConnectionItem( QgsDataItem* parent, QString name, QString path );
5555
~QgsMssqlConnectionItem();
5656

5757
QVector<QgsDataItem*> createChildren() override;
@@ -92,12 +92,12 @@ class QgsMssqlSchemaItem : public QgsDataCollectionItem
9292
{
9393
Q_OBJECT
9494
public:
95-
QgsMssqlSchemaItem( QgsDataItem* parent, const QString& name, const QString& path );
95+
QgsMssqlSchemaItem( QgsDataItem* parent, QString name, QString path );
9696
~QgsMssqlSchemaItem();
9797

9898
QVector<QgsDataItem*> createChildren() override;
9999

100-
QgsMssqlLayerItem* addLayer( const QgsMssqlLayerProperty& layerProperty, bool refresh );
100+
QgsMssqlLayerItem* addLayer( QgsMssqlLayerProperty layerProperty, bool refresh );
101101
void refresh() override {} // do not refresh directly
102102
void addLayers( QgsDataItem* newLayers );
103103
};
@@ -107,7 +107,7 @@ class QgsMssqlLayerItem : public QgsLayerItem
107107
Q_OBJECT
108108

109109
public:
110-
QgsMssqlLayerItem( QgsDataItem* parent, const QString& name, const QString& path, QgsLayerItem::LayerType layerType, const QgsMssqlLayerProperty& layerProperties );
110+
QgsMssqlLayerItem( QgsDataItem* parent, QString name, QString path, QgsLayerItem::LayerType layerType, QgsMssqlLayerProperty layerProperties );
111111
~QgsMssqlLayerItem();
112112

113113
QString createUri();

src/providers/mssql/qgsmssqlprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ QGISEXTERN int dataCapabilities()
18651865
return QgsDataProvider::Database;
18661866
}
18671867

1868-
QGISEXTERN QgsDataItem *dataItem( const QString& thePath, QgsDataItem *parentItem )
1868+
QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem )
18691869
{
18701870
Q_UNUSED( thePath );
18711871
return new QgsMssqlRootItem( parentItem, "MSSQL", "mssql:" );

src/providers/mssql/qgsmssqlsourceselect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ void QgsMssqlSourceSelect::setSql( const QModelIndex &index )
688688
delete vlayer;
689689
}
690690

691-
void QgsMssqlSourceSelect::addSearchGeometryColumn( const QString& connectionName, const QgsMssqlLayerProperty& layerProperty, bool estimateMetadata )
691+
void QgsMssqlSourceSelect::addSearchGeometryColumn( QString connectionName, QgsMssqlLayerProperty layerProperty, bool estimateMetadata )
692692
{
693693
// store the column details and do the query in a thread
694694
if ( !mColumnTypeThread )
@@ -738,7 +738,7 @@ void QgsMssqlSourceSelect::setSearchExpression( const QString& regexp )
738738
}
739739

740740

741-
QgsMssqlGeomColumnTypeThread::QgsMssqlGeomColumnTypeThread( const QString& connectionName, bool useEstimatedMetadata )
741+
QgsMssqlGeomColumnTypeThread::QgsMssqlGeomColumnTypeThread( QString connectionName, bool useEstimatedMetadata )
742742
: QThread()
743743
, mConnectionName( connectionName )
744744
, mUseEstimatedMetadata( useEstimatedMetadata )
@@ -747,7 +747,7 @@ QgsMssqlGeomColumnTypeThread::QgsMssqlGeomColumnTypeThread( const QString& conne
747747
qRegisterMetaType<QgsMssqlLayerProperty>( "QgsMssqlLayerProperty" );
748748
}
749749

750-
void QgsMssqlGeomColumnTypeThread::addGeometryColumn( const QgsMssqlLayerProperty& layerProperty )
750+
void QgsMssqlGeomColumnTypeThread::addGeometryColumn( QgsMssqlLayerProperty layerProperty )
751751
{
752752
layerProperties << layerProperty;
753753
}

0 commit comments

Comments
 (0)