Skip to content

Commit d26bd46

Browse files
committedJan 8, 2016
remove 'layercount' attribute from project file
The 'layercount' attribute was not used anyway and the calculated number could already be outdated when loading the project file again due to changes to embedded projects.
1 parent 95a56b9 commit d26bd46

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed
 

‎python/plugins/processing/tests/data/project.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</filegroup>
4646
</legendlayer>
4747
</legend>
48-
<projectlayers layercount="4">
48+
<projectlayers>
4949
<maplayer minimumScale="0" maximumScale="1e+08" geometry="Line" type="vector" hasScaleBasedVisibilityFlag="0">
5050
<id>lines20130323011923044</id>
5151
<datasource>./lines.shp</datasource>

‎src/core/qgsproject.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,6 @@ bool QgsProject::write()
10581058
// Iterate over layers in zOrder
10591059
// Call writeXML() on each
10601060
QDomElement projectLayersNode = doc->createElement( "projectlayers" );
1061-
projectLayersNode.setAttribute( "layercount", qulonglong( layers.size() ) );
10621061

10631062
QMap<QString, QgsMapLayer*>::ConstIterator li = layers.constBegin();
10641063
while ( li != layers.end() )

‎tests/testdata/labeling/test-labeling.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</filegroup>
4343
</legendlayer>
4444
</legend>
45-
<projectlayers layercount="3">
45+
<projectlayers>
4646
<maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
4747
<id>aoi20130902095858570</id>
4848
<datasource>dbname='./pal_features_v3.sqlite' table="aoi" (geometry) sql=</datasource>

‎tests/testdata/qgis_local_server/test-project/test-server.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</filegroup>
3838
</legendlayer>
3939
</legend>
40-
<projectlayers layercount="2">
40+
<projectlayers>
4141
<maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
4242
<id>aoi20130902095858570</id>
4343
<datasource>dbname='./features_v3.sqlite' table="aoi" (geometry) sql=</datasource>

‎tests/testdata/qgis_server/test+project.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</filegroup>
4848
</legendlayer>
4949
</legend>
50-
<projectlayers layercount="1">
50+
<projectlayers>
5151
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
5252
<id>testlayer20150528120452665</id>
5353
<datasource>./testlayer.shp</datasource>

‎tests/testdata/qgis_server/test+project_wfs.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<layer_coordinate_transform destAuthId="EPSG:4326" srcAuthId="EPSG:4326" srcDatumTransform="-1" destDatumTransform="-1" layerid="testlayer20150528120452665"/>
7373
</layer_coordinate_transform_info>
7474
</mapcanvas>
75-
<projectlayers layercount="1">
75+
<projectlayers>
7676
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="0" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Point" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
7777
<id>testlayer20150528120452665</id>
7878
<datasource>./testlayer.shp</datasource>

‎tests/testdata/qgis_server_accesscontrol/project.qgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@
375375
</ComposerLabel>
376376
</Composition>
377377
</Composer>
378-
<projectlayers layercount="5">
378+
<projectlayers>
379379
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="1" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
380380
<id>Hello_copy20150804164427541</id>
381381
<datasource>dbname='./helloworld.db' table="hello" (geom) sql=</datasource>

0 commit comments

Comments
 (0)
Please sign in to comment.