Skip to content

Commit

Permalink
Revert back to 3.16.12
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 4, 2021
1 parent 526f570 commit e6f70e4
Show file tree
Hide file tree
Showing 107 changed files with 713 additions and 3,313 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/release.yml
Expand Up @@ -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 }}
Expand Down
6 changes: 0 additions & 6 deletions python/core/auto_generated/qgsfeature.sip.in
Expand Up @@ -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;
Expand Down
10 changes: 0 additions & 10 deletions python/core/auto_generated/qgsmapsettings.sip.in
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion python/gui/auto_generated/qgsmapcanvas.sip.in
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
Expand Up @@ -107,10 +107,6 @@ Sets the ``crs`` value for the new layer in the dialog.
.. versionadded:: 3.0
%End

public slots:
virtual void accept();


};

/************************************************************************
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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 );

Expand Down
Expand Up @@ -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

};

Expand Down
Expand Up @@ -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();

};

Expand Down
20 changes: 0 additions & 20 deletions python/gui/auto_generated/raster/qgsrasterrendererwidget.sip.in
Expand Up @@ -13,10 +13,6 @@

class QgsRasterRendererWidget: QWidget
{
%Docstring

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

%TypeHeaderCode
#include "qgsrasterrendererwidget.h"
Expand All @@ -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
Expand Down
Expand Up @@ -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 );
Expand Down
Expand Up @@ -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 );

Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/postgis/connector.py
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
18 changes: 0 additions & 18 deletions python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_tree.py
Expand Up @@ -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(
Expand Down
8 changes: 0 additions & 8 deletions python/server/auto_generated/qgsserverapicontext.sip.in
Expand Up @@ -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

};
Expand Down
3 changes: 1 addition & 2 deletions python/server/auto_generated/qgsserverogcapi.sip.in
Expand Up @@ -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 );
Expand Down
24 changes: 21 additions & 3 deletions src/3d/mesh/qgsmeshterraingenerator.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
Expand Down
1 change: 0 additions & 1 deletion src/analysis/processing/qgsalgorithmmergevector.cpp
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/decorations/qgsdecorationgrid.cpp
Expand Up @@ -361,7 +361,7 @@ void QgsDecorationGrid::drawCoordinateAnnotation( QgsRenderContext &context, QPo
else //Vertical
{
xpos -= textDescent;
ypos -= textWidth + mAnnotationFrameDistance;
ypos -= textWidth - mAnnotationFrameDistance;
rotation = 4.71239;
}
break;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsrectangle.h
Expand Up @@ -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() );
Expand Down
8 changes: 3 additions & 5 deletions src/core/labeling/qgslabelingengine.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -776,3 +773,4 @@ QgsLabeling::LinePlacementFlags QgsLabelingUtils::decodeLinePlacementFlags( cons
flags |= QgsLabeling::LinePlacementFlag::MapOrientation;
return flags;
}

0 comments on commit e6f70e4

Please sign in to comment.