Skip to content

Commit

Permalink
Deprecate unused QgsAbstractDataSourceWidget progress report signal
Browse files Browse the repository at this point in the history
QgsProxyProgressTask should be used instead for progress reporting
  • Loading branch information
nyalldawson committed Aug 20, 2018
1 parent 6e9e0e8 commit c7845dd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
7 changes: 4 additions & 3 deletions python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in
Expand Up @@ -102,10 +102,11 @@ Emitted when a layer needs to be replaced
:param provider: key
%End


void progress( int, int );
void progress( int, int ) /Deprecated/;
%Docstring
Emitted when a progress dialog is shown by the provider dialog
Emitted when a progress dialog is shown by the provider dialog.

.. deprecated:: Since QGIS 3.4 this signal is no longer used. Use QgsProxyProgressTask instead to show progress reports.
%End

void progressMessage( QString message );
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -1798,7 +1798,6 @@ void QgisApp::dataSourceManager( const QString &pageName )
connect( mDataSourceManagerDialog, SIGNAL( addVectorLayers( QStringList const &, QString const &, QString const & ) ),
this, SLOT( addVectorLayers( QStringList const &, QString const &, QString const & ) ) );
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::addMeshLayer, this, &QgisApp::addMeshLayer );
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::showProgress, this, &QgisApp::showProgress );
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::showStatusMessage, this, &QgisApp::showStatusMessage );
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::addDatabaseLayers, this, &QgisApp::addDatabaseLayers );
connect( mDataSourceManagerDialog, &QgsDataSourceManagerDialog::replaceSelectedVectorLayer, this, &QgisApp::replaceSelectedVectorLayer );
Expand Down
9 changes: 6 additions & 3 deletions src/gui/qgsabstractdatasourcewidget.h
Expand Up @@ -112,9 +112,12 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
*/
void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );


//! Emitted when a progress dialog is shown by the provider dialog
void progress( int, int );
/**
* Emitted when a progress dialog is shown by the provider dialog.
*
* \deprecated Since QGIS 3.4 this signal is no longer used. Use QgsProxyProgressTask instead to show progress reports.
*/
Q_DECL_DEPRECATED void progress( int, int ) SIP_DEPRECATED;

//! Emitted when a progress dialog is shown by the provider dialog
void progressMessage( QString message );
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgsdatasourcemanagerdialog.cpp
Expand Up @@ -144,8 +144,6 @@ void QgsDataSourceManagerDialog::makeConnections( QgsAbstractDataSourceWidget *d
// DB
connect( dlg, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ) );
connect( dlg, SIGNAL( progress( int, int ) ),
this, SIGNAL( showProgress( int, int ) ) );
connect( dlg, SIGNAL( progressMessage( QString ) ),
this, SIGNAL( showStatusMessage( QString ) ) );
// Vector
Expand Down
3 changes: 1 addition & 2 deletions src/gui/qgsdatasourcemanagerdialog.h
Expand Up @@ -105,8 +105,7 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
void replaceSelectedVectorLayer( const QString &oldId, const QString &uri, const QString &layerName, const QString &provider );
//! Emitted when a one or more layer were selected for addition: for signal forwarding to QgisApp
void addVectorLayers( const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType );
//! Emitted when the dialog is busy: for signal forwarding to QgisApp
void showProgress( int progress, int totalSteps );

//! Emitted when a status message needs to be shown: for signal forwarding to QgisApp
void showStatusMessage( const QString &message );
//! Emitted when a DB layer was selected for addition: for signal forwarding to QgisApp
Expand Down

0 comments on commit c7845dd

Please sign in to comment.