@@ -251,9 +251,7 @@ extern "C"
251
251
252
252
#ifndef WIN32
253
253
#include < dlfcn.h>
254
- #endif
255
-
256
- #ifdef WIN32
254
+ #else
257
255
#include < windows.h>
258
256
#endif
259
257
@@ -1730,7 +1728,7 @@ void QgisApp::initLegend()
1730
1728
1731
1729
QWidget *w = new QWidget ( this );
1732
1730
QLayout *l = new QVBoxLayout;
1733
- l->setMargin (0 );
1731
+ l->setMargin ( 0 );
1734
1732
l->addWidget ( mMapLegend );
1735
1733
l->addWidget ( legendCb );
1736
1734
w->setLayout ( l );
@@ -1747,7 +1745,7 @@ void QgisApp::initLegend()
1747
1745
1748
1746
w = new QWidget ( this );
1749
1747
l = new QVBoxLayout;
1750
- l->setMargin (0 );
1748
+ l->setMargin ( 0 );
1751
1749
l->addWidget ( mMapLayerOrder );
1752
1750
l->addWidget ( orderCb );
1753
1751
w->setLayout ( l );
@@ -3331,6 +3329,14 @@ void QgisApp::saveAsVectorFileGeneral( bool saveOnlySelection )
3331
3329
QString encoding = dialog->encoding ();
3332
3330
QString vectorFilename = dialog->filename ();
3333
3331
QString format = dialog->format ();
3332
+ QStringList datasourceOptions = dialog->datasourceOptions ();
3333
+
3334
+ if ( format == " SpatiaLite" )
3335
+ {
3336
+ if ( !datasourceOptions.contains ( " SPATIALITE=YES" ) )
3337
+ datasourceOptions.append ( " SPATIALITE=YES" );
3338
+ format = " SQLite" ;
3339
+ }
3334
3340
3335
3341
if ( dialog->crs () < 0 )
3336
3342
{
@@ -3358,7 +3364,7 @@ void QgisApp::saveAsVectorFileGeneral( bool saveOnlySelection )
3358
3364
vlayer, vectorFilename, encoding, &destCRS, format,
3359
3365
saveOnlySelection,
3360
3366
&errorMessage,
3361
- dialog-> datasourceOptions () , dialog->layerOptions (),
3367
+ datasourceOptions, dialog->layerOptions (),
3362
3368
dialog->skipAttributeCreation () );
3363
3369
3364
3370
QApplication::restoreOverrideCursor ();
@@ -6390,14 +6396,14 @@ void QgisApp::oldProjectVersionWarning( QString oldVersion )
6390
6396
6391
6397
#ifdef ANDROID
6392
6398
// this is needed to deal with http://hub.qgis.org/issues/4573
6393
- QMessageBox box (QMessageBox::Warning,title, tr (" This project file was saved by an older version of QGIS" ), QMessageBox::Ok, NULL );
6399
+ QMessageBox box ( QMessageBox::Warning, title, tr ( " This project file was saved by an older version of QGIS" ), QMessageBox::Ok, NULL );
6394
6400
box.setDetailedText (
6395
- text.remove (0 , 3 )
6396
- .replace (QString (" <p>" ), QString (" \n\n " ) )
6397
- .replace (QString (" <br>" ), QString (" \n " ) )
6398
- .replace (QString (" <a href=\" http://hub.qgis.org/projects/quantum-gis\" >http://hub.qgis.org/projects/quantum-gis</a> " ), QString (" \n http://hub.qgis.org/projects/quantum-gis" ) )
6399
- .replace (QRegExp (" </?tt>" ), QString (" " ) )
6400
- );
6401
+ text.remove ( 0 , 3 )
6402
+ .replace ( QString ( " <p>" ), QString ( " \n\n " ) )
6403
+ .replace ( QString ( " <br>" ), QString ( " \n " ) )
6404
+ .replace ( QString ( " <a href=\" http://hub.qgis.org/projects/quantum-gis\" >http://hub.qgis.org/projects/quantum-gis</a> " ), QString ( " \n http://hub.qgis.org/projects/quantum-gis" ) )
6405
+ .replace ( QRegExp ( " </?tt>" ), QString ( " " ) )
6406
+ );
6401
6407
box.exec ();
6402
6408
#else
6403
6409
QMessageBox::warning ( NULL , title, text );
0 commit comments