Skip to content

Commit c2f3c52

Browse files
author
gsherman
committed
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) git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13294 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ffcc04b commit c2f3c52

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/app/qgisapp.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@
217217
#define PG_VERSION "unknown"
218218
#endif
219219
#endif
220+
#include <sqlite3.h>
220221
#ifdef HAVE_SPATIALITE
221222
extern "C"
222223
{
223-
#include <sqlite3.h>
224224
#include <spatialite.h>
225225
}
226226
#include "qgsspatialitesourceselect.h"
@@ -956,7 +956,7 @@ void QgisApp::createActions()
956956

957957
#ifdef HAVE_SPATIALITE
958958
mActionNewSpatialiteLayer = new QAction( getThemeIcon( "mActionNewVectorLayer.png" ), tr( "New SpatiaLite Layer ..." ), this );
959-
shortcuts->registerAction( mActionNewSpatialiteLayer, tr( "Ctrl+Shift+S", "Create a New SpatiaLite Layer " ) );
959+
shortcuts->registerAction( mActionNewSpatialiteLayer, tr( "Ctrl+Shift+A", "Create a New SpatiaLite Layer " ) );
960960
mActionNewSpatialiteLayer->setStatusTip( tr( "Create a New SpatiaLite Layer " ) );
961961
connect( mActionNewSpatialiteLayer, SIGNAL( triggered() ), this, SLOT( newSpatialiteLayer() ) );
962962
#endif
@@ -3106,13 +3106,13 @@ static QString quotedValue( QString value )
31063106
return value.prepend( "'" ).append( "'" );
31073107
}
31083108

3109+
#ifdef HAVE_SPATIALITE
31093110
void QgisApp::newSpatialiteLayer()
31103111
{
31113112
if ( mMapCanvas && mMapCanvas->isDrawing() )
31123113
{
31133114
return;
31143115
}
3115-
31163116
QgsNewSpatialiteLayerDialog spatialiteDialog( this );
31173117
if ( spatialiteDialog.exec() == QDialog::Rejected )
31183118
{
@@ -3229,6 +3229,7 @@ void QgisApp::newSpatialiteLayer()
32293229
}
32303230
}
32313231
}
3232+
#endif
32323233

32333234
void QgisApp::fileOpen()
32343235
{

src/app/qgisapp.h

+2
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,10 @@ class QgisApp : public QMainWindow
493493
void fileNew( bool thePromptToSaveFlag );
494494
//! Create a new empty vector layer
495495
void newVectorLayer();
496+
#ifdef HAVE_SPATIALITE
496497
//! Create a new empty spatialite layer
497498
void newSpatialiteLayer();
499+
#endif
498500
//! Print the current map view frame
499501
void newPrintComposer();
500502
void showComposerManager();

0 commit comments

Comments
 (0)