Skip to content

Commit cbef41c

Browse files
committed
add .db to spatialite extensions (fixes #4919)
1 parent 063c7e6 commit cbef41c

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/app/qgsnewspatialitelayerdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
111111
{
112112
QString fileName = QFileDialog::getSaveFileName( this, tr( "New SpatiaLite Database File" ),
113113
".",
114-
tr( "SpatiaLite (*.sqlite *.db )" ) );
114+
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );
115115

116116
if ( fileName.isEmpty() )
117117
return;

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,9 +1698,8 @@ QString createFilters( QString type )
16981698
}
16991699
else if ( driverName.startsWith( "SQLite" ) )
17001700
{
1701-
myFileFilters += createFileFilter_( QObject::tr( "SQLite" ),
1702-
"*.sqlite" );
1703-
myExtensions << "sqlite";
1701+
myFileFilters += createFileFilter_( QObject::tr( "SQLite" ), "*.sqlite *.db" );
1702+
myExtensions << "sqlite" << "db";
17041703
}
17051704
else if ( driverName.startsWith( "UK .NTF" ) )
17061705
{

src/providers/spatialite/qgsspatialitedataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ void QgsSLRootItem::createDatabase()
293293

294294
QString filename = QFileDialog::getSaveFileName( 0, tr( "New SpatiaLite Database File" ),
295295
lastUsedDir,
296-
tr( "SpatiaLite (*.sqlite *.db )" ) );
296+
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );
297297
if ( filename.isEmpty() )
298298
return;
299299

src/providers/spatialite/qgsspatialitesourceselect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ bool QgsSpatiaLiteSourceSelect::newConnection( QWidget* parent )
229229

230230
QString myFile = QFileDialog::getOpenFileName( parent,
231231
tr( "Choose a SpatiaLite/SQLite DB to open" ),
232-
lastUsedDir, QObject::tr( "SQLite DB (*.sqlite *.db);;All files (*)" ) );
232+
lastUsedDir, tr( "SpatiaLite DB" ) + " (*.sqlite *.db);;" + tr( "All files" ) + " (*)" );
233233

234234
if ( myFile.isEmpty() )
235235
return false;

0 commit comments

Comments
 (0)