Skip to content

Commit

Permalink
Remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 6, 2017
1 parent 80d2240 commit 1033c7b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
1 change: 1 addition & 0 deletions doc/api_break.dox
Expand Up @@ -2166,6 +2166,7 @@ QgsVectorLayerImport {#qgis_api_break_3_0_QgsVectorLayerImport}
QgsCoordinateReferenceSystem is now implicitly shared, using references to QgsCoordinateReferenceSystem rather than
pointers makes for more robust, safer code. Use an invalid (default constructed) QgsCoordinateReferenceSystem
in code which previously passed a null pointer to QgsVectorLayerImport.
- The unused QProgressBar argument in the QgsVectorLayerImport was removed
- ErrUserCancelled (ImportError enum value) has been renamed to ErrUserCanceled <!--#spellok-->


Expand Down
5 changes: 1 addition & 4 deletions python/core/qgsvectorlayerimport.sip
Expand Up @@ -73,9 +73,7 @@ There are two possibilities how to use this class:
QgsWkbTypes::Type geometryType,
const QgsCoordinateReferenceSystem &crs,
bool overwrite = false,
const QMap<QString, QVariant> *options = 0,
QProgressDialog *progress = 0
);
const QMap<QString, QVariant> *options = 0 );
%Docstring
Constructor for QgsVectorLayerImport.
\param uri URI for destination data source
Expand All @@ -86,7 +84,6 @@ There are two possibilities how to use this class:
not available
\param overwrite set to true to overwrite any existing data source
\param options optional provider dataset options
\param progress optional progress dialog to show progress of export
%End


Expand Down
7 changes: 2 additions & 5 deletions src/core/qgsvectorlayerimport.cpp
Expand Up @@ -52,11 +52,9 @@ QgsVectorLayerImport::QgsVectorLayerImport( const QString &uri,
QgsWkbTypes::Type geometryType,
const QgsCoordinateReferenceSystem &crs,
bool overwrite,
const QMap<QString, QVariant> *options,
QProgressDialog *progress )
const QMap<QString, QVariant> *options )
: mErrorCount( 0 )
, mAttributeCount( -1 )
, mProgress( progress )

{
mProvider = nullptr;
Expand Down Expand Up @@ -308,7 +306,7 @@ QgsVectorLayerImport::importLayer( QgsVectorLayer *layer,
}

QgsVectorLayerImport *writer =
new QgsVectorLayerImport( uri, providerKey, fields, wkbType, outputCRS, overwrite, options, progress );
new QgsVectorLayerImport( uri, providerKey, fields, wkbType, outputCRS, overwrite, options );

// check whether file creation was successful
ImportError err = writer->hasError();
Expand All @@ -325,7 +323,6 @@ QgsVectorLayerImport::importLayer( QgsVectorLayer *layer,
errorMessage->clear();
}

QgsAttributeList allAttr = skipAttributeCreation ? QgsAttributeList() : layer->attributeList();
QgsFeature fet;

QgsFeatureRequest req;
Expand Down
6 changes: 1 addition & 5 deletions src/core/qgsvectorlayerimport.h
Expand Up @@ -90,17 +90,14 @@ class CORE_EXPORT QgsVectorLayerImport : public QgsFeatureSink
* not available
* \param overwrite set to true to overwrite any existing data source
* \param options optional provider dataset options
* \param progress optional progress dialog to show progress of export
*/
QgsVectorLayerImport( const QString &uri,
const QString &provider,
const QgsFields &fields,
QgsWkbTypes::Type geometryType,
const QgsCoordinateReferenceSystem &crs,
bool overwrite = false,
const QMap<QString, QVariant> *options = nullptr,
QProgressDialog *progress = nullptr
);
const QMap<QString, QVariant> *options = nullptr );

//! QgsVectorLayerImport cannot be copied
QgsVectorLayerImport( const QgsVectorLayerImport &rh ) = delete;
Expand Down Expand Up @@ -141,7 +138,6 @@ class CORE_EXPORT QgsVectorLayerImport : public QgsFeatureSink
int mAttributeCount;

QgsFeatureList mFeatureBuffer;
QProgressDialog *mProgress = nullptr;

#ifdef SIP_RUN
QgsVectorLayerImport( const QgsVectorLayerImport &rh );
Expand Down

0 comments on commit 1033c7b

Please sign in to comment.