Skip to content

Commit

Permalink
Even more default path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Dec 4, 2015
1 parent 5198f63 commit 487be23
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/app/gps/qgsgpsinformationwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ void QgsGPSInformationWidget::on_mBtnLogFile_clicked()
// Retrieve last used log file dir from persistent settings
QSettings settings;
QString settingPath( "/gps/lastLogFileDir" );
QString lastUsedDir = settings.value( settingPath, "." ).toString();
QString lastUsedDir = settings.value( settingPath, QDir::homePath() ).toString();
QString saveFilePath = QFileDialog::getSaveFileName( this, tr( "Save GPS log file as" ), lastUsedDir, tr( "NMEA files" ) + " (*.nmea)" );
if ( saveFilePath.isNull() ) //canceled
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/openstreetmap/qgsosmdownloaddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void QgsOSMDownloadDialog::onCurrentLayerChanged( int index )
void QgsOSMDownloadDialog::onBrowseClicked()
{
QSettings settings;
QString lastDir = settings.value( "/osm/lastDir" ).toString();
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
if ( fileName.isNull() )
Expand Down
2 changes: 1 addition & 1 deletion src/app/openstreetmap/qgsosmexportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ QgsOSMExportDialog::~QgsOSMExportDialog()
void QgsOSMExportDialog::onBrowse()
{
QSettings settings;
QString lastDir = settings.value( "/osm/lastDir" ).toString();
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
if ( fileName.isNull() )
Expand Down
4 changes: 2 additions & 2 deletions src/app/openstreetmap/qgsosmimportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ QgsOSMImportDialog::~QgsOSMImportDialog()
void QgsOSMImportDialog::onBrowseXml()
{
QSettings settings;
QString lastDir = settings.value( "/osm/lastDir" ).toString();
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
if ( fileName.isNull() )
Expand All @@ -59,7 +59,7 @@ void QgsOSMImportDialog::onBrowseXml()
void QgsOSMImportDialog::onBrowseDb()
{
QSettings settings;
QString lastDir = settings.value( "/osm/lastDir" ).toString();
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
if ( fileName.isNull() )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributeactiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void QgsAttributeActionDialog::browse()
{
// Popup a file browser and place the results into the action widget
QString action = QFileDialog::getOpenFileName(
this, tr( "Select an action", "File dialog window title" ) );
this, tr( "Select an action", "File dialog window title" ), QDir::homePath() );

if ( !action.isNull() )
actionAction->insertPlainText( action );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsbookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void QgsBookmarks::importFromXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QDir::homePath() ).toString();
QString fileName = QFileDialog::getOpenFileName( this, tr( "Import Bookmarks" ), lastUsedDir,
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
Expand Down Expand Up @@ -317,7 +317,7 @@ void QgsBookmarks::exportToXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QDir::homePath() ).toString();
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
tr( "XML files( *.xml *.XML )" ) );
if ( fileName.isEmpty() )
Expand Down
6 changes: 4 additions & 2 deletions src/app/qgsconfigureshortcutsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ void QgsConfigureShortcutsDialog::populateActions()

void QgsConfigureShortcutsDialog::saveShortcuts()
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save shortcuts" ), ".", tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save shortcuts" ), QDir::homePath(),
tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );

if ( fileName.isEmpty() )
return;
Expand Down Expand Up @@ -151,7 +152,8 @@ void QgsConfigureShortcutsDialog::saveShortcuts()

void QgsConfigureShortcutsDialog::loadShortcuts()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load shortcuts" ), ".", tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load shortcuts" ), QDir::homePath(),
tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );

if ( fileName.isEmpty() )
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgscustomization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void QgsCustomizationDialog::on_actionSave_triggered( bool checked )
{
Q_UNUSED( checked );
QSettings mySettings;
QString lastDir = mySettings.value( mLastDirSettingsName, "." ).toString();
QString lastDir = mySettings.value( mLastDirSettingsName, QDir::homePath() ).toString();

QString fileName = QFileDialog::getSaveFileName( this,
tr( "Choose a customization INI file" ),
Expand All @@ -239,7 +239,7 @@ void QgsCustomizationDialog::on_actionLoad_triggered( bool checked )
{
Q_UNUSED( checked );
QSettings mySettings;
QString lastDir = mySettings.value( mLastDirSettingsName, "." ).toString();
QString lastDir = mySettings.value( mLastDirSettingsName, QDir::homePath() ).toString();

QString fileName = QFileDialog::getOpenFileName( this,
tr( "Choose a customization INI file" ),
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsdxfexportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ void QgsDxfExportDialog::on_mFileSelectionButton_clicked()
{
//get last dxf save directory
QSettings s;
QString lastSavePath = s.value( "qgis/lastDxfDir" ).toString();
QString lastSavePath = s.value( "qgis/lastDxfDir", QDir::homePath() ).toString();

QString filePath = QFileDialog::getSaveFileName( 0, tr( "Export as DXF" ), lastSavePath, tr( "DXF files *.dxf *.DXF" ) );
if ( !filePath.isEmpty() )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsnewspatialitelayerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void QgsNewSpatialiteLayerDialog::on_mTypeBox_currentIndexChanged( int index )
void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "New SpatiaLite Database File" ),
".",
QDir::homePath(),
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );

if ( fileName.isEmpty() )
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ void QgsOptions::on_pbnDefaultScaleValues_clicked()

void QgsOptions::on_pbnImportScales_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand All @@ -1949,7 +1949,7 @@ void QgsOptions::on_pbnImportScales_clicked()

void QgsOptions::on_pbnExportScales_clicked()
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), ".",
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsprojectlayergroupdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void QgsProjectLayerGroupDialog::on_mBrowseFileToolButton_clicked()
QSettings s;
QString projectFile = QFileDialog::getOpenFileName( this,
tr( "Select project file" ),
s.value( "/qgis/last_embedded_project_path" ).toString(),
s.value( "/qgis/last_embedded_project_path", QDir::homePath() ).toString(),
tr( "QGIS files" ) + " (*.qgs *.QGS)" );
if ( !projectFile.isEmpty() )
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ void QgsProjectProperties::on_pbnRemoveScale_clicked()

void QgsProjectProperties::on_pbnImportScales_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand All @@ -1405,7 +1405,7 @@ void QgsProjectProperties::on_pbnImportScales_clicked()

void QgsProjectProperties::on_pbnExportScales_clicked()
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), ".",
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsrastercalcdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void QgsRasterCalcDialog::on_mButtonBox_accepted()
void QgsRasterCalcDialog::on_mOutputLayerPushButton_clicked()
{
QSettings s;
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), s.value( "/RasterCalculator/lastOutputDir" ).toString(), QDir::homePath() );
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), s.value( "/RasterCalculator/lastOutputDir", QDir::homePath() ).toString() );
if ( !saveFileName.isNull() )
{
mOutputLayerLineEdit->setText( saveFileName );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void QgsValueMapConfigDlg::loadFromLayerButtonPushed()

void QgsValueMapConfigDlg::loadFromCSVButtonPushed()
{
QString fileName = QFileDialog::getOpenFileName( 0, tr( "Select a file" ) );
QString fileName = QFileDialog::getOpenFileName( 0, tr( "Select a file" ), QDir::homePath() );
if ( fileName.isNull() )
return;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmanageconnectionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void QgsManageConnectionsDialog::doExportImport()

if ( mDialogMode == Export )
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save connections" ), ".",
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save connections" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsowssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void QgsOWSSourceSelect::on_mSaveButton_clicked()

void QgsOWSSourceSelect::on_mLoadButton_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mLoadFromFileButton_clicked()
bool importError = false;
QString badLines;
QSettings settings;
QString lastDir = settings.value( "lastRasterFileFilterDir", "" ).toString();
QString lastDir = settings.value( "lastRasterFileFilterDir", QDir::homePath() ).toString();
QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir, tr( "Textfile (*.txt)" ) );
QFile inputFile( fileName );
if ( inputFile.open( QFile::ReadOnly ) )
Expand Down
4 changes: 2 additions & 2 deletions src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void QgsStyleV2ExportImportDialog::doExportImport()

if ( mDialogMode == Export )
{
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), ".",
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down Expand Up @@ -497,7 +497,7 @@ void QgsStyleV2ExportImportDialog::browse()

if ( type == "file" )
{
mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), ".",
mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( mFileName.isEmpty() )
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mFileToolButton_clicked()
QSettings s;
QString file = QFileDialog::getOpenFileName( 0,
tr( "Select SVG file" ),
s.value( "/UI/lastSVGMarkerDir" ).toString(),
s.value( "/UI/lastSVGMarkerDir", QDir::homePath() ).toString(),
tr( "SVG files" ) + " (*.svg)" );
QFileInfo fi( file );
if ( file.isEmpty() || !fi.exists() )
Expand Down Expand Up @@ -2133,7 +2133,7 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()

void QgsSVGFillSymbolLayerWidget::on_mBrowseToolButton_clicked()
{
QString filePath = QFileDialog::getOpenFileName( 0, tr( "Select SVG texture file" ), QString(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
QString filePath = QFileDialog::getOpenFileName( 0, tr( "Select SVG texture file" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
if ( !filePath.isNull() )
{
mSVGLineEdit->setText( filePath );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void dxf2shpConverterGui::getInputFileName()
QSettings settings;
QString s = QFileDialog::getOpenFileName( this,
tr( "Choose a DXF file to open" ),
settings.value( "/Plugin-DXF/text_path", "./" ).toString(),
settings.value( "/Plugin-DXF/text_path", QDir::homePath() ).toString(),
tr( "DXF files" ) + " (*.dxf)" );

if ( !s.isEmpty() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void eVisDatabaseConnectionGui::on_pbtnLoadPredefinedQueries_clicked()
//There probably needs to be some more error checking, but works for now.

//Select the XML file to parse
QString myFilename = QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "XML ( *.xml )" );
QString myFilename = QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "XML ( *.xml )" );
if ( myFilename != "" )
{
//Display the name of the file being parsed
Expand Down Expand Up @@ -453,9 +453,9 @@ void eVisDatabaseConnectionGui::on_cboxPredefinedQueryList_currentIndexChanged(
void eVisDatabaseConnectionGui::on_pbtnOpenFile_clicked()
{
if ( cboxDatabaseType->currentText() == "MSAccess" )
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "MSAccess ( *.mdb )" ) );
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "MSAccess ( *.mdb )" ) );
else
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "Sqlite ( *.db )" ) );
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "Sqlite ( *.db )" ) );
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/plugins/evis/eventbrowser/evisconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
**
**/
#include <QSettings>
#include <QDir>

#include "evisconfiguration.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ void eVisGenericEventBrowserGui::on_tableFileTypeAssociations_cellDoubleClicked(
{
if ( 1 == theColumn )
{
QString myApplication = QFileDialog::getOpenFileName( this, tr( "Select Application" ), "", tr( "All ( * )" ) );
QString myApplication = QFileDialog::getOpenFileName( this, tr( "Select Application" ), QDir::homePath(), tr( "All ( * )" ) );
if ( "" != myApplication )
{
tableFileTypeAssociations->setItem( theRow, theColumn, new QTableWidgetItem( myApplication ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void QgsRasterTerrainAnalysisDialog::on_mAutomaticColorButton_clicked()

void QgsRasterTerrainAnalysisDialog::on_mExportToCsvButton_clicked()
{
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Frequency distribution as csv" ) );
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Frequency distribution as csv" ), QDir::homePath() );
if ( file.isEmpty() )
{
return;
Expand All @@ -225,7 +225,7 @@ void QgsRasterTerrainAnalysisDialog::on_mExportToCsvButton_clicked()
void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()
{
qWarning( "Export colors clicked" );
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Colors and elevations as xml" ) );
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Colors and elevations as xml" ), QDir::homePath() );
if ( file.isEmpty() )
{
return;
Expand Down Expand Up @@ -259,7 +259,7 @@ void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()

void QgsRasterTerrainAnalysisDialog::on_mImportColorsButton_clicked()
{
QString file = QFileDialog::getOpenFileName( 0, tr( "Import Colors and elevations from xml" ) );
QString file = QFileDialog::getOpenFileName( 0, tr( "Import Colors and elevations from xml" ), QDir::homePath() );
if ( file.isEmpty() )
{
return;
Expand Down Expand Up @@ -297,7 +297,7 @@ void QgsRasterTerrainAnalysisDialog::on_mImportColorsButton_clicked()
void QgsRasterTerrainAnalysisDialog::on_mOutputLayerToolButton_clicked()
{
QSettings s;
QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir" ).toString();
QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir", QDir::homePath() ).toString();
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), lastDir );
if ( !saveFileName.isNull() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ void QgsDelimitedTextSourceSelect::getOpenFileName()
QString s = QFileDialog::getOpenFileName(
this,
tr( "Choose a delimited text file to open" ),
settings.value( mPluginKey + "/text_path", "./" ).toString(),
settings.value( mPluginKey + "/text_path", QDir::homePath() ).toString(),
tr( "Text files" ) + " (*.txt *.csv *.dat *.wkt);;"
+ tr( "All files" ) + " (* *.*)",
&selectedFilter
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void QgsMssqlSourceSelect::on_btnSave_clicked()

void QgsMssqlSourceSelect::on_btnLoad_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspgsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void QgsPgSourceSelect::on_btnSave_clicked()

void QgsPgSourceSelect::on_btnLoad_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ void QgsWFSSourceSelect::on_btnSave_clicked()

void QgsWFSSourceSelect::on_btnLoad_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void QgsWMSSourceSelect::on_btnSave_clicked()

void QgsWMSSourceSelect::on_btnLoad_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{