Skip to content
Permalink
Browse files

Also hide ArcGIS provider actions if provider is disabled

  • Loading branch information
manisandro committed Jun 3, 2016
1 parent 6e66eef commit 8f158771a36c6b62c3ee9bdf586cd5cfbc600866
Showing with 22 additions and 4 deletions.
  1. +6 −1 CMakeLists.txt
  2. +2 −0 cmake_templates/qgsconfig.h.in
  3. +11 −0 src/app/qgisapp.cpp
  4. +3 −3 src/providers/CMakeLists.txt
@@ -200,7 +200,6 @@ FIND_PACKAGE(GDAL)
FIND_PACKAGE(Expat REQUIRED)
FIND_PACKAGE(Spatialindex REQUIRED)
FIND_PACKAGE(Qwt REQUIRED)
FIND_PACKAGE(QJSON)

IF (WITH_INTERNAL_QEXTSERIALPORT)
SET(QEXTSERIALPORT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/gps/qextserialport)
@@ -313,6 +312,12 @@ ENDIF (WITH_TOUCH)
# search for QScintilla2 (C++ lib)
FIND_PACKAGE(QScintilla REQUIRED)

# search for QJSON and decide whether to enable ArcGIS providers
FIND_PACKAGE (QJSON)
IF (QJSON_FOUND AND NOT ENABLE_QT5)
SET (WITH_ARCGIS TRUE)
ENDIF (QJSON_FOUND AND NOT ENABLE_QT5)

# Master password hash and authentication encryption
FIND_PACKAGE(QCA REQUIRED)
# Check for runtime dependency of qca-ossl plugin
@@ -56,5 +56,7 @@

#cmakedefine ENABLE_MODELTEST

#cmakedefine WITH_ARCGIS

#endif

@@ -1676,6 +1676,13 @@ void QgisApp::createActions()
mActionAddPgLayer = 0;
#endif

#ifndef WITH_ARCGIS
delete mActionAddAfsLayer;
mActionAddAfsLayer = 0;
delete mActionAddAmsLayer;
mActionAddAmsLayer = 0;
#endif

#ifndef HAVE_ORACLE
delete mActionAddOracleLayer;
mActionAddOracleLayer = nullptr;
@@ -2126,6 +2133,7 @@ void QgisApp::createToolBars()
newLayerAction->setObjectName( "ActionNewLayer" );
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );

#ifdef WITH_ARCGIS
// map service tool button
bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
@@ -2167,6 +2175,7 @@ void QgisApp::createToolBars()
mLayerToolBar->removeAction( mActionAddWfsLayer );
featureServiceAction->setObjectName( "ActionFeatureService" );
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
#endif

// add db layer button
bt = new QToolButton();
@@ -2545,8 +2554,10 @@ void QgisApp::setTheme( const QString& theThemeName )
mActionAddWmsLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddWmsLayer.svg" ) );
mActionAddWcsLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddWcsLayer.svg" ) );
mActionAddWfsLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddWfsLayer.svg" ) );
#ifdef WITH_ARCGIS
mActionAddAfsLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddAfsLayer.svg" ) );
mActionAddAmsLayer->setIcon( QgsApplication::getThemeIcon( "/mActionAddAmsLayer.svg" ) );
#endif
mActionAddToOverview->setIcon( QgsApplication::getThemeIcon( "/mActionInOverview.svg" ) );
mActionAnnotation->setIcon( QgsApplication::getThemeIcon( "/mActionAnnotation.png" ) );
mActionFormAnnotation->setIcon( QgsApplication::getThemeIcon( "/mActionFormAnnotation.png" ) );
@@ -2,9 +2,9 @@
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})

IF(QJSON_FOUND AND NOT ENABLE_QT5)
ADD_SUBDIRECTORY(arcgisrest)
ENDIF(QJSON_FOUND AND NOT ENABLE_QT5)
IF(WITH_ARCGIS)
ADD_SUBDIRECTORY(arcgisrest)
ENDIF(WITH_ARCGIS)
ADD_SUBDIRECTORY(memory)
ADD_SUBDIRECTORY(ogr)
ADD_SUBDIRECTORY(wms)

0 comments on commit 8f15877

Please sign in to comment.
You can’t perform that action at this time.