From d26bd46d99417fbe246cd515e55bdb27a881c27a Mon Sep 17 00:00:00 2001 From: Sebastian Dietrich Date: Sun, 27 Dec 2015 15:33:23 +0100 Subject: [PATCH] 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. --- python/plugins/processing/tests/data/project.qgs | 2 +- src/core/qgsproject.cpp | 1 - tests/testdata/labeling/test-labeling.qgs | 2 +- tests/testdata/qgis_local_server/test-project/test-server.qgs | 2 +- tests/testdata/qgis_server/test+project.qgs | 2 +- tests/testdata/qgis_server/test+project_wfs.qgs | 2 +- tests/testdata/qgis_server_accesscontrol/project.qgs | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/python/plugins/processing/tests/data/project.qgs b/python/plugins/processing/tests/data/project.qgs index c8bc91f35a2..af852743cbc 100644 --- a/python/plugins/processing/tests/data/project.qgs +++ b/python/plugins/processing/tests/data/project.qgs @@ -45,7 +45,7 @@ - + lines20130323011923044 ./lines.shp diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index f62aaf4bf52..bd8835b4745 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -1058,7 +1058,6 @@ bool QgsProject::write() // Iterate over layers in zOrder // Call writeXML() on each QDomElement projectLayersNode = doc->createElement( "projectlayers" ); - projectLayersNode.setAttribute( "layercount", qulonglong( layers.size() ) ); QMap::ConstIterator li = layers.constBegin(); while ( li != layers.end() ) diff --git a/tests/testdata/labeling/test-labeling.qgs b/tests/testdata/labeling/test-labeling.qgs index d8dbb103fcd..e21dffd5773 100644 --- a/tests/testdata/labeling/test-labeling.qgs +++ b/tests/testdata/labeling/test-labeling.qgs @@ -42,7 +42,7 @@ - + aoi20130902095858570 dbname='./pal_features_v3.sqlite' table="aoi" (geometry) sql= diff --git a/tests/testdata/qgis_local_server/test-project/test-server.qgs b/tests/testdata/qgis_local_server/test-project/test-server.qgs index 935a86b4b6c..0f3937bd6d3 100644 --- a/tests/testdata/qgis_local_server/test-project/test-server.qgs +++ b/tests/testdata/qgis_local_server/test-project/test-server.qgs @@ -37,7 +37,7 @@ - + aoi20130902095858570 dbname='./features_v3.sqlite' table="aoi" (geometry) sql= diff --git a/tests/testdata/qgis_server/test+project.qgs b/tests/testdata/qgis_server/test+project.qgs index 295052a29b9..c3dbec92d0c 100644 --- a/tests/testdata/qgis_server/test+project.qgs +++ b/tests/testdata/qgis_server/test+project.qgs @@ -47,7 +47,7 @@ - + testlayer20150528120452665 ./testlayer.shp diff --git a/tests/testdata/qgis_server/test+project_wfs.qgs b/tests/testdata/qgis_server/test+project_wfs.qgs index a71d9e9d15f..050da0ca252 100644 --- a/tests/testdata/qgis_server/test+project_wfs.qgs +++ b/tests/testdata/qgis_server/test+project_wfs.qgs @@ -72,7 +72,7 @@ - + testlayer20150528120452665 ./testlayer.shp diff --git a/tests/testdata/qgis_server_accesscontrol/project.qgs b/tests/testdata/qgis_server_accesscontrol/project.qgs index 1c75eb1478d..6c0696bd8a0 100644 --- a/tests/testdata/qgis_server_accesscontrol/project.qgs +++ b/tests/testdata/qgis_server_accesscontrol/project.qgs @@ -375,7 +375,7 @@ - + Hello_copy20150804164427541 dbname='./helloworld.db' table="hello" (geom) sql=