From fa847d16ff27c843b99aa99e9c1b5733f41375b9 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 25 Jul 2019 13:55:31 +0200 Subject: [PATCH] Fix code style --- .../qgsabstractdatasourcewidget.sip.in | 2 +- src/gui/qgsabstractdatasourcewidget.h | 2 +- src/gui/qgsdatasourcemanagerdialog.h | 10 +++++++++- src/providers/postgres/qgspgsourceselect.cpp | 12 ++++++------ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in b/python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in index 9f336f53743..d7f45e17b5f 100644 --- a/python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in +++ b/python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in @@ -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. diff --git a/src/gui/qgsabstractdatasourcewidget.h b/src/gui/qgsabstractdatasourcewidget.h index 5b0c9a98eef..79f08b7dc21 100644 --- a/src/gui/qgsabstractdatasourcewidget.h +++ b/src/gui/qgsabstractdatasourcewidget.h @@ -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. * diff --git a/src/gui/qgsdatasourcemanagerdialog.h b/src/gui/qgsdatasourcemanagerdialog.h index 8df7d823578..2f014ea272c 100644 --- a/src/gui/qgsdatasourcemanagerdialog.h +++ b/src/gui/qgsdatasourcemanagerdialog.h @@ -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 @@ -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: diff --git a/src/providers/postgres/qgspgsourceselect.cpp b/src/providers/postgres/qgspgsourceselect.cpp index 4d7e95f40d6..5c3444047ac 100644 --- a/src/providers/postgres/qgspgsourceselect.cpp +++ b/src/providers/postgres/qgspgsourceselect.cpp @@ -58,12 +58,12 @@ QWidget *QgsPgSourceSelectDelegate::createEditor( QWidget *parent, const QStyleO { QComboBox *cb = new QComboBox( parent ); static const QList 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 );