Skip to content

Commit

Permalink
add .db to spatialite extensions (fixes #4919)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 30, 2012
1 parent 063c7e6 commit cbef41c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsnewspatialitelayerdialog.cpp
Expand Up @@ -111,7 +111,7 @@ void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "New SpatiaLite Database File" ),
".",
tr( "SpatiaLite (*.sqlite *.db )" ) );
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );

if ( fileName.isEmpty() )
return;
Expand Down
5 changes: 2 additions & 3 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1698,9 +1698,8 @@ QString createFilters( QString type )
}
else if ( driverName.startsWith( "SQLite" ) )
{
myFileFilters += createFileFilter_( QObject::tr( "SQLite" ),
"*.sqlite" );
myExtensions << "sqlite";
myFileFilters += createFileFilter_( QObject::tr( "SQLite" ), "*.sqlite *.db" );
myExtensions << "sqlite" << "db";
}
else if ( driverName.startsWith( "UK .NTF" ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialitedataitems.cpp
Expand Up @@ -293,7 +293,7 @@ void QgsSLRootItem::createDatabase()

QString filename = QFileDialog::getSaveFileName( 0, tr( "New SpatiaLite Database File" ),
lastUsedDir,
tr( "SpatiaLite (*.sqlite *.db )" ) );
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );
if ( filename.isEmpty() )
return;

Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialitesourceselect.cpp
Expand Up @@ -229,7 +229,7 @@ bool QgsSpatiaLiteSourceSelect::newConnection( QWidget* parent )

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

if ( myFile.isEmpty() )
return false;
Expand Down

0 comments on commit cbef41c

Please sign in to comment.