mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	Even more default path fixes
This commit is contained in:
		
							parent
							
								
									5198f634b4
								
							
						
					
					
						commit
						487be231a4
					
				@ -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
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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 );
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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" ),
 | 
			
		||||
@ -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" ),
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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 );
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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 ) )
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
    {
 | 
			
		||||
@ -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() )
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
@ -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 );
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
@ -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 )" ) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -25,6 +25,7 @@
 | 
			
		||||
**
 | 
			
		||||
**/
 | 
			
		||||
#include <QSettings>
 | 
			
		||||
#include <QDir>
 | 
			
		||||
 | 
			
		||||
#include "evisconfiguration.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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 ) );
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
@ -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;
 | 
			
		||||
@ -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;
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
@ -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() )
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user