Skip to content

Commit

Permalink
Fix for compile failure when buiding without spatialite.
Browse files Browse the repository at this point in the history
Changed shortcut key for creating new spatialite layer/database to
Ctrl+Shift+A (previous value conflicted with existing shortcut)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13294 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Apr 11, 2010
1 parent ffcc04b commit c2f3c52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -956,7 +956,7 @@ void QgisApp::createActions()

#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
Expand Down Expand Up @@ -3106,13 +3106,13 @@ static QString quotedValue( QString value )
return value.prepend( "'" ).append( "'" );
}

#ifdef HAVE_SPATIALITE
void QgisApp::newSpatialiteLayer()
{
if ( mMapCanvas && mMapCanvas->isDrawing() )
{
return;
}

QgsNewSpatialiteLayerDialog spatialiteDialog( this );
if ( spatialiteDialog.exec() == QDialog::Rejected )
{
Expand Down Expand Up @@ -3229,6 +3229,7 @@ void QgisApp::newSpatialiteLayer()
}
}
}
#endif

void QgisApp::fileOpen()
{
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisapp.h
Expand Up @@ -493,8 +493,10 @@ class QgisApp : public QMainWindow
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();
Expand Down

0 comments on commit c2f3c52

Please sign in to comment.