Skip to content

Commit

Permalink
Rollback changes to app
Browse files Browse the repository at this point in the history
There's no need for a dedicated 'Add GeoNode layer' menu entry,
as the unified data source manager has been designed to replace
all these specific provider based actions.
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent 46b1e7d commit 8769369
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
15 changes: 0 additions & 15 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgsuserprofile.h"

#include "qgssublayersdialog.h"
#include "geonode/qgsgeonodesourceselect.h"
#include "ogr/qgsvectorlayersaveasdialog.h"

#include "qgsosmdownloaddialog.h"
Expand Down Expand Up @@ -1022,11 +1021,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
mActionInstallFromZip = nullptr;
}

// add geonode menu under web menu
addPluginToWebMenu( mGeonodeMenu->title(), mActionAddGeonodeLayer );
mActionAddGeonodeLayer = new QAction( tr( "Add GeoNode Layers..." ), this );
mGeonodeMenu->addAction( mActionAddGeonodeLayer );

// Set icon size of toolbars
if ( settings.contains( QStringLiteral( "IconSize" ) ) )
{
Expand Down Expand Up @@ -1795,8 +1789,6 @@ void QgisApp::createActions()
connect( mActionLabeling, &QAction::triggered, this, &QgisApp::labeling );
connect( mActionStatisticalSummary, &QAction::triggered, this, &QgisApp::showStatisticsDockWidget );

// Web Menu Items

// Layer Menu Items

connect( mActionDataSourceManager, &QAction::triggered, this, [ = ]() { dataSourceManager(); } );
Expand All @@ -1822,7 +1814,6 @@ void QgisApp::createActions()
connect( mActionAddAmsLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "arcgismapserver" ) ); } );
connect( mActionAddDelimitedText, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "delimitedtext" ) ); } );
connect( mActionAddVirtualLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "virtual" ) ); } );
connect( mActionAddGeonodeLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "geonode" ) ); } );
connect( mActionOpenTable, &QAction::triggered, this, &QgisApp::attributeTable );
connect( mActionOpenFieldCalc, &QAction::triggered, this, &QgisApp::fieldCalculator );
connect( mActionToggleEditing, &QAction::triggered, this, [ = ] { toggleEditing(); } );
Expand Down Expand Up @@ -2098,12 +2089,6 @@ void QgisApp::createMenus()
mToolbarMenu = new QMenu( tr( "Toolbars" ), this );
mToolbarMenu->setObjectName( QStringLiteral( "mToolbarMenu" ) );

// Geonode Submenu
mGeonodeMenu = new QMenu( tr( "GeoNode" ), this );
mGeonodeMenu->setObjectName( QStringLiteral( "mGeonodeMenu" ) );
// Geonode Action
mActionAddGeonodeLayer = new QAction( tr( "Add GeoNode Layers..." ), this );

// Get platform for menu layout customization (Gnome, Kde, Mac, Win)
QDialogButtonBox::ButtonLayout layout =
QDialogButtonBox::ButtonLayout( style()->styleHint( QStyle::SH_DialogButtonLayout, nullptr, this ) );
Expand Down
4 changes: 0 additions & 4 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionShowBookmarks() { return mActionShowBookmarks; }
QAction *actionDraw() { return mActionDraw; }

QAction *actionAddGeonodeLayer() { return mActionAddGeonodeLayer; }

QAction *actionDataSourceManager() { return mActionDataSourceManager; }
QAction *actionNewVectorLayer() { return mActionNewVectorLayer; }
QAction *actionNewSpatialLiteLayer() { return mActionNewSpatiaLiteLayer; }
Expand Down Expand Up @@ -1748,7 +1746,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *mActionPluginSeparator1 = nullptr;
QAction *mActionPluginSeparator2 = nullptr;
QAction *mActionRasterSeparator = nullptr;
QAction *mActionAddGeonodeLayer = nullptr;

// action groups ----------------------------------
QActionGroup *mMapToolGroup = nullptr;
Expand All @@ -1761,7 +1758,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
#endif
QMenu *mPanelMenu = nullptr;
QMenu *mToolbarMenu = nullptr;
QMenu *mGeonodeMenu = nullptr;

// docks ------------------------------------------
QgsDockWidget *mLayerTreeDock = nullptr;
Expand Down
3 changes: 0 additions & 3 deletions src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,6 @@ QAction *QgisAppInterface::actionNewBookmark() { return qgis->actionNewBookmark(
QAction *QgisAppInterface::actionShowBookmarks() { return qgis->actionShowBookmarks(); }
QAction *QgisAppInterface::actionDraw() { return qgis->actionDraw(); }

//! Web menu actions
QAction *QgisAppInterface::actionAddGeonodeLayer() { return qgis->actionAddGeonodeLayer(); }

//! Layer menu actions
QAction *QgisAppInterface::actionNewVectorLayer() { return qgis->actionNewVectorLayer(); }
QAction *QgisAppInterface::actionAddOgrLayer() { return qgis->actionAddOgrLayer(); }
Expand Down
3 changes: 0 additions & 3 deletions src/app/qgisappinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,6 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual QAction *actionShowBookmarks() override;
virtual QAction *actionDraw() override;

//! Web menu actions
virtual QAction *actionAddGeonodeLayer();

//! Layer menu actions
virtual QAction *actionNewVectorLayer() override;
virtual QAction *actionAddOgrLayer() override;
Expand Down

0 comments on commit 8769369

Please sign in to comment.