mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Pass by const ref where possible
This commit is contained in:
parent
c9fa976524
commit
2a33844416
@ -248,7 +248,7 @@ class QgsJsonUtils
|
||||
%End
|
||||
|
||||
static QString exportAttributes( const QgsFeature &feature, QgsVectorLayer *layer = 0,
|
||||
QVector<QVariant> attributeWidgetCaches = QVector<QVariant>() );
|
||||
const QVector<QVariant> &attributeWidgetCaches = QVector<QVariant>() );
|
||||
%Docstring
|
||||
Exports all attributes from a QgsFeature as a JSON map type.
|
||||
\param feature feature to export
|
||||
|
@ -48,7 +48,7 @@ class QgsMapRendererTask : QgsTask
|
||||
Adds ``annotations`` to be rendered on the map.
|
||||
%End
|
||||
|
||||
void addDecorations( QList< QgsMapDecoration * > decorations );
|
||||
void addDecorations( const QList<QgsMapDecoration *> &decorations );
|
||||
%Docstring
|
||||
Adds ``decorations`` to be rendered on the map.
|
||||
%End
|
||||
|
@ -166,7 +166,7 @@ Returns a list of all key top-level groups (same as childGroups) but only for gr
|
||||
Return the path to the Global Settings QSettings storage file
|
||||
:rtype: str
|
||||
%End
|
||||
static bool setGlobalSettingsPath( QString path );
|
||||
static bool setGlobalSettingsPath( const QString &path );
|
||||
%Docstring
|
||||
Set the Global Settings QSettings storage file
|
||||
:rtype: bool
|
||||
|
@ -32,7 +32,7 @@ class QgsFileDownloader : QObject
|
||||
%End
|
||||
public:
|
||||
|
||||
QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool guiNotificationsEnabled = true, QString authcfg = QString() );
|
||||
QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool guiNotificationsEnabled = true, const QString &authcfg = QString() );
|
||||
%Docstring
|
||||
QgsFileDownloader
|
||||
\param url the download url
|
||||
|
@ -267,7 +267,7 @@ void QgsDwgImportDialog::on_pbImportDrawing_clicked()
|
||||
on_pbLoadDatabase_clicked();
|
||||
}
|
||||
|
||||
QgsVectorLayer *QgsDwgImportDialog::layer( QgsLayerTreeGroup *layerGroup, QString layerFilter, QString table )
|
||||
QgsVectorLayer *QgsDwgImportDialog::layer( QgsLayerTreeGroup *layerGroup, const QString &layerFilter, const QString &table )
|
||||
{
|
||||
QgsVectorLayer *l = new QgsVectorLayer( QString( "%1|layername=%2" ).arg( leDatabase->text(), table ), table, "ogr", false );
|
||||
l->setSubsetString( QString( "%1space=0 AND block=-1" ).arg( layerFilter ) );
|
||||
@ -283,7 +283,7 @@ QgsVectorLayer *QgsDwgImportDialog::layer( QgsLayerTreeGroup *layerGroup, QStrin
|
||||
return l;
|
||||
}
|
||||
|
||||
void QgsDwgImportDialog::createGroup( QgsLayerTreeGroup *group, QString name, QStringList layers, bool visible )
|
||||
void QgsDwgImportDialog::createGroup( QgsLayerTreeGroup *group, const QString &name, const QStringList &layers, bool visible )
|
||||
{
|
||||
QgsLayerTreeGroup *layerGroup = group->addGroup( name );
|
||||
QgsDebugMsg( QString( " %1" ).arg( name ) ) ;
|
||||
|
@ -44,8 +44,8 @@ class QgsDwgImportDialog : public QDialog, private Ui::QgsDwgImportBase
|
||||
void showHelp();
|
||||
|
||||
private:
|
||||
QgsVectorLayer *layer( QgsLayerTreeGroup *layerGroup, QString layer, QString table );
|
||||
void createGroup( QgsLayerTreeGroup *group, QString name, QStringList layers, bool visible );
|
||||
QgsVectorLayer *layer( QgsLayerTreeGroup *layerGroup, const QString &layer, const QString &table );
|
||||
void createGroup( QgsLayerTreeGroup *group, const QString &name, const QStringList &layers, bool visible );
|
||||
void updateUI();
|
||||
void expandInserts();
|
||||
void updateCheckState( Qt::CheckState state );
|
||||
|
@ -75,7 +75,7 @@ QgsDwgImporter::QgsDwgImporter( const QString &database, const QgsCoordinateRefe
|
||||
QgsDebugMsg( QString( "CRS %1[%2]: %3" ).arg( mCrs ).arg( ( qint64 ) mCrsH, 0, 16 ).arg( crswkt ) );
|
||||
}
|
||||
|
||||
bool QgsDwgImporter::exec( QString sql, bool logError )
|
||||
bool QgsDwgImporter::exec( const QString &sql, bool logError )
|
||||
{
|
||||
if ( !mDs )
|
||||
{
|
||||
@ -104,7 +104,7 @@ bool QgsDwgImporter::exec( QString sql, bool logError )
|
||||
return false;
|
||||
}
|
||||
|
||||
OGRLayerH QgsDwgImporter::query( QString sql )
|
||||
OGRLayerH QgsDwgImporter::query( const QString &sql )
|
||||
{
|
||||
if ( !mDs )
|
||||
{
|
||||
@ -259,7 +259,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
|
||||
|
||||
struct field
|
||||
{
|
||||
field( QString name, OGRFieldType ogrType, int width = -1, int precision = -1 )
|
||||
field( const QString &name, OGRFieldType ogrType, int width = -1, int precision = -1 )
|
||||
: mName( name ), mOgrType( ogrType ), mWidth( width ), mPrecision( precision )
|
||||
{}
|
||||
|
||||
@ -271,7 +271,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
|
||||
|
||||
struct table
|
||||
{
|
||||
table( QString name, QString desc, OGRwkbGeometryType wkbType, QList<field> fields )
|
||||
table( const QString &name, const QString &desc, OGRwkbGeometryType wkbType, const QList<field> &fields )
|
||||
: mName( name ), mDescription( desc ), mWkbType( wkbType ), mFields( fields )
|
||||
{}
|
||||
|
||||
@ -931,7 +931,7 @@ void QgsDwgImporter::addLayer( const DRW_Layer &data )
|
||||
OGR_F_Destroy( f );
|
||||
}
|
||||
|
||||
void QgsDwgImporter::setString( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, const std::string &value ) const
|
||||
void QgsDwgImporter::setString( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, const std::string &value ) const
|
||||
{
|
||||
int idx = OGR_FD_GetFieldIndex( dfn, field.toLower().toUtf8().constData() );
|
||||
if ( idx < 0 )
|
||||
@ -942,7 +942,7 @@ void QgsDwgImporter::setString( OGRFeatureDefnH dfn, OGRFeatureH f, QString fiel
|
||||
OGR_F_SetFieldString( f, idx, value.c_str() );
|
||||
}
|
||||
|
||||
void QgsDwgImporter::setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, double value ) const
|
||||
void QgsDwgImporter::setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, double value ) const
|
||||
{
|
||||
int idx = OGR_FD_GetFieldIndex( dfn, field.toLower().toUtf8().constData() );
|
||||
if ( idx < 0 )
|
||||
@ -953,7 +953,7 @@ void QgsDwgImporter::setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, QString fiel
|
||||
OGR_F_SetFieldDouble( f, idx, value );
|
||||
}
|
||||
|
||||
void QgsDwgImporter::setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, int value ) const
|
||||
void QgsDwgImporter::setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, int value ) const
|
||||
{
|
||||
int idx = OGR_FD_GetFieldIndex( dfn, field.toLower().toUtf8().constData() );
|
||||
if ( idx < 0 )
|
||||
@ -964,7 +964,7 @@ void QgsDwgImporter::setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, QString fie
|
||||
OGR_F_SetFieldInteger( f, idx, value );
|
||||
}
|
||||
|
||||
void QgsDwgImporter::setPoint( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, const DRW_Coord &p ) const
|
||||
void QgsDwgImporter::setPoint( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, const DRW_Coord &p ) const
|
||||
{
|
||||
QVector<double> ext( 3 );
|
||||
ext[0] = p.x;
|
||||
|
@ -168,17 +168,17 @@ class QgsDwgImporter : public DRW_Interface
|
||||
private:
|
||||
void startTransaction();
|
||||
void commitTransaction();
|
||||
bool exec( QString sql, bool logError = true );
|
||||
OGRLayerH query( QString sql );
|
||||
bool exec( const QString &sql, bool logError = true );
|
||||
OGRLayerH query( const QString &sql );
|
||||
|
||||
void addEntity( OGRFeatureDefnH dfn, OGRFeatureH f, const DRW_Entity &data );
|
||||
QString colorString( int color, int color24, int transparency, const std::string &layer ) const;
|
||||
double lineWidth( int lWeight, const std::string &layer ) const;
|
||||
QString linetypeString( const std::string &linetype, const std::string &layer ) const;
|
||||
void setString( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, const std::string &value ) const;
|
||||
void setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, double value ) const;
|
||||
void setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, int value ) const;
|
||||
void setPoint( OGRFeatureDefnH dfn, OGRFeatureH f, QString field, const DRW_Coord &value ) const;
|
||||
void setString( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, const std::string &value ) const;
|
||||
void setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, double value ) const;
|
||||
void setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, int value ) const;
|
||||
void setPoint( OGRFeatureDefnH dfn, OGRFeatureH f, const QString &field, const DRW_Coord &value ) const;
|
||||
|
||||
bool curveFromLWPolyline( const DRW_LWPolyline &data, QgsCompoundCurve &cc );
|
||||
|
||||
|
@ -1784,7 +1784,7 @@ void QgsNodeTool::CircularBand::updateRubberBand( const QgsPointXY &mapPoint )
|
||||
}
|
||||
|
||||
|
||||
void QgsNodeTool::validationErrorFound( QgsGeometry::Error e )
|
||||
void QgsNodeTool::validationErrorFound( const QgsGeometry::Error &e )
|
||||
{
|
||||
QgsGeometryValidator *validator = qobject_cast<QgsGeometryValidator *>( sender() );
|
||||
if ( !validator )
|
||||
|
@ -90,7 +90,7 @@ class APP_EXPORT QgsNodeTool : public QgsMapToolAdvancedDigitizing
|
||||
|
||||
void deleteNodeEditorSelection();
|
||||
|
||||
void validationErrorFound( QgsGeometry::Error e );
|
||||
void validationErrorFound( const QgsGeometry::Error &e );
|
||||
|
||||
void validationFinished();
|
||||
|
||||
|
@ -603,7 +603,7 @@ static bool cmpByText_( QAction *a, QAction *b )
|
||||
QgisApp *QgisApp::sInstance = nullptr;
|
||||
|
||||
// constructor starts here
|
||||
QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCheck, const QString rootProfileLocation, const QString activeProfile, QWidget *parent, Qt::WindowFlags fl )
|
||||
QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCheck, const QString &rootProfileLocation, const QString &activeProfile, QWidget *parent, Qt::WindowFlags fl )
|
||||
: QMainWindow( parent, fl )
|
||||
, mSplash( splash )
|
||||
, mShowProjectionTab( false )
|
||||
@ -1505,7 +1505,7 @@ bool QgisApp::event( QEvent *event )
|
||||
return done;
|
||||
}
|
||||
|
||||
void QgisApp::dataSourceManager( QString pageName )
|
||||
void QgisApp::dataSourceManager( const QString &pageName )
|
||||
{
|
||||
if ( ! mDataSourceManagerDialog )
|
||||
{
|
||||
@ -11768,7 +11768,7 @@ void QgisApp::endProfile()
|
||||
QgsApplication::profiler()->end();
|
||||
}
|
||||
|
||||
void QgisApp::functionProfile( void ( QgisApp::*fnc )(), QgisApp *instance, QString name )
|
||||
void QgisApp::functionProfile( void ( QgisApp::*fnc )(), QgisApp *instance, const QString &name )
|
||||
{
|
||||
startProfile( name );
|
||||
( instance->*fnc )();
|
||||
@ -12484,7 +12484,7 @@ QMenu *QgisApp::createPopupMenu()
|
||||
}
|
||||
|
||||
|
||||
void QgisApp::showSystemNotification( const QString title, const QString message )
|
||||
void QgisApp::showSystemNotification( const QString &title, const QString &message )
|
||||
{
|
||||
// Menubar icon is hidden by default. Show to enable notification bubbles
|
||||
mTray->show();
|
||||
|
@ -165,8 +165,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
public:
|
||||
//! Constructor
|
||||
QgisApp( QSplashScreen *splash, bool restorePlugins = true,
|
||||
bool skipVersionCheck = false, const QString rootProfileLocation = QString(),
|
||||
const QString activeProfile = QString(),
|
||||
bool skipVersionCheck = false, const QString &rootProfileLocation = QString(),
|
||||
const QString &activeProfile = QString(),
|
||||
QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::Window );
|
||||
//! Constructor for unit tests
|
||||
QgisApp();
|
||||
@ -377,7 +377,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
* \param title
|
||||
* \param message
|
||||
*/
|
||||
void showSystemNotification( const QString title, const QString message );
|
||||
void showSystemNotification( const QString &title, const QString &message );
|
||||
|
||||
|
||||
//! Actions to be inserted in menus and toolbars
|
||||
@ -793,7 +793,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
* \param pageName the page name, usually the provider name or "browser" (for the browser panel)
|
||||
* or "ogr" (vector layers) or "raster" (raster layers)
|
||||
*/
|
||||
void dataSourceManager( QString pageName = QString() );
|
||||
void dataSourceManager( const QString &pageName = QString() );
|
||||
|
||||
/** Add a raster layer directly without prompting user for location
|
||||
The caller must provide information compatible with the provider plugin
|
||||
@ -1599,7 +1599,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
private:
|
||||
void startProfile( const QString &name );
|
||||
void endProfile();
|
||||
void functionProfile( void ( QgisApp::*fnc )(), QgisApp *instance, QString name );
|
||||
void functionProfile( void ( QgisApp::*fnc )(), QgisApp *instance, const QString &name );
|
||||
|
||||
/** This method will open a dialog so the user can select GDAL sublayers to load
|
||||
* \returns true if any items were loaded
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QImageWriter>
|
||||
|
||||
QgsAttributeActionPropertiesDialog::QgsAttributeActionPropertiesDialog( QgsAction::ActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, QSet<QString> actionScopes, QgsVectorLayer *layer, QWidget *parent )
|
||||
QgsAttributeActionPropertiesDialog::QgsAttributeActionPropertiesDialog( QgsAction::ActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, const QSet<QString> &actionScopes, QgsVectorLayer *layer, QWidget *parent )
|
||||
: QDialog( parent )
|
||||
, mLayer( layer )
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ class QgsAttributeActionPropertiesDialog: public QDialog, private Ui::QgsAttribu
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsAttributeActionPropertiesDialog( QgsAction::ActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, QSet<QString> actionScopes, QgsVectorLayer *layer, QWidget *parent = nullptr );
|
||||
QgsAttributeActionPropertiesDialog( QgsAction::ActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, const QSet<QString> &actionScopes, QgsVectorLayer *layer, QWidget *parent = nullptr );
|
||||
|
||||
QgsAttributeActionPropertiesDialog( QgsVectorLayer *layer, QWidget *parent = nullptr );
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
Q_GUI_EXPORT extern int qt_defaultDpiX();
|
||||
|
||||
QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, QList< QgsDecorationItem * > decorations, QList< QgsAnnotation *> annotations, DialogType type )
|
||||
QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, const QList<QgsDecorationItem *> &decorations, const QList< QgsAnnotation *> &annotations, DialogType type )
|
||||
: QDialog( parent )
|
||||
, mDialogType( type )
|
||||
, mMapCanvas( mapCanvas )
|
||||
|
@ -48,8 +48,8 @@ class APP_EXPORT QgsMapSaveDialog: public QDialog, private Ui::QgsMapSaveDialog
|
||||
/** Constructor for QgsMapSaveDialog
|
||||
*/
|
||||
QgsMapSaveDialog( QWidget *parent = nullptr, QgsMapCanvas *mapCanvas = nullptr,
|
||||
QList< QgsDecorationItem * > decorations = QList< QgsDecorationItem * >(),
|
||||
QList< QgsAnnotation *> annotations = QList< QgsAnnotation * >(),
|
||||
const QList< QgsDecorationItem * > &decorations = QList< QgsDecorationItem * >(),
|
||||
const QList<QgsAnnotation *> &annotations = QList< QgsAnnotation * >(),
|
||||
DialogType type = Image );
|
||||
|
||||
//! returns extent rectangle
|
||||
|
@ -131,8 +131,8 @@ QgsStaticExpressionFunction::QgsStaticExpressionFunction( const QString &fnname,
|
||||
FcnEval fcn,
|
||||
const QString &group,
|
||||
const QString &helpText,
|
||||
std::function < bool ( const QgsExpressionNodeFunction *node ) > usesGeometry,
|
||||
std::function < QSet<QString>( const QgsExpressionNodeFunction *node ) > referencedColumns,
|
||||
const std::function < bool ( const QgsExpressionNodeFunction *node ) > &usesGeometry,
|
||||
const std::function < QSet<QString>( const QgsExpressionNodeFunction *node ) > &referencedColumns,
|
||||
bool lazyEval,
|
||||
const QStringList &aliases,
|
||||
bool handlesNull )
|
||||
@ -182,7 +182,7 @@ bool QgsStaticExpressionFunction::prepare( const QgsExpressionNodeFunction *node
|
||||
return true;
|
||||
}
|
||||
|
||||
void QgsStaticExpressionFunction::setIsStaticFunction( std::function<bool ( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * )> isStatic )
|
||||
void QgsStaticExpressionFunction::setIsStaticFunction( const std::function<bool ( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * )> &isStatic )
|
||||
{
|
||||
mIsStaticFunc = isStatic;
|
||||
}
|
||||
@ -193,7 +193,7 @@ void QgsStaticExpressionFunction::setIsStatic( bool isStatic )
|
||||
mIsStatic = isStatic;
|
||||
}
|
||||
|
||||
void QgsStaticExpressionFunction::setPrepareFunction( std::function<bool ( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * )> prepareFunc )
|
||||
void QgsStaticExpressionFunction::setPrepareFunction( const std::function<bool ( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * )> &prepareFunc )
|
||||
{
|
||||
mPrepareFunc = prepareFunc;
|
||||
}
|
||||
|
@ -369,8 +369,8 @@ class QgsStaticExpressionFunction : public QgsExpressionFunction
|
||||
FcnEval fcn,
|
||||
const QString &group,
|
||||
const QString &helpText,
|
||||
std::function < bool ( const QgsExpressionNodeFunction *node ) > usesGeometry,
|
||||
std::function < QSet<QString>( const QgsExpressionNodeFunction *node ) > referencedColumns,
|
||||
const std::function< bool( const QgsExpressionNodeFunction * )> &usesGeometry,
|
||||
const std::function< QSet<QString>( const QgsExpressionNodeFunction * )> &referencedColumns,
|
||||
bool lazyEval = false,
|
||||
const QStringList &aliases = QStringList(),
|
||||
bool handlesNull = false );
|
||||
@ -423,7 +423,7 @@ class QgsStaticExpressionFunction : public QgsExpressionFunction
|
||||
* By default this is set to a function that checks all arguments that have been passed to the variable
|
||||
* and if all of them are static, it will be assumed that the function is static as well.
|
||||
*/
|
||||
void setIsStaticFunction( std::function < bool( const QgsExpressionNodeFunction *node, QgsExpression *parent, const QgsExpressionContext *context ) > isStatic );
|
||||
void setIsStaticFunction( const std::function< bool ( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * ) > &isStatic );
|
||||
|
||||
/**
|
||||
* Tag this function as either static or not static.
|
||||
@ -440,7 +440,7 @@ class QgsStaticExpressionFunction : public QgsExpressionFunction
|
||||
* By default this is set to a function that checks all arguments that have been passed to the variable
|
||||
* and if all of them are static, it will be assumed that the function is static as well.
|
||||
*/
|
||||
void setPrepareFunction( std::function < bool( const QgsExpressionNodeFunction *node, QgsExpression *parent, const QgsExpressionContext *context ) > prepareFunc );
|
||||
void setPrepareFunction( const std::function< bool( const QgsExpressionNodeFunction *, QgsExpression *, const QgsExpressionContext * )> &prepareFunc );
|
||||
|
||||
static const QList<QgsExpressionFunction *> &functions();
|
||||
|
||||
|
@ -223,7 +223,7 @@ bool QgsGeometryEditUtils::deletePart( QgsAbstractGeometry *geom, int partNum )
|
||||
|
||||
std::unique_ptr<QgsAbstractGeometry> QgsGeometryEditUtils::avoidIntersections( const QgsAbstractGeometry &geom,
|
||||
const QList<QgsVectorLayer *> &avoidIntersectionsLayers,
|
||||
QHash<QgsVectorLayer *, QSet<QgsFeatureId> > ignoreFeatures )
|
||||
const QHash<QgsVectorLayer *, QSet<QgsFeatureId> > &ignoreFeatures )
|
||||
{
|
||||
std::unique_ptr<QgsGeometryEngine> geomEngine( QgsGeometry::createGeometryEngine( &geom ) );
|
||||
if ( !geomEngine )
|
||||
|
@ -72,7 +72,7 @@ class QgsGeometryEditUtils
|
||||
*/
|
||||
static std::unique_ptr< QgsAbstractGeometry > avoidIntersections( const QgsAbstractGeometry &geom,
|
||||
const QList<QgsVectorLayer *> &avoidIntersectionsLayers,
|
||||
QHash<QgsVectorLayer *, QSet<QgsFeatureId> > ignoreFeatures = ( QHash<QgsVectorLayer *, QSet<QgsFeatureId> >() ) );
|
||||
const QHash<QgsVectorLayer *, QSet<QgsFeatureId> > &ignoreFeatures = ( QHash<QgsVectorLayer *, QSet<QgsFeatureId> >() ) );
|
||||
};
|
||||
|
||||
#endif // QGSGEOMETRYEDITUTILS_H
|
||||
|
@ -249,7 +249,7 @@ QgsDissolveAlgorithm *QgsDissolveAlgorithm::createInstance() const
|
||||
}
|
||||
|
||||
QVariantMap QgsCollectorAlgorithm::processCollection( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback,
|
||||
std::function<QgsGeometry( const QList< QgsGeometry >& )> collector, int maxQueueLength )
|
||||
const std::function<QgsGeometry( const QList< QgsGeometry >& )> &collector, int maxQueueLength )
|
||||
{
|
||||
std::unique_ptr< QgsFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
|
||||
if ( !source )
|
||||
@ -1399,7 +1399,7 @@ QVariantMap QgsSelectByLocationAlgorithm::processAlgorithm( const QVariantMap &p
|
||||
void QgsLocationBasedAlgorithm::process( QgsFeatureSource *targetSource,
|
||||
QgsFeatureSource *intersectSource,
|
||||
const QList< int > &selectedPredicates,
|
||||
std::function < void( const QgsFeature & ) > handleFeatureFunction,
|
||||
const std::function < void( const QgsFeature & ) > &handleFeatureFunction,
|
||||
bool onlyRequireTargetIds,
|
||||
QgsFeedback *feedback )
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ class QgsCollectorAlgorithm : public QgsProcessingAlgorithm
|
||||
protected:
|
||||
|
||||
QVariantMap processCollection( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback,
|
||||
std::function<QgsGeometry( const QList< QgsGeometry >& )> collector, int maxQueueLength = 0 );
|
||||
const std::function<QgsGeometry( const QList<QgsGeometry>& )> &collector, int maxQueueLength = 0 );
|
||||
};
|
||||
|
||||
/**
|
||||
@ -505,7 +505,7 @@ class QgsLocationBasedAlgorithm : public QgsProcessingAlgorithm
|
||||
|
||||
Predicate reversePredicate( Predicate predicate ) const;
|
||||
QStringList predicateOptionsList() const;
|
||||
void process( QgsFeatureSource *targetSource, QgsFeatureSource *intersectSource, const QList<int> &selectedPredicates, std::function<void ( const QgsFeature & )> handleFeatureFunction, bool onlyRequireTargetIds, QgsFeedback *feedback );
|
||||
void process( QgsFeatureSource *targetSource, QgsFeatureSource *intersectSource, const QList<int> &selectedPredicates, const std::function< void( const QgsFeature & )> &handleFeatureFunction, bool onlyRequireTargetIds, QgsFeedback *feedback );
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -114,7 +114,7 @@ QgsFeatureRequest &QgsFeatureRequest::setInvalidGeometryCheck( QgsFeatureRequest
|
||||
return *this;
|
||||
}
|
||||
|
||||
QgsFeatureRequest &QgsFeatureRequest::setInvalidGeometryCallback( std::function<void ( const QgsFeature & )> callback )
|
||||
QgsFeatureRequest &QgsFeatureRequest::setInvalidGeometryCallback( const std::function<void ( const QgsFeature & )> &callback )
|
||||
{
|
||||
mInvalidGeometryCallback = callback;
|
||||
return *this;
|
||||
@ -248,7 +248,7 @@ QgsFeatureRequest &QgsFeatureRequest::setDestinationCrs( const QgsCoordinateRefe
|
||||
return *this;
|
||||
}
|
||||
|
||||
QgsFeatureRequest &QgsFeatureRequest::setTransformErrorCallback( std::function<void ( const QgsFeature & )> callback )
|
||||
QgsFeatureRequest &QgsFeatureRequest::setTransformErrorCallback( const std::function<void ( const QgsFeature & )> &callback )
|
||||
{
|
||||
mTransformErrorCallback = callback;
|
||||
return *this;
|
||||
|
@ -352,7 +352,7 @@ class CORE_EXPORT QgsFeatureRequest
|
||||
* \see invalidGeometryCallback()
|
||||
*/
|
||||
#ifndef SIP_RUN
|
||||
QgsFeatureRequest &setInvalidGeometryCallback( std::function< void( const QgsFeature & ) > callback );
|
||||
QgsFeatureRequest &setInvalidGeometryCallback( const std::function< void( const QgsFeature & )> &callback );
|
||||
#else
|
||||
QgsFeatureRequest &setInvalidGeometryCallback( SIP_PYCALLABLE / AllowNone / );
|
||||
% MethodCode
|
||||
@ -545,7 +545,7 @@ class CORE_EXPORT QgsFeatureRequest
|
||||
* \see setDestinationCrs()
|
||||
*/
|
||||
#ifndef SIP_RUN
|
||||
QgsFeatureRequest &setTransformErrorCallback( std::function< void( const QgsFeature & ) > callback );
|
||||
QgsFeatureRequest &setTransformErrorCallback( const std::function< void( const QgsFeature & )> &callback );
|
||||
#else
|
||||
QgsFeatureRequest &setTransformErrorCallback( SIP_PYCALLABLE / AllowNone / );
|
||||
% MethodCode
|
||||
|
@ -287,7 +287,7 @@ QString QgsJsonUtils::encodeValue( const QVariant &value )
|
||||
}
|
||||
}
|
||||
|
||||
QString QgsJsonUtils::exportAttributes( const QgsFeature &feature, QgsVectorLayer *layer, QVector<QVariant> attributeWidgetCaches )
|
||||
QString QgsJsonUtils::exportAttributes( const QgsFeature &feature, QgsVectorLayer *layer, const QVector<QVariant> &attributeWidgetCaches )
|
||||
{
|
||||
QgsFields fields = feature.fields();
|
||||
QString attrs;
|
||||
|
@ -246,7 +246,7 @@ class CORE_EXPORT QgsJsonUtils
|
||||
* to speed up exporting the attributes for multiple features from the same layer.
|
||||
*/
|
||||
static QString exportAttributes( const QgsFeature &feature, QgsVectorLayer *layer = nullptr,
|
||||
QVector<QVariant> attributeWidgetCaches = QVector<QVariant>() );
|
||||
const QVector<QVariant> &attributeWidgetCaches = QVector<QVariant>() );
|
||||
|
||||
/** Parse a simple array (depth=1).
|
||||
* \param json the JSON to parse
|
||||
|
@ -51,7 +51,7 @@ void QgsMapRendererTask::addAnnotations( QList< QgsAnnotation * > annotations )
|
||||
}
|
||||
}
|
||||
|
||||
void QgsMapRendererTask::addDecorations( QList< QgsMapDecoration * > decorations )
|
||||
void QgsMapRendererTask::addDecorations( const QList< QgsMapDecoration * > &decorations )
|
||||
{
|
||||
mDecorations = decorations;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class CORE_EXPORT QgsMapRendererTask : public QgsTask
|
||||
/**
|
||||
* Adds \a decorations to be rendered on the map.
|
||||
*/
|
||||
void addDecorations( QList< QgsMapDecoration * > decorations );
|
||||
void addDecorations( const QList<QgsMapDecoration *> &decorations );
|
||||
|
||||
/**
|
||||
* Sets whether a world file will be created alongside an image file.
|
||||
|
@ -28,7 +28,7 @@ QgsProviderMetadata::QgsProviderMetadata( QString const &_key,
|
||||
, library_( _library )
|
||||
{}
|
||||
|
||||
QgsProviderMetadata::QgsProviderMetadata( const QString &key, const QString &description, QgsProviderMetadata::CreateDataProviderFunction createFunc )
|
||||
QgsProviderMetadata::QgsProviderMetadata( const QString &key, const QString &description, const CreateDataProviderFunction &createFunc )
|
||||
: key_( key )
|
||||
, description_( description )
|
||||
, mCreateFunc( createFunc )
|
||||
|
@ -61,7 +61,7 @@ class CORE_EXPORT QgsProviderMetadata
|
||||
* \since QGIS 3.0
|
||||
* \note not available in Python bindings
|
||||
*/
|
||||
SIP_SKIP QgsProviderMetadata( const QString &key, const QString &description, QgsProviderMetadata::CreateDataProviderFunction createFunc );
|
||||
SIP_SKIP QgsProviderMetadata( const QString &key, const QString &description, const QgsProviderMetadata::CreateDataProviderFunction &createFunc );
|
||||
|
||||
/** This returns the unique key associated with the provider
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
QString QgsSettings::sGlobalSettingsPath = QString();
|
||||
|
||||
bool QgsSettings::setGlobalSettingsPath( QString path )
|
||||
bool QgsSettings::setGlobalSettingsPath( const QString &path )
|
||||
{
|
||||
if ( QFileInfo::exists( path ) )
|
||||
{
|
||||
@ -279,7 +279,7 @@ void QgsSettings::setValue( const QString &key, const QVariant &value, const Qgs
|
||||
}
|
||||
|
||||
// To lower case and clean the path
|
||||
QString QgsSettings::sanitizeKey( QString key ) const
|
||||
QString QgsSettings::sanitizeKey( const QString &key ) const
|
||||
{
|
||||
return QDir::cleanPath( key );
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ class CORE_EXPORT QgsSettings : public QObject
|
||||
//! Return the path to the Global Settings QSettings storage file
|
||||
static QString globalSettingsPath() { return sGlobalSettingsPath; }
|
||||
//! Set the Global Settings QSettings storage file
|
||||
static bool setGlobalSettingsPath( QString path );
|
||||
static bool setGlobalSettingsPath( const QString &path );
|
||||
//! Adds prefix to the current group and starts reading from an array. Returns the size of the array.
|
||||
int beginReadArray( const QString &prefix );
|
||||
|
||||
@ -229,7 +229,7 @@ class CORE_EXPORT QgsSettings : public QObject
|
||||
|
||||
static QString sGlobalSettingsPath;
|
||||
void init();
|
||||
QString sanitizeKey( QString key ) const;
|
||||
QString sanitizeKey( const QString &key ) const;
|
||||
QSettings *mUserSettings = nullptr;
|
||||
QSettings *mGlobalSettings = nullptr;
|
||||
bool mUsingGlobalArray = false;
|
||||
|
@ -78,7 +78,7 @@ QgsDataSourceManagerDialog::~QgsDataSourceManagerDialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void QgsDataSourceManagerDialog::openPage( QString pageName )
|
||||
void QgsDataSourceManagerDialog::openPage( const QString &pageName )
|
||||
{
|
||||
int pageIdx = mPageNames.indexOf( pageName );
|
||||
if ( pageIdx != -1 )
|
||||
@ -122,7 +122,7 @@ void QgsDataSourceManagerDialog::vectorLayersAdded( const QStringList &layerQStr
|
||||
}
|
||||
|
||||
|
||||
void QgsDataSourceManagerDialog::addProviderDialog( QgsAbstractDataSourceWidget *dlg, const QString &providerKey, const QString &providerName, const QIcon &icon, QString toolTip )
|
||||
void QgsDataSourceManagerDialog::addProviderDialog( QgsAbstractDataSourceWidget *dlg, const QString &providerKey, const QString &providerName, const QIcon &icon, const QString &toolTip )
|
||||
{
|
||||
mPageNames.append( providerKey );
|
||||
ui->mOptionsStackedWidget->addWidget( dlg );
|
||||
|
@ -60,7 +60,7 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
|
||||
* \param pageName the page name, usually the provider name or "browser" (for the browser panel)
|
||||
* or "ogr" (vector layers) or "raster" (raster layers)
|
||||
*/
|
||||
void openPage( QString pageName );
|
||||
void openPage( const QString &pageName );
|
||||
|
||||
public slots:
|
||||
|
||||
@ -114,7 +114,7 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
|
||||
void providerDialogsRefreshRequested();
|
||||
|
||||
private:
|
||||
void addProviderDialog( QgsAbstractDataSourceWidget *dlg, const QString &providerKey, const QString &providerName, const QIcon &icon, QString toolTip = QString() );
|
||||
void addProviderDialog( QgsAbstractDataSourceWidget *dlg, const QString &providerKey, const QString &providerName, const QIcon &icon, const QString &toolTip = QString() );
|
||||
void makeConnections( QgsAbstractDataSourceWidget *dlg, const QString &providerKey );
|
||||
Ui::QgsDataSourceManagerDialog *ui;
|
||||
QgsBrowserDockWidget *mBrowserWidget = nullptr;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <QSslError>
|
||||
#endif
|
||||
|
||||
QgsFileDownloader::QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool enableGuiNotifications, QString authcfg )
|
||||
QgsFileDownloader::QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool enableGuiNotifications, const QString &authcfg )
|
||||
: mUrl( url )
|
||||
, mDownloadCanceled( false )
|
||||
, mGuiNotificationsEnabled( enableGuiNotifications )
|
||||
|
@ -53,7 +53,7 @@ class GUI_EXPORT QgsFileDownloader : public QObject
|
||||
* \param guiNotificationsEnabled if false, the downloader will not display any progress bar or error message
|
||||
* \param authcfg optionally apply this authentication configuration
|
||||
*/
|
||||
QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool guiNotificationsEnabled = true, QString authcfg = QString() );
|
||||
QgsFileDownloader( const QUrl &url, const QString &outputFileName, bool guiNotificationsEnabled = true, const QString &authcfg = QString() );
|
||||
|
||||
signals:
|
||||
//! Emitted when the download has completed successfully
|
||||
|
@ -24,7 +24,7 @@ void buildSupportedRasterFileFilterAndExtensions( QString &fileFiltersString, QS
|
||||
|
||||
|
||||
QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem *parent,
|
||||
QString name, QString path, QString uri,
|
||||
const QString &name, const QString &path, const QString &uri,
|
||||
QStringList *sublayers )
|
||||
: QgsLayerItem( parent, name, path, uri, QgsLayerItem::Raster, QStringLiteral( "gdal" ) )
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class QgsGdalLayerItem : public QgsLayerItem
|
||||
|
||||
public:
|
||||
QgsGdalLayerItem( QgsDataItem *parent,
|
||||
QString name, QString path, QString uri,
|
||||
const QString &name, const QString &path, const QString &uri,
|
||||
QStringList *mSublayers = nullptr );
|
||||
|
||||
bool setCrs( const QgsCoordinateReferenceSystem &crs ) override;
|
||||
|
@ -103,7 +103,7 @@ int CPL_STDCALL progressCallback( double dfComplete,
|
||||
return true;
|
||||
}
|
||||
|
||||
QgsGdalProvider::QgsGdalProvider( const QString &uri, QgsError error )
|
||||
QgsGdalProvider::QgsGdalProvider( const QString &uri, const QgsError &error )
|
||||
: QgsRasterDataProvider( uri )
|
||||
, mUpdate( false )
|
||||
, mValid( false )
|
||||
|
@ -69,7 +69,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
|
||||
QgsGdalProvider( QString const &uri = QString(), bool update = false );
|
||||
|
||||
//! Create invalid provider with error
|
||||
QgsGdalProvider( QString const &uri, QgsError error );
|
||||
QgsGdalProvider( QString const &uri, const QgsError &error );
|
||||
|
||||
|
||||
~QgsGdalProvider();
|
||||
|
@ -46,7 +46,7 @@ QgsDataItem *QgsGeoPackageDataItemProvider::createDataItem( const QString &path,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QgsGeoPackageRootItem::QgsGeoPackageRootItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsGeoPackageRootItem::QgsGeoPackageRootItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
mCapabilities |= Fast;
|
||||
@ -120,7 +120,7 @@ void QgsGeoPackageRootItem::createDatabase()
|
||||
#endif
|
||||
|
||||
|
||||
QgsGeoPackageConnectionItem::QgsGeoPackageConnectionItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsGeoPackageConnectionItem::QgsGeoPackageConnectionItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
, mPath( path )
|
||||
{
|
||||
@ -328,7 +328,7 @@ bool QgsGeoPackageConnectionItem::handleDrop( const QMimeData *data, Qt::DropAct
|
||||
}
|
||||
|
||||
|
||||
bool QgsGeoPackageConnectionItem::deleteGeoPackageRasterLayer( const QString uri, QString &errCause )
|
||||
bool QgsGeoPackageConnectionItem::deleteGeoPackageRasterLayer( const QString &uri, QString &errCause )
|
||||
{
|
||||
bool result = false;
|
||||
// Better safe than sorry
|
||||
@ -526,7 +526,7 @@ void QgsGeoPackageAbstractLayerItem::deleteLayer()
|
||||
|
||||
}
|
||||
|
||||
QgsGeoPackageAbstractLayerItem::QgsGeoPackageAbstractLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, QgsLayerItem::LayerType layerType, QString providerKey )
|
||||
QgsGeoPackageAbstractLayerItem::QgsGeoPackageAbstractLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, QgsLayerItem::LayerType layerType, const QString &providerKey )
|
||||
: QgsLayerItem( parent, name, path, uri, layerType, providerKey )
|
||||
{
|
||||
setState( Populated ); // no children are expected
|
||||
@ -539,14 +539,14 @@ bool QgsGeoPackageAbstractLayerItem::executeDeleteLayer( QString &errCause )
|
||||
}
|
||||
|
||||
|
||||
QgsGeoPackageVectorLayerItem::QgsGeoPackageVectorLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType )
|
||||
QgsGeoPackageVectorLayerItem::QgsGeoPackageVectorLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType )
|
||||
: QgsGeoPackageAbstractLayerItem( parent, name, path, uri, layerType, QStringLiteral( "ogr" ) )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
QgsGeoPackageRasterLayerItem::QgsGeoPackageRasterLayerItem( QgsDataItem *parent, QString name, QString path, QString uri )
|
||||
QgsGeoPackageRasterLayerItem::QgsGeoPackageRasterLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri )
|
||||
: QgsGeoPackageAbstractLayerItem( parent, name, path, uri, QgsLayerItem::LayerType::Raster, QStringLiteral( "gdal" ) )
|
||||
{
|
||||
|
||||
|
@ -28,7 +28,7 @@ class QgsGeoPackageAbstractLayerItem : public QgsLayerItem
|
||||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
QgsGeoPackageAbstractLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType, QString providerKey );
|
||||
QgsGeoPackageAbstractLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType, const QString &providerKey );
|
||||
|
||||
/** Subclasses need to implement this function with
|
||||
* the real deletion implementation
|
||||
@ -47,7 +47,7 @@ class QgsGeoPackageRasterLayerItem : public QgsGeoPackageAbstractLayerItem
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsGeoPackageRasterLayerItem( QgsDataItem *parent, QString name, QString path, QString uri );
|
||||
QgsGeoPackageRasterLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri );
|
||||
protected:
|
||||
virtual bool executeDeleteLayer( QString &errCause ) override;
|
||||
};
|
||||
@ -58,7 +58,7 @@ class QgsGeoPackageVectorLayerItem : public QgsGeoPackageAbstractLayerItem
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsGeoPackageVectorLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType );
|
||||
QgsGeoPackageVectorLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType );
|
||||
protected:
|
||||
virtual bool executeDeleteLayer( QString &errCause ) override;
|
||||
};
|
||||
@ -69,7 +69,7 @@ class QgsGeoPackageConnectionItem : public QgsDataCollectionItem
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsGeoPackageConnectionItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsGeoPackageConnectionItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
virtual bool equal( const QgsDataItem *other ) override;
|
||||
|
||||
@ -83,7 +83,7 @@ class QgsGeoPackageConnectionItem : public QgsDataCollectionItem
|
||||
static QgsLayerItem::LayerType layerTypeFromDb( const QString &geometryType );
|
||||
|
||||
//! Delete a geopackage layer
|
||||
static bool deleteGeoPackageRasterLayer( const QString uri, QString &errCause );
|
||||
static bool deleteGeoPackageRasterLayer( const QString &uri, QString &errCause );
|
||||
|
||||
public slots:
|
||||
#ifdef HAVE_GUI
|
||||
@ -102,7 +102,7 @@ class QgsGeoPackageRootItem : public QgsDataCollectionItem
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QgsGeoPackageRootItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsGeoPackageRootItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
QgsGeoPackageRasterWriter::QgsGeoPackageRasterWriter( const QgsMimeDataUtils::Uri sourceUri, const QString outputUrl ):
|
||||
QgsGeoPackageRasterWriter::QgsGeoPackageRasterWriter( const QgsMimeDataUtils::Uri &sourceUri, const QString &outputUrl ):
|
||||
mSourceUri( sourceUri ),
|
||||
mOutputUrl( outputUrl )
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ class QgsGeoPackageRasterWriter
|
||||
ErrUserCanceled, //!< User canceled the export
|
||||
};
|
||||
|
||||
QgsGeoPackageRasterWriter( const QgsMimeDataUtils::Uri sourceUri, const QString destinationPath );
|
||||
QgsGeoPackageRasterWriter( const QgsMimeDataUtils::Uri &sourceUri, const QString &destinationPath );
|
||||
WriterError writeRaster( QgsFeedback *feedback, QString *errorMessage );
|
||||
const QString outputUrl() const { return mOutputUrl; }
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
///@cond PRIVATE
|
||||
|
||||
|
||||
QgsGeoPackageRasterWriterTask::QgsGeoPackageRasterWriterTask( const QgsMimeDataUtils::Uri sourceUri, const QString destinationPath )
|
||||
QgsGeoPackageRasterWriterTask::QgsGeoPackageRasterWriterTask( const QgsMimeDataUtils::Uri &sourceUri, const QString &destinationPath )
|
||||
: QgsTask( tr( "Saving %1" ).arg( destinationPath ), QgsTask::CanCancel )
|
||||
, mWriter( sourceUri, destinationPath )
|
||||
, mFeedback( new QgsFeedback() )
|
||||
|
@ -45,7 +45,7 @@ class QgsGeoPackageRasterWriterTask : public QgsTask
|
||||
* Constructor for QgsVectorFileWriterTask. Takes a source \a layer, destination \a fileName
|
||||
* and save \a options.
|
||||
*/
|
||||
QgsGeoPackageRasterWriterTask( const QgsMimeDataUtils::Uri sourceUri, const QString destinationPath );
|
||||
QgsGeoPackageRasterWriterTask( const QgsMimeDataUtils::Uri &sourceUri, const QString &destinationPath );
|
||||
|
||||
virtual void cancel() override;
|
||||
|
||||
|
@ -43,7 +43,7 @@ QGISEXTERN bool deleteLayer( const QString &uri, const QString &errCause );
|
||||
|
||||
|
||||
QgsOgrLayerItem::QgsOgrLayerItem( QgsDataItem *parent,
|
||||
QString name, QString path, QString uri, LayerType layerType, bool isSubLayer )
|
||||
const QString &name, const QString &path, const QString &uri, LayerType layerType, bool isSubLayer )
|
||||
: QgsLayerItem( parent, name, path, uri, layerType, QStringLiteral( "ogr" ) )
|
||||
{
|
||||
mIsSubLayer = isSubLayer;
|
||||
@ -395,7 +395,7 @@ static QgsOgrLayerItem *dataItemForLayer( QgsDataItem *parentItem, QString name,
|
||||
|
||||
// ----
|
||||
|
||||
QgsOgrDataCollectionItem::QgsOgrDataCollectionItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsOgrDataCollectionItem::QgsOgrDataCollectionItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class QgsOgrLayerItem : public QgsLayerItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsOgrLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType, bool isSubLayer = false );
|
||||
QgsOgrLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType, bool isSubLayer = false );
|
||||
|
||||
bool setCrs( const QgsCoordinateReferenceSystem &crs ) override;
|
||||
|
||||
@ -81,7 +81,7 @@ class QgsOgrDataCollectionItem : public QgsDataCollectionItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsOgrDataCollectionItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsOgrDataCollectionItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
|
@ -39,7 +39,7 @@ QGISEXTERN bool deleteSchema( const QString &schema, const QgsDataSourceUri &uri
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
QgsPGConnectionItem::QgsPGConnectionItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsPGConnectionItem::QgsPGConnectionItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
mIconName = QStringLiteral( "mIconConnect.png" );
|
||||
@ -706,7 +706,7 @@ bool QgsPGSchemaItem::handleDrop( const QMimeData *data, Qt::DropAction )
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
QgsPGRootItem::QgsPGRootItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsPGRootItem::QgsPGRootItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
mCapabilities |= Fast;
|
||||
|
@ -32,7 +32,7 @@ class QgsPGRootItem : public QgsDataCollectionItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsPGRootItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsPGRootItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
@ -55,7 +55,7 @@ class QgsPGConnectionItem : public QgsDataCollectionItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsPGConnectionItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsPGConnectionItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
virtual bool equal( const QgsDataItem *other ) override;
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
QGISEXTERN bool deleteLayer( const QString &dbPath, const QString &tableName, QString &errCause );
|
||||
|
||||
QgsSLLayerItem::QgsSLLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType )
|
||||
QgsSLLayerItem::QgsSLLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType )
|
||||
: QgsLayerItem( parent, name, path, uri, layerType, QStringLiteral( "spatialite" ) )
|
||||
{
|
||||
setState( Populated ); // no children are expected
|
||||
@ -76,7 +76,7 @@ void QgsSLLayerItem::deleteLayer()
|
||||
|
||||
// ------
|
||||
|
||||
QgsSLConnectionItem::QgsSLConnectionItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsSLConnectionItem::QgsSLConnectionItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
mDbPath = QgsSpatiaLiteConnection::connectionPath( name );
|
||||
@ -275,7 +275,7 @@ bool QgsSLConnectionItem::handleDrop( const QMimeData *data, Qt::DropAction )
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
QgsSLRootItem::QgsSLRootItem( QgsDataItem *parent, QString name, QString path )
|
||||
QgsSLRootItem::QgsSLRootItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
{
|
||||
mCapabilities |= Fast;
|
||||
|
@ -21,7 +21,7 @@ class QgsSLLayerItem : public QgsLayerItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsSLLayerItem( QgsDataItem *parent, QString name, QString path, QString uri, LayerType layerType );
|
||||
QgsSLLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType );
|
||||
|
||||
#ifdef HAVE_GUI
|
||||
QList<QAction *> actions() override;
|
||||
@ -37,7 +37,7 @@ class QgsSLConnectionItem : public QgsDataCollectionItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsSLConnectionItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsSLConnectionItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
virtual bool equal( const QgsDataItem *other ) override;
|
||||
@ -63,7 +63,7 @@ class QgsSLRootItem : public QgsDataCollectionItem
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsSLRootItem( QgsDataItem *parent, QString name, QString path );
|
||||
QgsSLRootItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user