Skip to content

Commit

Permalink
QgsGeoPackageImportTask -> QgsConcurrentFileWriterImportTask
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 19, 2017
1 parent 3fc2a49 commit 1f0e73a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsgeopackagedataitems.cpp
Expand Up @@ -193,7 +193,7 @@ bool QgsGeoPackageConnectionItem::handleDrop( const QMimeData *data, Qt::DropAct
bool hasError = false;

// Main task
std::unique_ptr< QgsGeoPackageImportTask > mainTask( new QgsGeoPackageImportTask( tr( "GeoPackage import" ) ) );
std::unique_ptr< QgsConcurrentFileWriterImportTask > mainTask( new QgsConcurrentFileWriterImportTask( tr( "GeoPackage import" ) ) );
QgsTaskList importTasks;

const auto lst = QgsMimeDataUtils::decodeUriList( data );
Expand Down
9 changes: 7 additions & 2 deletions src/providers/ogr/qgsgeopackagedataitems.h
Expand Up @@ -129,13 +129,18 @@ class QgsGeoPackageDataItemProvider : public QgsDataItemProvider
};


class QgsGeoPackageImportTask : public QgsTask
/**
* \brief The QgsConcurrentFileWriterImportTask class is the parent task for
* importing layers from a drag and drop operation in the browser.
* Individual layers need to be added as individual substask.
*/
class QgsConcurrentFileWriterImportTask : public QgsTask
{
Q_OBJECT

public:

QgsGeoPackageImportTask( const QString &desc = QString() ) : QgsTask( desc ) {}
QgsConcurrentFileWriterImportTask( const QString &desc = QString() ) : QgsTask( desc ) {}

void emitProgressChanged( double progress ) { setProgress( progress ); }

Expand Down

0 comments on commit 1f0e73a

Please sign in to comment.