diff --git a/vcpkg/ports/qgis/locatorcontext.patch b/vcpkg/ports/qgis/locatorcontext.patch index 31f81ff6bd..5b987c3602 100644 --- a/vcpkg/ports/qgis/locatorcontext.patch +++ b/vcpkg/ports/qgis/locatorcontext.patch @@ -2,7 +2,7 @@ diff --git a/src/core/locator/qgslocatorcontext.h b/src/core/locator/qgslocatorc index 6f19dc35ecc..325e6cc1be2 100644 --- a/src/core/locator/qgslocatorcontext.h +++ b/src/core/locator/qgslocatorcontext.h -@@ -30,6 +30,12 @@ +@@ -30,6 +30,13 @@ */ class CORE_EXPORT QgsLocatorContext { @@ -10,6 +10,7 @@ index 6f19dc35ecc..325e6cc1be2 100644 + + Q_PROPERTY( QgsRectangle targetExtent MEMBER targetExtent ) + Q_PROPERTY( QgsCoordinateReferenceSystem targetExtentCrs MEMBER targetExtentCrs ) ++ Q_PROPERTY( QgsCoordinateTransformContext transformContext MEMBER transformContext ) + Q_PROPERTY( bool usingPrefix MEMBER usingPrefix ) + public: @@ -35,3 +36,34 @@ index f560ae36c08..1657d39d2e6 100644 public: QgsLocatorResult() = default; +diff --git a/src/core/proj/qgscoordinatetransformcontext.cpp b/src/core/proj/qgscoordinatetransformcontext.cpp +index f61b4079204..4a4dfc8eea6 100644 +--- a/src/core/proj/qgscoordinatetransformcontext.cpp ++++ b/src/core/proj/qgscoordinatetransformcontext.cpp +@@ -65,6 +65,11 @@ bool QgsCoordinateTransformContext::operator==( const QgsCoordinateTransformCont + return equal; + } + ++bool QgsCoordinateTransformContext::operator!=( const QgsCoordinateTransformContext &rhs ) const ++{ ++ return !( *this == rhs ); ++} ++ + void QgsCoordinateTransformContext::clear() + { + d.detach(); +diff --git a/src/core/proj/qgscoordinatetransformcontext.h b/src/core/proj/qgscoordinatetransformcontext.h +index 7f62c7b6e1b..7779a0e0366 100644 +--- a/src/core/proj/qgscoordinatetransformcontext.h ++++ b/src/core/proj/qgscoordinatetransformcontext.h +@@ -67,7 +67,8 @@ class CORE_EXPORT QgsCoordinateTransformContext + QgsCoordinateTransformContext( const QgsCoordinateTransformContext &rhs ); + QgsCoordinateTransformContext &operator=( const QgsCoordinateTransformContext &rhs ) SIP_SKIP; + +- bool operator==( const QgsCoordinateTransformContext &rhs ) const ; ++ bool operator==( const QgsCoordinateTransformContext &rhs ) const; ++ bool operator!=( const QgsCoordinateTransformContext &rhs ) const; + + /** + * Clears all stored transform information from the context. + diff --git a/vcpkg/ports/qgis/portfile.cmake b/vcpkg/ports/qgis/portfile.cmake index e155552634..a363b0abe2 100644 --- a/vcpkg/ports/qgis/portfile.cmake +++ b/vcpkg/ports/qgis/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_from_github( processing.patch # Needed to avoid link issue with tinygltf (ATM embedded into QGIS) and _GEOSQueryCallback defined multiple times meshoptimizer.patch locatorcontext.patch # Remove when upgrading to QGIS 3.42 + rectangle.patch # Remove when upgrading to QGIS 3.42 ) file(REMOVE ${SOURCE_PATH}/cmake/FindGDAL.cmake) diff --git a/vcpkg/ports/qgis/rectangle.patch b/vcpkg/ports/qgis/rectangle.patch new file mode 100644 index 0000000000..a5d034efa6 --- /dev/null +++ b/vcpkg/ports/qgis/rectangle.patch @@ -0,0 +1,49 @@ +diff --git a/src/core/geometry/qgsrectangle.h b/src/core/geometry/qgsrectangle.h +index 81500f6c70d..ec335968a2f 100644 +--- a/src/core/geometry/qgsrectangle.h ++++ b/src/core/geometry/qgsrectangle.h +@@ -40,6 +40,20 @@ class QgsBox3D; + */ + class CORE_EXPORT QgsRectangle + { ++ Q_GADGET ++ ++ Q_PROPERTY( double xMinimum READ xMinimum WRITE setXMinimum ) ++ Q_PROPERTY( double xMaximum READ xMaximum WRITE setXMaximum ) ++ Q_PROPERTY( double yMinimum READ yMinimum WRITE setYMinimum ) ++ Q_PROPERTY( double yMaximum READ yMaximum WRITE setYMaximum ) ++ Q_PROPERTY( double width READ width ) ++ Q_PROPERTY( double height READ height ) ++ Q_PROPERTY( double area READ area ) ++ Q_PROPERTY( double perimeter READ perimeter ) ++ Q_PROPERTY( QgsPointXY center READ center ) ++ Q_PROPERTY( bool isEmpty READ isEmpty ) ++ Q_PROPERTY( bool isNull READ isNull ) ++ + public: + + //! Constructor for a null rectangle +@@ -518,12 +532,12 @@ class CORE_EXPORT QgsRectangle + /** + * Returns a string representation of the rectangle in WKT format. + */ +- QString asWktCoordinates() const; ++ Q_INVOKABLE QString asWktCoordinates() const; + + /** + * Returns a string representation of the rectangle as a WKT Polygon. + */ +- QString asWktPolygon() const; ++ Q_INVOKABLE QString asWktPolygon() const; + + /** + * Returns a QRectF with same coordinates as the rectangle. +@@ -538,7 +552,7 @@ class CORE_EXPORT QgsRectangle + * Coordinates will be truncated to the specified precision. + * If the specified precision is less than 0, a suitable minimum precision is used. + */ +- QString toString( int precision = 16 ) const; ++ Q_INVOKABLE QString toString( int precision = 16 ) const; + + /** + * Returns the rectangle as a polygon.