Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 25, 2019
1 parent 66cbab0 commit fa847d1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
Expand Up @@ -54,7 +54,7 @@ being added.
%Docstring
Called when this source select widget is being shown in a "new and clean" dialog.

The data source manager recycles exisiting source select widgets but will call
The data source manager recycles existing source select widgets but will call
this method on every reopening.
This should clear any selection that has previously been done.

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsabstractdatasourcewidget.h
Expand Up @@ -70,7 +70,7 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
/**
* Called when this source select widget is being shown in a "new and clean" dialog.
*
* The data source manager recycles exisiting source select widgets but will call
* The data source manager recycles existing source select widgets but will call
* this method on every reopening.
* This should clear any selection that has previously been done.
*
Expand Down
10 changes: 9 additions & 1 deletion src/gui/qgsdatasourcemanagerdialog.h
Expand Up @@ -75,9 +75,10 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
//! Sync current page with the leftbar list
void setCurrentPage( int index );

// TODO: use this with an internal source select dialog instead of forwarding the whole raster selection to app

/**
* A raster layer was added: for signal forwarding to QgisApp
* TODO: use this with an internal source select dialog instead of forwarding the whole raster selection to app
*/
void rasterLayerAdded( QString const &uri, QString const &baseName, QString const &providerKey );
//! A vector layer was added: for signal forwarding to QgisApp
Expand All @@ -89,6 +90,13 @@ class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase, priva
//! Refresh the browser view
void refresh();

/**
* Resets the interface of the datasource manager after reopening the dialog.
*
* Will clear the selection of embedded all source selection widgets.
*
* \since QGIS 3.10
*/
void reset();

protected:
Expand Down
12 changes: 6 additions & 6 deletions src/providers/postgres/qgspgsourceselect.cpp
Expand Up @@ -58,12 +58,12 @@ QWidget *QgsPgSourceSelectDelegate::createEditor( QWidget *parent, const QStyleO
{
QComboBox *cb = new QComboBox( parent );
static const QList<QgsWkbTypes::Type> types { QgsWkbTypes::Point
, QgsWkbTypes::LineString
, QgsWkbTypes::Polygon
, QgsWkbTypes::MultiPoint
, QgsWkbTypes::MultiLineString
, QgsWkbTypes::MultiPolygon
, QgsWkbTypes::NoGeometry };
, QgsWkbTypes::LineString
, QgsWkbTypes::Polygon
, QgsWkbTypes::MultiPoint
, QgsWkbTypes::MultiLineString
, QgsWkbTypes::MultiPolygon
, QgsWkbTypes::NoGeometry };
for ( QgsWkbTypes::Type type : types )
{
cb->addItem( QgsPgTableModel::iconForWkbType( type ), QgsPostgresConn::displayStringForWkbType( type ), type );
Expand Down

0 comments on commit fa847d1

Please sign in to comment.