Skip to content

Commit

Permalink
Hide password in project properties
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Sep 19, 2023
1 parent f0a2c90 commit 9b9a702
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4474,7 +4474,7 @@ void QgisApp::setupConnections()
QString name = QgsProject::instance()->title().isEmpty() ? QgsProject::instance()->fileName() : QgsProject::instance()->title();
if ( QgsProject::instance()->projectStorage() )
{
name = QgsDataSourceUri::removePassword( name );
name = QgsDataSourceUri::removePassword( name, true );
}

mProjectLoadingProxyTask = new QgsProxyProgressTask( tr( "Loading “%1”" ).arg( name ) );
Expand Down
10 changes: 9 additions & 1 deletion src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,15 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
mEndDateTimeEdit->setDateTime( range.end() );

title( QgsProject::instance()->title() );
mProjectFileLineEdit->setText( QDir::toNativeSeparators( !QgsProject::instance()->fileName().isEmpty() ? QgsProject::instance()->fileName() : QgsProject::instance()->originalPath() ) );

QString name = !QgsProject::instance()->fileName().isEmpty() ? QgsProject::instance()->fileName() : QgsProject::instance()->originalPath();
if ( QgsProject::instance()->projectStorage() )
{
name = QgsDataSourceUri::removePassword( name, true );
}

mProjectFileLineEdit->setText( QDir::toNativeSeparators( name ) );

mProjectHomeLineEdit->setShowClearButton( true );
mProjectHomeLineEdit->setText( QDir::toNativeSeparators( QgsProject::instance()->presetHomePath() ) );
connect( mButtonSetProjectHome, &QToolButton::clicked, this, [ = ]
Expand Down

0 comments on commit 9b9a702

Please sign in to comment.