[QGIS Commit] r9680 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Nov 21 09:35:26 EST 2008


Author: mhugent
Date: 2008-11-21 09:35:26 -0500 (Fri, 21 Nov 2008)
New Revision: 9680

Modified:
   trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
Log:
Don't show password information in legend layer file

Modified: trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayerfile.cpp	2008-11-21 14:22:04 UTC (rev 9679)
+++ trunk/qgis/src/app/legend/qgslegendlayerfile.cpp	2008-11-21 14:35:26 UTC (rev 9680)
@@ -165,7 +165,7 @@
 
 QString QgsLegendLayerFile::nameFromLayer( QgsMapLayer* layer )
 {
-  QString sourcename = layer->source(); //todo: move this duplicated code into a new function
+  QString sourcename = layer->publicSource(); //todo: move this duplicated code into a new function
   if ( sourcename.startsWith( "host", Qt::CaseInsensitive ) )
   {
     //this layer is a database layer
@@ -175,7 +175,7 @@
   else
   {
     //modify source name such that only the file is visible
-    sourcename = layer->source().section( '/', -1, -1 );
+    sourcename = layer->publicSource().section( '/', -1, -1 );
   }
   return sourcename;
 }



More information about the QGIS-commit mailing list