Skip to content
Permalink
Browse files
Revert back to 3.16.12
  • Loading branch information
nyalldawson committed Nov 4, 2021
1 parent 526f570 commit e6f70e47d3c795cf0693b9079e2aa5fa00167d21
Showing with 713 additions and 3,313 deletions.
  1. +5 −19 .github/workflows/release.yml
  2. +0 −6 python/core/auto_generated/qgsfeature.sip.in
  3. +0 −10 python/core/auto_generated/qgsmapsettings.sip.in
  4. +0 −1 python/gui/auto_generated/qgsmapcanvas.sip.in
  5. +0 −4 python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
  6. +6 −1 python/gui/auto_generated/raster/qgshillshaderendererwidget.sip.in
  7. +1 −4 python/gui/auto_generated/raster/qgsmultibandcolorrendererwidget.sip.in
  8. +1 −4 python/gui/auto_generated/raster/qgspalettedrendererwidget.sip.in
  9. +1 −1 python/gui/auto_generated/raster/qgsrastercontourrendererwidget.sip.in
  10. +0 −20 python/gui/auto_generated/raster/qgsrasterrendererwidget.sip.in
  11. +1 −4 python/gui/auto_generated/raster/qgssinglebandgrayrendererwidget.sip.in
  12. +2 −2 python/gui/auto_generated/raster/qgssinglebandpseudocolorrendererwidget.sip.in
  13. +2 −2 python/plugins/db_manager/db_plugins/postgis/connector.py
  14. +0 −18 python/plugins/db_manager/db_plugins/postgis/plugin.py
  15. +1 −1 python/plugins/db_manager/db_tree.py
  16. +0 −8 python/server/auto_generated/qgsserverapicontext.sip.in
  17. +1 −2 python/server/auto_generated/qgsserverogcapi.sip.in
  18. +21 −3 src/3d/mesh/qgsmeshterraingenerator.cpp
  19. +0 −1 src/analysis/processing/qgsalgorithmmergevector.cpp
  20. +1 −1 src/app/decorations/qgsdecorationgrid.cpp
  21. +0 −1 src/app/qgisapp.cpp
  22. +1 −1 src/core/geometry/qgsrectangle.h
  23. +3 −5 src/core/labeling/qgslabelingengine.cpp
  24. +5 −5 src/core/processing/qgsprocessingparameters.cpp
  25. +3 −74 src/core/providers/gdal/qgsgdalprovider.cpp
  26. +0 −3 src/core/providers/ogr/qgsogrprovider.cpp
  27. +1 −4 src/core/qgsfeature.h
  28. +0 −13 src/core/qgsfield.cpp
  29. +3 −10 src/core/qgsfieldformatter.cpp
  30. +1 −1 src/core/qgsmaplayer.cpp
  31. +1 −1 src/core/qgsmaprendererjob.cpp
  32. +2 −24 src/core/qgsmapsettings.cpp
  33. +0 −8 src/core/qgsmapsettings.h
  34. +1 −21 src/core/qgsogcutils.cpp
  35. +0 −4 src/core/qgsogcutils.h
  36. +10 −30 src/core/qgsvectorlayerjoinbuffer.cpp
  37. +96 −100 src/core/raster/qgspalettedrasterrenderer.cpp
  38. +1 −1 src/core/raster/qgsrasterlayer.cpp
  39. +2 −25 src/core/raster/qgsrasterpipe.cpp
  40. +2 −12 src/core/symbology/qgscategorizedsymbolrenderer.cpp
  41. +0 −18 src/core/symbology/qgslinesymbollayer.cpp
  42. +0 −10 src/core/textrenderer/qgstextrenderer.cpp
  43. +0 −5 src/gui/layout/qgslayoutattributetablewidget.cpp
  44. +0 −4 src/gui/processing/qgsprocessingmultipleselectiondialog.cpp
  45. +1 −16 src/gui/qgsexpressionbuilderwidget.cpp
  46. +0 −2 src/gui/qgsmanageconnectionsdialog.cpp
  47. +10 −19 src/gui/qgsmapcanvas.cpp
  48. +0 −6 src/gui/qgsmapcanvas.h
  49. +31 −40 src/gui/qgsnewvectorlayerdialog.cpp
  50. +0 −5 src/gui/qgsnewvectorlayerdialog.h
  51. +5 −1 src/gui/raster/qgshillshaderendererwidget.h
  52. +1 −4 src/gui/raster/qgsmultibandcolorrendererwidget.h
  53. +1 −4 src/gui/raster/qgspalettedrendererwidget.h
  54. +1 −1 src/gui/raster/qgsrastercontourrendererwidget.h
  55. +0 −18 src/gui/raster/qgsrasterrendererwidget.h
  56. +1 −4 src/gui/raster/qgssinglebandgrayrendererwidget.h
  57. +2 −4 src/gui/raster/qgssinglebandpseudocolorrendererwidget.h
  58. +1 −1 src/gui/symbology/qgsheatmaprendererwidget.cpp
  59. +1 −1 src/gui/symbology/qgspointclusterrendererwidget.cpp
  60. +1 −1 src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp
  61. +3 −13 src/providers/postgres/qgspostgresprovider.cpp
  62. +1 −2 src/providers/postgres/raster/qgspostgresrasterprovider.cpp
  63. +3 −4 src/providers/wfs/qgsbackgroundcachedshareddata.cpp
  64. +4 −7 src/providers/wfs/qgsbackgroundcachedshareddata.h
  65. +1 −1 src/providers/wfs/qgsoapifprovider.cpp
  66. +2 −2 src/providers/wfs/qgsoapifprovider.h
  67. +3 −1 src/providers/wfs/qgswfscapabilities.cpp
  68. +1 −25 src/providers/wfs/qgswfsfeatureiterator.cpp
  69. +4 −25 src/providers/wfs/qgswfsprovider.cpp
  70. +1 −16 src/providers/wfs/qgswfsshareddata.cpp
  71. +2 −8 src/providers/wfs/qgswfsshareddata.h
  72. +3 −11 src/providers/wms/qgswmscapabilities.cpp
  73. +0 −1 src/providers/wms/qgswmscapabilities.h
  74. +0 −14 src/server/qgsserverapicontext.cpp
  75. +0 −8 src/server/qgsserverapicontext.h
  76. +1 −6 src/server/qgsserverogcapi.cpp
  77. +1 −2 src/server/qgsserverogcapi.h
  78. +2 −3 src/server/qgsserverogcapihandler.cpp
  79. +2 −14 src/server/services/wfs/qgswfsgetfeature.cpp
  80. +5 −6 src/server/services/wms/qgswmsrestorer.cpp
  81. +8 −12 tests/src/analysis/testqgsprocessing.cpp
  82. +0 −6 tests/src/core/testqgsfield.cpp
  83. +0 −26 tests/src/core/testqgsmapsettings.cpp
  84. +0 −17 tests/src/core/testqgsogcutils.cpp
  85. +0 −27 tests/src/core/testqgsrectangle.cpp
  86. +0 −43 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
  87. +0 −79 tests/src/python/test_provider_postgres.py
  88. +0 −201 tests/src/python/test_provider_wfs.py
  89. +0 −83 tests/src/python/test_qgsexpressionbuilderwidget.py
  90. +0 −37 tests/src/python/test_qgsfieldformatters.py
  91. +0 −137 tests/src/python/test_qgsrasterlayer.py
  92. +0 −35 tests/src/python/test_qgsrulebasedrenderer.py
  93. +0 −55 tests/src/python/test_qgsserver_api.py
  94. +0 −39 tests/src/python/test_qgsserver_wms.py
  95. +0 −7 tests/src/python/test_qgsserver_wms_getlegendgraphic.py
  96. +0 −19 tests/src/python/test_qgsserver_wms_getmap.py
  97. +0 −22 tests/src/python/test_qgstextrenderer.py
  98. BIN ..._images/qgis_server/WMS_GetMap_Tiled_Rotated_Labels_True/WMS_GetMap_Tiled_Rotated_Labels_True.png
  99. BIN ..._images/text_renderer/background_rect_buffer_rotated_text/background_rect_buffer_rotated_text.png
  100. BIN ...ol_images/text_renderer/background_rect_fixed_rotated_text/background_rect_fixed_rotated_text.png
  101. BIN tests/testdata/control_images/text_renderer/text_buffer_mapunits/text_buffer_mapunits_mask.png
  102. +1 −1 tests/testdata/qgis_server/wfs_getFeature_1_1_0_epsgbbox_1_feature.txt
  103. +1 −1 tests/testdata/qgis_server/wfs_getFeature_1_1_0_epsgbbox_1_feature_3857.txt
  104. +1 −1 tests/testdata/qgis_server/wfs_getFeature_1_1_0_epsgbbox_3_feature.txt
  105. +1 −1 tests/testdata/qgis_server/wfs_getFeature_1_1_0_epsgbbox_3_feature_3857.txt
  106. +0 −22 tests/testdata/qgis_server/wms_getlegendgraphic_json_multiple_symbol.txt
  107. +431 −1,654 tests/testdata/qgis_server/wms_tile_buffer.qgs
@@ -11,32 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Version URL
run: |
VERSION=$(echo ${RELEASE_VERSION} | cut -d '-' -f 2 )
if [ ${VERSION: -1} = "0" ]
then
VERSION=$(echo ${VERSION} | cut -d '_' -f1,2 | sed 's/_/\./g')
echo "version_url=https://changelog.qgis.org/en/qgis/version/${VERSION}" >> $GITHUB_ENV
else
PREVIOUS=$(echo ${VERSION} | sed 's/_/\./g' | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF-1)%(10^length($NF))); print}' | sed 's/\./_/g')
echo "version_url=https://github.com/qgis/QGIS/compare/final-${PREVIOUS}%5E...final-${VERSION}" >> $GITHUB_ENV
fi
- name: Version name
- name: Prepare release names
run: |
VERSION_NAME=$(echo ${{ env.RELEASE_VERSION }} | cut -d '-' -f 2 | sed 's/_/\./g')
VERSION_CHANGELOG=$(echo ${{ github.ref }} | cut -d '-' -f 2 | cut -d '_' -f1,2 | sed 's/_/\./g')
echo "version_url=https://changelog.qgis.org/en/qgis/version/${VERSION_CHANGELOG}" >> $GITHUB_ENV
VERSION_NAME=$(echo ${{ github.ref }} | cut -d '-' -f 2 | sed 's/_/\./g')
echo "version_name=${VERSION_NAME}" >> $GITHUB_ENV
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_BOT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.version_name }}
@@ -177,12 +177,6 @@ Sets the feature ID for this feature.
:param id: feature id

.. seealso:: :py:func:`id`

.. warning::

Feature IDs will be automatically changed whenever a feature is added to vector layer or data provider.
This method is not designed to allow a specific feature ID to be assigned to a feature which will be added to a
layer or data provider, and the results will be unpredictable
%End

QgsAttributes attributes() const;
@@ -486,16 +486,6 @@ Returns the visible area as a polygon (may be rotated)

.. versionadded:: 2.8
%End

QPolygonF visiblePolygonWithBuffer() const;
%Docstring
Returns the visible area as a polygon (may be rotated) with extent buffer included

.. seealso:: :py:func:`extentBuffer`

.. versionadded:: 3.22
%End

double mapUnitsPerPixel() const;
%Docstring
Returns the distance in geographical coordinates that equals to one pixel in the map
@@ -133,7 +133,6 @@ Make sure to remove any rendered images from cache (does nothing if cache is not
.. versionadded:: 2.4
%End


void waitWhileRendering();
%Docstring
Blocks until the rendering job has finished.
@@ -107,10 +107,6 @@ Sets the ``crs`` value for the new layer in the dialog.
.. versionadded:: 3.0
%End

public slots:
virtual void accept();


};

/************************************************************************
@@ -37,8 +37,13 @@ Renderer widget for the hill shade renderer.
Factory method to create the renderer for this type.
%End

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();

%Docstring
The renderer for the widget.

:return: A new renderer for the the config in the widget
%End

void setFromRenderer( const QgsRasterRenderer *renderer );
%Docstring
@@ -20,15 +20,12 @@ class QgsMultiBandColorRendererWidget: QgsRasterRendererWidget
QgsMultiBandColorRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent = QgsRectangle() );
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent );

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();

virtual void setMapCanvas( QgsMapCanvas *canvas );


void setFromRenderer( const QgsRasterRenderer *r );
%Docstring
Sets the widget state from the specified renderer.
%End

virtual QString min( int index = 0 );

@@ -23,13 +23,10 @@ class QgsPalettedRendererWidget: QgsRasterRendererWidget
~QgsPalettedRendererWidget();
static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();


void setFromRenderer( const QgsRasterRenderer *r );
%Docstring
Sets the widget state from the specified renderer.
%End

};

@@ -30,7 +30,7 @@ Constructs the widget
Widget creation function (mainly for the use by the renderer registry)
%End

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();

};

@@ -13,10 +13,6 @@

class QgsRasterRendererWidget: QWidget
{
%Docstring

Abstract base class for widgets which configure a QgsRasterRenderer.
%End

%TypeHeaderCode
#include "qgsrasterrendererwidget.h"
@@ -26,25 +22,9 @@ Abstract base class for widgets which configure a QgsRasterRenderer.
QgsRasterRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent );

virtual QgsRasterRenderer *renderer() = 0 /Factory/;
%Docstring
Creates a new renderer, using the properties defined in the widget.

The caller takes ownership of the returned renderer.
%End

void setRasterLayer( QgsRasterLayer *layer );
%Docstring
Sets the raster ``layer`` associated with the widget.

.. seealso:: :py:func:`rasterLayer`
%End

const QgsRasterLayer *rasterLayer() const;
%Docstring
Returns the raster layer associated with the widget.

.. seealso:: :py:func:`setRasterLayer`
%End

virtual void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
@@ -21,15 +21,12 @@ class QgsSingleBandGrayRendererWidget: QgsRasterRendererWidget

static QgsRasterRendererWidget *create( QgsRasterLayer *layer, const QgsRectangle &extent ) /Factory/;

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();

virtual void setMapCanvas( QgsMapCanvas *canvas );


void setFromRenderer( const QgsRasterRenderer *r );
%Docstring
Sets the widget state from the specified renderer.
%End

virtual QString min( int index = 0 );
virtual QString max( int index = 0 );
@@ -33,7 +33,7 @@ Creates new raster renderer widget
Creates new raster renderer widget
%End

virtual QgsRasterRenderer *renderer() /Factory/;
virtual QgsRasterRenderer *renderer();

virtual void setMapCanvas( QgsMapCanvas *canvas );

@@ -49,7 +49,7 @@ Returns the current raster band number

void setFromRenderer( const QgsRasterRenderer *r );
%Docstring
Sets the widget state from the specified renderer.
Set state of the widget from renderer settings
%End

public slots:
@@ -96,7 +96,7 @@ def _toStrResultSet(self, res):
return newres

def _execute(self, sql=None):
if (sql is None or self.sql == sql) and self.result is not None:
if self.sql == sql and self.result is not None:
return
if (sql is not None):
self.sql = sql
@@ -168,7 +168,7 @@ def fetchone(self):
self._execute()
if len(self.result) - self.cursor:
res = self.result[self.cursor]
self.cursor += 1
++self.cursor
return res
return None

@@ -308,24 +308,6 @@ def runAction(self, action):
return True
return VectorTable.runAction(self, action)

def geometryType(self):
""" Returns the proper WKT type.
PostGIS records type like this:
| WKT Type | geomType | geomDim |
|--------------|-------------|---------|
| LineString | LineString | 2 |
| LineStringZ | LineString | 3 |
| LineStringM | LineStringM | 3 |
| LineStringZM | LineString | 4 |
"""
geometryType = self.geomType
if self.geomDim == 3 and self.geomType[-1] != "M":
geometryType += "Z"
elif self.geomDim == 4:
geometryType += "ZM"

return geometryType


class PGRasterTable(PGTable, RasterTable):

@@ -159,7 +159,7 @@ def delete(self):
def addLayer(self):
table = self.currentTable()
if table is not None:
layer = table.toMapLayer(table.geometryType())
layer = table.toMapLayer()
layers = QgsProject.instance().addMapLayers([layer])
if len(layers) != 1:
QgsMessageLog.logMessage(
@@ -87,14 +87,6 @@ Returns the API root path
void setRequest( const QgsServerRequest *request );
%Docstring
Sets context request to ``request``
%End

QString handlerPath( ) const;
%Docstring
Returns the handler component of the URL path, i.e. the part of the path that comes
after the API path.

.. versionadded:: 3.22
%End

};
@@ -105,8 +105,7 @@ Registers an OGC API ``handler``, ownership of the handler is transferred to the

static QUrl sanitizeUrl( const QUrl &url );
%Docstring
Returns a sanitized ``url`` with extra slashes removed and the path URL component that
always starts with a slash.
Returns a sanitized ``url`` with extra slashes removed
%End

static std::string relToString( const QgsServerOgcApi::Rel &rel );
@@ -72,7 +72,7 @@ float QgsMeshTerrainGenerator::rootChunkError( const Qgs3DMapSettings & ) const
void QgsMeshTerrainGenerator::rootChunkHeightRange( float &hMin, float &hMax ) const
{
float min = std::numeric_limits<float>::max();
float max = -std::numeric_limits<float>::max();
float max = std::numeric_limits<float>::min();

for ( int i = 0; i < mTriangularMesh.vertices().count(); ++i )
{
@@ -123,7 +123,25 @@ QgsTerrainGenerator::Type QgsMeshTerrainGenerator::type() const {return QgsTerra

QgsRectangle QgsMeshTerrainGenerator::extent() const
{
return mTriangularMesh.extent();
QgsRectangle layerextent;
if ( mLayer )
layerextent = mLayer->extent();
else
return QgsRectangle();

QgsCoordinateTransform terrainToMapTransform( mLayer->crs(), mCrs, mTransformContext );
QgsRectangle extentInMap;

try
{
extentInMap = terrainToMapTransform.transform( mLayer->extent() );
}
catch ( QgsCsException & )
{
extentInMap = mLayer->extent();
}

return extentInMap;
}

void QgsMeshTerrainGenerator::writeXml( QDomElement &elem ) const
@@ -164,7 +182,7 @@ void QgsMeshTerrainGenerator::updateTriangularMesh()
{
if ( meshLayer() )
{
const QgsCoordinateTransform transform( meshLayer()->crs(), mCrs, mTransformContext );
QgsCoordinateTransform transform( mCrs, meshLayer()->crs(), mTransformContext );
meshLayer()->updateTriangularMesh( transform );
mTriangularMesh = *meshLayer()->triangularMesh();
}
@@ -157,7 +157,6 @@ QVariantMap QgsMergeVectorAlgorithm::processAlgorithm( const QVariantMap &parame
destField.setType( QVariant::String );
destField.setSubType( QVariant::Invalid );
destField.setLength( 0 );
destField.setPrecision( 0 );
}
break;
}
@@ -361,7 +361,7 @@ void QgsDecorationGrid::drawCoordinateAnnotation( QgsRenderContext &context, QPo
else //Vertical
{
xpos -= textDescent;
ypos -= textWidth + mAnnotationFrameDistance;
ypos -= textWidth - mAnnotationFrameDistance;
rotation = 4.71239;
}
break;
@@ -13387,7 +13387,6 @@ void QgisApp::closeProject()
// clear out any stuff from project
mMapCanvas->setLayers( QList<QgsMapLayer *>() );
mMapCanvas->clearCache();
mMapCanvas->cancelJobs();
mOverviewCanvas->setLayers( QList<QgsMapLayer *>() );

// Avoid unnecessary layer changed handling for each layer removed - instead,
@@ -287,7 +287,7 @@ class CORE_EXPORT QgsRectangle
{
if ( p.x() < xMinimum() )
setXMinimum( p.x() );
if ( p.x() > xMaximum() )
else if ( p.x() > xMaximum() )
setXMaximum( p.x() );
if ( p.y() < yMinimum() )
setYMinimum( p.y() );
@@ -297,11 +297,8 @@ void QgsLabelingEngine::solve( QgsRenderContext &context )

QPainter *painter = context.painter();

QgsRectangle r1 = mMapSettings.visibleExtent();
r1.grow( mMapSettings.extentBuffer() );
QgsGeometry extentGeom = QgsGeometry::fromRect( r1 );

QPolygonF visiblePoly = mMapSettings.visiblePolygonWithBuffer();
QgsGeometry extentGeom = QgsGeometry::fromRect( mMapSettings.visibleExtent() );
QPolygonF visiblePoly = mMapSettings.visiblePolygon();
visiblePoly.append( visiblePoly.at( 0 ) ); //close polygon

// get map label boundary geometry - if one hasn't been explicitly set, we use the whole of the map's visible polygon
@@ -776,3 +773,4 @@ QgsLabeling::LinePlacementFlags QgsLabelingUtils::decodeLinePlacementFlags( cons
flags |= QgsLabeling::LinePlacementFlag::MapOrientation;
return flags;
}

Loading

0 comments on commit e6f70e4

Please sign in to comment.