Skip to content

Commit 623e7e8

Browse files
author
mhugent
committed
Don't show password information in legend layer file
git-svn-id: http://svn.osgeo.org/qgis/trunk@9680 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6a85e1a commit 623e7e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/legend/qgslegendlayerfile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void QgsLegendLayerFile::setIconAppearance( bool isInOverview,
165165

166166
QString QgsLegendLayerFile::nameFromLayer( QgsMapLayer* layer )
167167
{
168-
QString sourcename = layer->source(); //todo: move this duplicated code into a new function
168+
QString sourcename = layer->publicSource(); //todo: move this duplicated code into a new function
169169
if ( sourcename.startsWith( "host", Qt::CaseInsensitive ) )
170170
{
171171
//this layer is a database layer
@@ -175,7 +175,7 @@ QString QgsLegendLayerFile::nameFromLayer( QgsMapLayer* layer )
175175
else
176176
{
177177
//modify source name such that only the file is visible
178-
sourcename = layer->source().section( '/', -1, -1 );
178+
sourcename = layer->publicSource().section( '/', -1, -1 );
179179
}
180180
return sourcename;
181181
}

0 commit comments

Comments
 (0)