[QGIS Commit] r13294 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Apr 11 03:16:07 EDT 2010


Author: gsherman
Date: 2010-04-11 03:16:04 -0400 (Sun, 11 Apr 2010)
New Revision: 13294

Modified:
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgisapp.h
Log:
Fix for compile failure when buiding without spatialite.
Changed shortcut key for creating new spatialite layer/database to
Ctrl+Shift+A (previous value conflicted with existing shortcut)

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2010-04-10 15:19:10 UTC (rev 13293)
+++ trunk/qgis/src/app/qgisapp.cpp	2010-04-11 07:16:04 UTC (rev 13294)
@@ -217,10 +217,10 @@
 #define PG_VERSION "unknown"
 #endif
 #endif
+#include <sqlite3.h>
 #ifdef HAVE_SPATIALITE
 extern "C"
 {
-#include <sqlite3.h>
 #include <spatialite.h>
 }
 #include "qgsspatialitesourceselect.h"
@@ -956,7 +956,7 @@
 
 #ifdef HAVE_SPATIALITE
   mActionNewSpatialiteLayer = new QAction( getThemeIcon( "mActionNewVectorLayer.png" ), tr( "New SpatiaLite Layer ..." ), this );
-  shortcuts->registerAction( mActionNewSpatialiteLayer, tr( "Ctrl+Shift+S", "Create a New SpatiaLite Layer " ) );
+  shortcuts->registerAction( mActionNewSpatialiteLayer, tr( "Ctrl+Shift+A", "Create a New SpatiaLite Layer " ) );
   mActionNewSpatialiteLayer->setStatusTip( tr( "Create a New SpatiaLite Layer " ) );
   connect( mActionNewSpatialiteLayer, SIGNAL( triggered() ), this, SLOT( newSpatialiteLayer() ) );
 #endif
@@ -3106,13 +3106,13 @@
   return value.prepend( "'" ).append( "'" );
 }
 
+#ifdef HAVE_SPATIALITE
 void QgisApp::newSpatialiteLayer()
 {
   if ( mMapCanvas && mMapCanvas->isDrawing() )
   {
     return;
   }
-
   QgsNewSpatialiteLayerDialog spatialiteDialog( this );
   if ( spatialiteDialog.exec() == QDialog::Rejected )
   {
@@ -3229,6 +3229,7 @@
     }
   }
 }
+#endif
 
 void QgisApp::fileOpen()
 {

Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h	2010-04-10 15:19:10 UTC (rev 13293)
+++ trunk/qgis/src/app/qgisapp.h	2010-04-11 07:16:04 UTC (rev 13294)
@@ -493,8 +493,10 @@
     void fileNew( bool thePromptToSaveFlag );
     //! Create a new empty vector layer
     void newVectorLayer();
+#ifdef HAVE_SPATIALITE
     //! Create a new empty spatialite layer
     void newSpatialiteLayer();
+#endif
     //! Print the current map view frame
     void newPrintComposer();
     void showComposerManager();



More information about the QGIS-commit mailing list