[QGIS Commit] r10027 - in trunk/qgis: src/core tests/src/core tests/testdata

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jan 26 20:15:05 EST 2009


Author: wonder
Date: 2009-01-26 20:15:05 -0500 (Mon, 26 Jan 2009)
New Revision: 10027

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/tests/src/core/testqgsrenderers.cpp
   trunk/qgis/tests/testdata/lines.qml
   trunk/qgis/tests/testdata/lines_continuous_symbol.qml
   trunk/qgis/tests/testdata/lines_graduated_symbol.qml
   trunk/qgis/tests/testdata/lines_single_symbol.qml
   trunk/qgis/tests/testdata/lines_uniquevalue_symbol.qml
   trunk/qgis/tests/testdata/points.qml
   trunk/qgis/tests/testdata/points_continuous_symbol.qml
   trunk/qgis/tests/testdata/points_graduated_symbol.qml
   trunk/qgis/tests/testdata/points_single_symbol.qml
   trunk/qgis/tests/testdata/points_uniquevalue_symbol.qml
   trunk/qgis/tests/testdata/polys.qml
   trunk/qgis/tests/testdata/polys_continuous_symbol.qml
   trunk/qgis/tests/testdata/polys_graduated_symbol.qml
   trunk/qgis/tests/testdata/polys_single_symbol.qml
   trunk/qgis/tests/testdata/polys_uniquevalue_symbol.qml
Log:
Fixed renderer tests to actually show some output, they still fail due different units.


Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-01-27 01:15:05 UTC (rev 10027)
@@ -2324,6 +2324,7 @@
 
   if ( !renderer )
   {
+    errorMessage = tr("Unknown renderer");
     return false;
   }
 

Modified: trunk/qgis/tests/src/core/testqgsrenderers.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsrenderers.cpp	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/src/core/testqgsrenderers.cpp	2009-01-27 01:15:05 UTC (rev 10027)
@@ -193,9 +193,10 @@
   }
   QString myFileName = mTestDataDir + "points_" + theType + "_symbol.qml";
   bool myStyleFlag = false;
-  mpPointsLayer->loadNamedStyle( myFileName, myStyleFlag );
+  QString error = mpPointsLayer->loadNamedStyle( myFileName, myStyleFlag );
   if ( !myStyleFlag )
   {
+    qDebug(error.toLocal8Bit().data());
     return false;
   }
   else

Modified: trunk/qgis/tests/testdata/lines.qml
===================================================================
--- trunk/qgis/tests/testdata/lines.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/lines.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
     <id>lines20080110101725388</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/lines.shp</datasource>
     <layername>lines</layername>
@@ -73,5 +72,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/lines_continuous_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/lines_continuous_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/lines_continuous_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
     <id>lines20080110101725388</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/lines.shp</datasource>
     <layername>lines</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <continuoussymbol>
-      <classificationfield>1</classificationfield>
+      <classificationfield>Value</classificationfield>
       <polygonoutline>1</polygonoutline>
       <lowestsymbol>
         <symbol>
@@ -78,5 +77,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/lines_graduated_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/lines_graduated_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/lines_graduated_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
     <id>lines20080110101725388</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/lines.shp</datasource>
     <layername>lines</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <graduatedsymbol>
-      <classificationfield>1</classificationfield>
+      <classificationfield>Value</classificationfield>
       <symbol>
         <lowervalue>0.999</lowervalue>
         <uppervalue>1.333</uppervalue>
@@ -88,5 +87,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/lines_single_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/lines_single_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/lines_single_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
     <id>lines20080110101725388</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/lines.shp</datasource>
     <layername>lines</layername>
@@ -56,5 +55,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/lines_uniquevalue_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/lines_uniquevalue_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/lines_uniquevalue_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Line" type="vector" >
     <id>lines20080110101725388</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/lines.shp</datasource>
     <layername>lines</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <uniquevalue>
-      <classificationfield>0</classificationfield>
+      <classificationfield>Name</classificationfield>
       <symbol>
         <lowervalue>Arterial</lowervalue>
         <uppervalue></uppervalue>
@@ -73,5 +72,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/points.qml
===================================================================
--- trunk/qgis/tests/testdata/points.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/points.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
     <id>points20080109122431720</id>
     <datasource>/home/timlinux/dev/cpp/qgis/tests/testdata/points.shp</datasource>
     <layername>Points</layername>
@@ -90,5 +89,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/points_continuous_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/points_continuous_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/points_continuous_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
     <id>points20080103150949100</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/points.shp</datasource>
     <layername>points</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <continuoussymbol>
-      <classificationfield>2</classificationfield>
+      <classificationfield>Importance</classificationfield>
       <polygonoutline>1</polygonoutline>
       <lowestsymbol>
         <symbol>
@@ -78,5 +77,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/points_graduated_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/points_graduated_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/points_graduated_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
     <id>points20080103150949100</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/points.shp</datasource>
     <layername>points</layername>
@@ -25,7 +24,7 @@
     <label>0</label>
     <attributeactions/>
     <graduatedsymbol>
-      <classificationfield>2</classificationfield>
+      <classificationfield>Importance</classificationfield>
       <symbol>
         <lowervalue>0.999</lowervalue>
         <uppervalue>7.333</uppervalue>
@@ -89,5 +88,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/points_single_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/points_single_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/points_single_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
     <id>points20080103150949100</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/points.shp</datasource>
     <layername>points</layername>
@@ -58,5 +57,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/points_uniquevalue_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/points_uniquevalue_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/points_uniquevalue_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Point" type="vector" >
     <id>points20080103150949100</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/points.shp</datasource>
     <layername>points</layername>
@@ -26,7 +25,7 @@
     <label>0</label>
     <attributeactions/>
     <uniquevalue>
-      <classificationfield>0</classificationfield>
+      <classificationfield>Class</classificationfield>
       <symbol>
         <lowervalue>B52</lowervalue>
         <uppervalue></uppervalue>
@@ -90,5 +89,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/polys.qml
===================================================================
--- trunk/qgis/tests/testdata/polys.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/polys.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
     <id>polys20080110101725465</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/polys.shp</datasource>
     <layername>polys</layername>
@@ -73,5 +72,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/polys_continuous_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/polys_continuous_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/polys_continuous_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
     <id>polys20080110101725465</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/polys.shp</datasource>
     <layername>polys</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <continuoussymbol>
-      <classificationfield>1</classificationfield>
+      <classificationfield>Value</classificationfield>
       <polygonoutline>1</polygonoutline>
       <lowestsymbol>
         <symbol>
@@ -78,5 +77,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/polys_graduated_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/polys_graduated_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/polys_graduated_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
     <id>polys20080110101725465</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/polys.shp</datasource>
     <layername>polys</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <graduatedsymbol>
-      <classificationfield>1</classificationfield>
+      <classificationfield>Value</classificationfield>
       <symbol>
         <lowervalue>6.999</lowervalue>
         <uppervalue>11.333</uppervalue>
@@ -88,5 +87,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/polys_single_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/polys_single_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/polys_single_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
     <id>polys20080110101725465</id>
     <datasource>/Users/tim/dev/cpp/qgis/tests/testdata/polys.shp</datasource>
     <layername>polys</layername>
@@ -56,5 +55,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>

Modified: trunk/qgis/tests/testdata/polys_uniquevalue_symbol.qml
===================================================================
--- trunk/qgis/tests/testdata/polys_uniquevalue_symbol.qml	2009-01-26 22:04:12 UTC (rev 10026)
+++ trunk/qgis/tests/testdata/polys_uniquevalue_symbol.qml	2009-01-27 01:15:05 UTC (rev 10027)
@@ -1,6 +1,5 @@
 <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
-<qgis version="0.9.2-Ganymede" >
-  <maplayer minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
+<qgis version="0.9.2-Ganymede" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0" geometry="Polygon" type="vector" >
     <id>polys20080110101725465</id>
     <datasource>/Users/timlinux/dev/cpp/qgis_qml/tests/testdata/polys.shp</datasource>
     <layername>polys</layername>
@@ -24,7 +23,7 @@
     <label>0</label>
     <attributeactions/>
     <continuoussymbol>
-      <classificationfield>1</classificationfield>
+      <classificationfield>Value</classificationfield>
       <polygonoutline>1</polygonoutline>
       <lowestsymbol>
         <symbol>
@@ -78,5 +77,4 @@
       <buffersize field="" units="pt" value="1" />
       <bufferenabled field="" on="" />
     </labelattributes>
-  </maplayer>
 </qgis>



More information about the QGIS-commit mailing list