Remove unused argument

This commit is contained in:
Nyall Dawson 2017-05-06 14:17:14 +10:00
parent 80d22406c9
commit 1033c7b3bd
4 changed files with 5 additions and 14 deletions

View File

@ -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-->

View File

@ -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
@ -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

View File

@ -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;
@ -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();
@ -325,7 +323,6 @@ QgsVectorLayerImport::importLayer( QgsVectorLayer *layer,
errorMessage->clear();
}
QgsAttributeList allAttr = skipAttributeCreation ? QgsAttributeList() : layer->attributeList();
QgsFeature fet;
QgsFeatureRequest req;

View File

@ -90,7 +90,6 @@ 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,
@ -98,9 +97,7 @@ class CORE_EXPORT QgsVectorLayerImport : public QgsFeatureSink
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;
@ -141,7 +138,6 @@ class CORE_EXPORT QgsVectorLayerImport : public QgsFeatureSink
int mAttributeCount;
QgsFeatureList mFeatureBuffer;
QProgressDialog *mProgress = nullptr;
#ifdef SIP_RUN
QgsVectorLayerImport( const QgsVectorLayerImport &rh );