From 3e99e0d87a2199a89feec0ad95b934582679611a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ko=C5=88a=C5=99=C3=ADk?= Date: Mon, 27 Jan 2025 18:16:16 +0100 Subject: [PATCH] Remove support for SIP < 5.0.0 --- .ci/ogc/Dockerfile | 4 +- .docker/qgis3-qt5-build-deps.dockerfile | 4 +- INSTALL.md | 24 ++-- cmake/FindSIP.cmake | 27 ++-- cmake/SIPMacros.cmake | 5 - debian/control | 2 +- debian/control.in | 2 +- python/CMakeLists.txt | 59 ++------- .../qgssinglegeometrycheck.sip.in | 3 +- .../auto_generated/mesh/qgsmeshlayer.sip.in | 3 +- .../pointcloud/qgspointcloudlayer.sip.in | 9 +- python/PyQt6/core/auto_generated/qgis.sip.in | 1 - .../core/auto_generated/qgsfeature.sip.in | 3 - .../qgspropertycollection.sip.in | 3 +- .../raster/qgsrasterlayer.sip.in | 6 +- .../symbology/qgsfillsymbollayer.sip.in | 6 +- .../symbology/qgslinesymbollayer.sip.in | 12 +- .../tiledscene/qgstiledscenelayer.sip.in | 9 +- .../vector/qgsvectorlayer.sip.in | 124 +++++++----------- .../vectortile/qgsvectortilelayer.sip.in | 6 +- .../history/qgshistoryentrynode.sip.in | 3 +- .../mesh/qgsmeshlayerproperties.sip.in | 9 +- .../raster/qgsrasterlayerproperties.sip.in | 12 +- .../vector/qgsvectorlayerproperties.sip.in | 9 +- .../qgssinglegeometrycheck.sip.in | 3 +- .../auto_generated/mesh/qgsmeshlayer.sip.in | 3 +- .../pointcloud/qgspointcloudlayer.sip.in | 9 +- python/core/auto_generated/qgis.sip.in | 1 - python/core/auto_generated/qgsfeature.sip.in | 3 - .../qgspropertycollection.sip.in | 3 +- .../raster/qgsrasterlayer.sip.in | 6 +- .../symbology/qgsfillsymbollayer.sip.in | 6 +- .../symbology/qgslinesymbollayer.sip.in | 12 +- .../tiledscene/qgstiledscenelayer.sip.in | 9 +- .../vector/qgsvectorlayer.sip.in | 124 +++++++----------- .../vectortile/qgsvectortilelayer.sip.in | 6 +- .../history/qgshistoryentrynode.sip.in | 3 +- .../mesh/qgsmeshlayerproperties.sip.in | 9 +- .../raster/qgsrasterlayerproperties.sip.in | 12 +- .../vector/qgsvectorlayerproperties.sip.in | 9 +- scripts/sipify.py | 3 - .../geometry_checker/qgssinglegeometrycheck.h | 2 +- .../qgsannotationlayerproperties.h | 6 +- .../pointcloud/qgspointcloudlayerproperties.h | 6 +- .../tiledscene/qgstiledscenelayerproperties.h | 6 +- src/core/mesh/qgsmeshlayer.h | 2 +- src/core/pointcloud/qgspointcloudlayer.h | 6 +- src/core/qgis.h | 4 - src/core/qgis_sip.h | 11 -- src/core/qgsfeature.h | 5 - src/core/qgspropertycollection.h | 2 +- src/core/raster/qgsrasterlayer.h | 4 +- src/core/symbology/qgsfillsymbollayer.h | 4 +- src/core/symbology/qgslinesymbollayer.h | 8 +- src/core/tiledscene/qgstiledscenelayer.h | 6 +- src/core/vector/qgsvectorlayer.h | 84 ++++++------ src/core/vectortile/qgsvectortilelayer.h | 4 +- src/gui/history/qgshistoryentrynode.h | 2 +- src/gui/maptools/qgsmaptooldigitizefeature.h | 2 +- src/gui/mesh/qgsmeshlayerproperties.h | 6 +- src/gui/raster/qgsrasterlayerproperties.h | 10 +- src/gui/vector/qgsvectorlayerproperties.h | 6 +- .../vectortile/qgsvectortilelayerproperties.h | 4 +- src/python/qgspythonutilsimpl.cpp | 2 - 64 files changed, 277 insertions(+), 481 deletions(-) diff --git a/.ci/ogc/Dockerfile b/.ci/ogc/Dockerfile index 56c2d0d8db0b..7596aa50fb58 100644 --- a/.ci/ogc/Dockerfile +++ b/.ci/ogc/Dockerfile @@ -39,9 +39,9 @@ RUN apt-get update \ python3-pyqt5.qsci \ python3-all-dev \ python3-dev \ - python3-sip-dev \ pyqt5-dev-tools \ - spawn-fcgi + spawn-fcgi \ + sip-tools ADD qgis_mapserv.sh /root/qgis_mapserv.sh CMD ["sh", "/root/qgis_mapserv.sh"] diff --git a/.docker/qgis3-qt5-build-deps.dockerfile b/.docker/qgis3-qt5-build-deps.dockerfile index 173e0069a413..45b594ba7bb7 100644 --- a/.docker/qgis3-qt5-build-deps.dockerfile +++ b/.docker/qgis3-qt5-build-deps.dockerfile @@ -76,7 +76,6 @@ RUN apt-get update \ python3-pyqt5.qtpositioning \ python3-pyqt5.qtmultimedia \ python3-pyqt5.qtserialport \ - python3-sip \ python3-termcolor \ python3-yaml \ qpdf \ @@ -86,6 +85,7 @@ RUN apt-get update \ qt3d-scene2d-plugin \ qt5-image-formats-plugins \ saga \ + sip-tools \ supervisor \ unzip \ xauth \ @@ -211,7 +211,7 @@ RUN apt-get update \ pyqt5.qsci-dev \ python3-all-dev \ python3-dev \ - python3-sip-dev \ + python3-pyqtbuild \ qt3d5-dev \ qt5keychain-dev \ qtbase5-dev \ diff --git a/INSTALL.md b/INSTALL.md index cb724361d310..20fccaf7cd48 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -177,14 +177,14 @@ sudo apt-get update |Distribution|Install command for packages| |------------|----------------------------| -| bullseye | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpdal-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pdal pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip python3-sip-dev python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5keychain-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| bookworm | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| jammy | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpdal-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pdal pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| kinetic | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| lunar | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| mantic | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| noble | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | -| sid | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| bullseye | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpdal-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pdal pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild sip5-tools python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5keychain-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| bookworm | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| jammy | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpdal-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pdal pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| kinetic | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| lunar | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| mantic | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| noble | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | +| sid | ``apt-get install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libdraco-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtserialport python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` | (extracted from the control.in file in `debian/`) @@ -485,10 +485,10 @@ new subdirectory called `build` or `build-qt5` in it. |Distribution|Install command for packages| |------------|----------------------------| -| Fedora 38 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake python3-gdal gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel libzip-devel exiv2-devel PyQt-builder protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel python3-devel`` | -| Fedora 37 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake python3-gdal gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel libzip-devel exiv2-devel python3-sip-devel protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel`` | -| Fedora 35/36 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake gdal-python3 gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel libzip-devel exiv2-devel python3-sip-devel protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel`` | -| older versions | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel qt5-qtbase-tds qt5-qtbase-odbc spatialindex-devel expat-devel proj-devel qwt-qt5-devel gsl-devel postgresql-devel cmake gdal-python3 python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel sip-devel libzip-devel exiv2-devel draco-devel`` | +| Fedora 38 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake python3-gdal gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel libzip-devel exiv2-devel sip6 PyQt-builder protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel python3-devel`` | +| Fedora 37 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake python3-gdal gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel libzip-devel exiv2-devel sip6 protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel`` | +| Fedora 35/36 Workstation | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel hdf5-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel spatialindex-devel expat-devel netcdf-devel proj-devel qwt-qt5-devel gsl-devel PDAL PDAL-devel postgresql-devel cmake gdal-python3 gdal-python-tools python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel libzip-devel exiv2-devel sip6 protobuf-lite protobuf-lite-devel libzstd-devel qt5-qtserialport-devel draco-devel`` | +| older versions | ``dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qtmultimedia-devel qt5-qttools-static qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal gdal-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel qt5-qtbase-tds qt5-qtbase-odbc spatialindex-devel expat-devel proj-devel qwt-qt5-devel gsl-devel postgresql-devel cmake gdal-python3 python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel sip5 libzip-devel exiv2-devel draco-devel`` | To build QGIS server additional dependencies are required: diff --git a/cmake/FindSIP.cmake b/cmake/FindSIP.cmake index b3374c7c9beb..91ab65c04b2f 100644 --- a/cmake/FindSIP.cmake +++ b/cmake/FindSIP.cmake @@ -43,22 +43,19 @@ ELSE(SIP_VERSION) MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}") ENDIF(NOT SIP_FIND_QUIETLY) - IF(${SIP_VERSION_STR} VERSION_LESS 5) - STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_BINARY_PATH ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config}) + if(${SIP_VERSION_STR} VERSION_LESS 5.0.0) + message(FATAL_ERROR "QGIS supports SIP 5.0.0 or later, version ${SIP_VERSION_STR} found") + endif() + + FIND_PROGRAM(SIP_BUILD_EXECUTABLE sip-build) + IF(SIP_BUILD_EXECUTABLE) + IF(NOT SIP_FIND_QUIETLY) + MESSAGE(STATUS "Found sip-build executable: ${SIP_BUILD_EXECUTABLE}") + ENDIF(NOT SIP_FIND_QUIETLY) SET(SIP_FOUND TRUE) - ELSE(${SIP_VERSION_STR} VERSION_LESS 5) - FIND_PROGRAM(SIP_BUILD_EXECUTABLE sip-build) - IF(SIP_BUILD_EXECUTABLE) - IF(NOT SIP_FIND_QUIETLY) - MESSAGE(STATUS "Found sip-build executable: ${SIP_BUILD_EXECUTABLE}") - ENDIF(NOT SIP_FIND_QUIETLY) - SET(SIP_FOUND TRUE) - ELSE(SIP_BUILD_EXECUTABLE) - MESSAGE (FATAL_ERROR "Could not find sip-build executable") - ENDIF(SIP_BUILD_EXECUTABLE) - ENDIF(${SIP_VERSION_STR} VERSION_LESS 5) + ELSE(SIP_BUILD_EXECUTABLE) + MESSAGE (FATAL_ERROR "Could not find sip-build executable") + ENDIF(SIP_BUILD_EXECUTABLE) ENDIF(sip_config) IF(NOT SIP_FOUND) diff --git a/cmake/SIPMacros.cmake b/cmake/SIPMacros.cmake index e69e208b6a10..94ed07c2a871 100644 --- a/cmake/SIPMacros.cmake +++ b/cmake/SIPMacros.cmake @@ -184,11 +184,6 @@ MACRO(BUILD_SIP_PYTHON_MODULE MODULE_NAME SIP_FILES EXTRA_OBJECTS) SET_PROPERTY(TARGET ${_logical_name} PROPERTY AUTOMOC OFF) TARGET_INCLUDE_DIRECTORIES(${_logical_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${_module_path}/build) - IF (${SIP_VERSION_STR} VERSION_LESS 5.0.0) - # require c++14 only -- sip breaks with newer versions due to reliance on throw(...) annotations removed in c++17 - TARGET_COMPILE_FEATURES(${_logical_name} PRIVATE cxx_std_14) - ENDIF (${SIP_VERSION_STR} VERSION_LESS 5.0.0) - SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES CXX_VISIBILITY_PRESET default) TARGET_LINK_LIBRARIES(${_logical_name} Python::Python) TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) diff --git a/debian/control b/debian/control index bbfcfe59a384..57d31af0836f 100644 --- a/debian/control +++ b/debian/control @@ -374,7 +374,7 @@ Depends: python3-pyqt5.qtsql, python3-pyqt5.qtsvg, python3-pyqt5.qtwebkit, - python3-sip, + python3-sipbuild, python3-yaml, ${python3:Depends}, ${shlibs:Depends}, diff --git a/debian/control.in b/debian/control.in index 3313c439839c..adbab1625854 100644 --- a/debian/control.in +++ b/debian/control.in @@ -395,7 +395,7 @@ Depends: python3-pyqt5.qtsvg, python3-pyqt5.qtwebkit, python3-pyqt5.qtserialport, - python3-sip, + python3-sipbuild, python3-yaml, python3-lxml, ${python3:Depends}, diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index cf04c20710c2..051a8391deb3 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -72,16 +72,10 @@ endif() # * prepend auto-generated Python signature to existing Docstrings # * document template based classes set(DOCSTRINGSTEMPLATE "//") -if(${SIP_VERSION_STR} VERSION_GREATER 4.19.6) - set(DEFAULTDOCSTRINGSIGNATURE "%DefaultDocstringSignature \"prepended\"") - set(DOCSTRINGSTEMPLATE "") -endif() +set(DEFAULTDOCSTRINGSIGNATURE "%DefaultDocstringSignature \"prepended\"") +set(DOCSTRINGSTEMPLATE "") -if(${SIP_VERSION_STR} VERSION_GREATER 4.19.0) - set(SIP_FINAL "final") -else() - set(SIP_FINAL "") -endif() +set(SIP_FINAL "final") IF(BUILD_WITH_QT6) SET(QSCI_SIP_MOD_NAME Qsci/qscimod6.sip) @@ -96,13 +90,10 @@ set(QGIS_PYTHON_DIR ${Python_SITEARCH}/qgis) # core module file(GLOB_RECURSE sip_files_core ${BINDING_FILES_ROOT_DIR}/core/*.sip ${BINDING_FILES_ROOT_DIR}/core/*.sip.in) set(SIP_EXTRA_FILES_DEPEND ${sip_files_core}) -set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.core.api) -if((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_GREATER 4.19.11)) - set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -n ${PYQT_SIP_IMPORT}) -endif() +set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.core.api -n ${PYQT_SIP_IMPORT}) if(SIP_BUILD_EXECUTABLE) install(FILES ${CMAKE_BINARY_DIR}/python/core/build/_core/_core.pyi DESTINATION ${QGIS_PYTHON_DIR}) -elseif((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18)) +else() set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_core.pyi) install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_core.pyi DESTINATION ${QGIS_PYTHON_DIR}) endif() @@ -142,17 +133,7 @@ GENERATE_SIP_PYTHON_MODULE_CODE(qgis._core core/core.sip "${sip_files_core}" cpp BUILD_SIP_PYTHON_MODULE(qgis._core core/core.sip ${cpp_files} "" qgis_core) set(SIP_CORE_CPP_FILES ${cpp_files}) -# TODO QGIS 4 : remove this hack when we switch completely to Qt 6 which supports only c++17 -if( ${QT_VERSION_MAJOR} EQUAL 5 AND ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" ) ) - # Bad hack to fix compilation with gcc 11 - for some reason it's ignoring - # the c++ standard version set for the target in BUILD_SIP_PYTHON_MODULE! - add_definitions(-std=c++14) -endif() - -if((UNIX OR MINGW) AND SIP_VERSION_STR VERSION_GREATER_EQUAL 4.10 AND SIP_VERSION_STR VERSION_LESS 5.0) - set(SIP_EXTRA_OPTIONS -P ${SIP_EXTRA_OPTIONS}) - add_definitions(-Dprotected=public) -elseif((UNIX OR MINGW) AND SIP_VERSION_STR VERSION_GREATER_EQUAL 5.0) +if(UNIX OR MINGW) add_definitions(-Dprotected=public) endif() @@ -172,13 +153,10 @@ if (WITH_GUI) file(GLOB_RECURSE sip_files_gui ${BINDING_FILES_ROOT_DIR}/gui/*.sip ${BINDING_FILES_ROOT_DIR}/gui/*.sip.in) set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_gui}) - set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.gui.api) - if((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_GREATER 4.19.11)) - set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -n ${PYQT_SIP_IMPORT}) - endif() + set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.gui.api -n ${PYQT_SIP_IMPORT}) if(SIP_BUILD_EXECUTABLE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gui/build/_gui/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR}) - elseif((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18)) + else() set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi) install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR}) endif() @@ -206,13 +184,10 @@ if (WITH_3D) file(GLOB_RECURSE sip_files_3d ${BINDING_FILES_ROOT_DIR}/3d/*.sip ${BINDING_FILES_ROOT_DIR}/3d/*.sip.in) set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_3d}) - set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.3d_p.api) - if((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_GREATER 4.19.11)) - set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -n ${PYQT_SIP_IMPORT}) - endif() + set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.3d_p.api -n ${PYQT_SIP_IMPORT}) if(SIP_BUILD_EXECUTABLE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3d/build/_3d_p/_3d_p.pyi DESTINATION ${QGIS_PYTHON_DIR}) - elseif((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18)) + else() set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/3d_p.pyi) install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_3d_p.pyi DESTINATION ${QGIS_PYTHON_DIR}) endif() @@ -234,13 +209,10 @@ if (WITH_SERVER AND WITH_SERVER_PLUGINS) file(GLOB_RECURSE sip_files_server ${BINDING_FILES_ROOT_DIR}/server/*.sip ${BINDING_FILES_ROOT_DIR}/server/*.sip.in) set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_server}) - set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api) - if((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_GREATER 4.19.11)) - set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -n ${PYQT_SIP_IMPORT}) - endif() + set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api -n ${PYQT_SIP_IMPORT}) if(SIP_BUILD_EXECUTABLE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/server/build/_server/_server.pyi DESTINATION ${QGIS_PYTHON_DIR}) - elseif((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18)) + else() set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_server.pyi) install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_server.pyi DESTINATION ${QGIS_PYTHON_DIR}) endif() @@ -271,13 +243,10 @@ if(WITH_ANALYSIS) file(GLOB_RECURSE sip_files_analysis ${BINDING_FILES_ROOT_DIR}/analysis/*.sip ${BINDING_FILES_ROOT_DIR}/analysis/*.sip.in) set(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis}) - set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api) - if((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_GREATER 4.19.11)) - set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -n ${PYQT_SIP_IMPORT}) - endif() + set(SIP_EXTRA_OPTIONS ${PYQT_SIP_FLAGS} -g -o -a ${CMAKE_BINARY_DIR}/python/qgis.analysis.api -n ${PYQT_SIP_IMPORT}) if(SIP_BUILD_EXECUTABLE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/analysis/build/_analysis/_analysis.pyi DESTINATION ${QGIS_PYTHON_DIR}) - elseif((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18)) + else() set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_analysis.pyi) install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_analysis.pyi DESTINATION ${QGIS_PYTHON_DIR}) endif() diff --git a/python/PyQt6/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in b/python/PyQt6/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in index 6c6cca2f6018..a4bc7df54f26 100644 --- a/python/PyQt6/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in +++ b/python/PyQt6/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in @@ -132,8 +132,7 @@ Subclasses need to implement the processGeometry method. Creates a new single geometry check. %End - virtual void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = 0, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const ${SIP_FINAL}; - + void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = 0, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const final; virtual QList processGeometry( const QgsGeometry &geometry ) const = 0; %Docstring diff --git a/python/PyQt6/core/auto_generated/mesh/qgsmeshlayer.sip.in b/python/PyQt6/core/auto_generated/mesh/qgsmeshlayer.sip.in index 6a5b6bb46558..a49cdfde801b 100644 --- a/python/PyQt6/core/auto_generated/mesh/qgsmeshlayer.sip.in +++ b/python/PyQt6/core/auto_generated/mesh/qgsmeshlayer.sip.in @@ -160,8 +160,7 @@ data. virtual bool supportsEditing() const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; QString providerType() const; %Docstring diff --git a/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in b/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in index bcb66314bd45..36fee68bde83 100644 --- a/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in +++ b/python/PyQt6/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in @@ -101,13 +101,11 @@ Constructor - creates a point cloud layer virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ); - virtual bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) ${SIP_FINAL}; - + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const ${SIP_FINAL}; - + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ); @@ -116,8 +114,7 @@ Constructor - creates a point cloud layer virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; virtual QString htmlMetadata() const; virtual QgsMapLayerElevationProperties *elevationProperties(); diff --git a/python/PyQt6/core/auto_generated/qgis.sip.in b/python/PyQt6/core/auto_generated/qgis.sip.in index 4d30981e6609..a60dfb2940e6 100644 --- a/python/PyQt6/core/auto_generated/qgis.sip.in +++ b/python/PyQt6/core/auto_generated/qgis.sip.in @@ -3661,7 +3661,6 @@ typedef unsigned long long qgssize; - QString geoWkt(); %Docstring Wkt string that represents a geographic coord sys diff --git a/python/PyQt6/core/auto_generated/qgsfeature.sip.in b/python/PyQt6/core/auto_generated/qgsfeature.sip.in index 5cd75f42ce18..138c8aa7c1f6 100644 --- a/python/PyQt6/core/auto_generated/qgsfeature.sip.in +++ b/python/PyQt6/core/auto_generated/qgsfeature.sip.in @@ -26,9 +26,6 @@ geometry and a list of field/values attributes. %TypeHeaderCode #include "qgsfeature.h" -#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) -#define sipType_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) -#endif %End public: static const QMetaObject staticMetaObject; diff --git a/python/PyQt6/core/auto_generated/qgspropertycollection.sip.in b/python/PyQt6/core/auto_generated/qgspropertycollection.sip.in index a5c7fc86e4c6..396ae6bdf8dd 100644 --- a/python/PyQt6/core/auto_generated/qgspropertycollection.sip.in +++ b/python/PyQt6/core/auto_generated/qgspropertycollection.sip.in @@ -476,8 +476,7 @@ priority over earlier collections. Returns the number of collections contained within the stack. %End - virtual void clear() ${SIP_FINAL}; - + void clear() final; %Docstring Removes all collections from the stack. %End diff --git a/python/PyQt6/core/auto_generated/raster/qgsrasterlayer.sip.in b/python/PyQt6/core/auto_generated/raster/qgsrasterlayer.sip.in index 31228974204b..bc86b047044e 100644 --- a/python/PyQt6/core/auto_generated/raster/qgsrasterlayer.sip.in +++ b/python/PyQt6/core/auto_generated/raster/qgsrasterlayer.sip.in @@ -333,10 +333,8 @@ In a world file, this is normally the first row (without the sign). .. seealso:: :py:func:`rasterUnitsPerPixelX` %End - virtual void setOpacity( double opacity ) ${SIP_FINAL}; - - virtual double opacity() const ${SIP_FINAL}; - + void setOpacity( double opacity ) final; + double opacity() const final; void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, Qgis::RasterRangeLimit limits = Qgis::RasterRangeLimit::MinimumMaximum, diff --git a/python/PyQt6/core/auto_generated/symbology/qgsfillsymbollayer.sip.in b/python/PyQt6/core/auto_generated/symbology/qgsfillsymbollayer.sip.in index c7fd550f2981..49216bd0ba42 100644 --- a/python/PyQt6/core/auto_generated/symbology/qgsfillsymbollayer.sip.in +++ b/python/PyQt6/core/auto_generated/symbology/qgsfillsymbollayer.sip.in @@ -2579,8 +2579,7 @@ Caller takes ownership of the returned symbol layer. virtual QgsSymbol *subSymbol(); - virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) ${SIP_FINAL}; - + bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) final; virtual void setOutputUnit( Qgis::RenderUnit unit ); @@ -2770,8 +2769,7 @@ Caller takes ownership of the returned symbol layer. virtual QgsSymbol *subSymbol(); - virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) ${SIP_FINAL}; - + bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) final; virtual void setOutputUnit( Qgis::RenderUnit unit ); virtual Qgis::RenderUnit outputUnit() const; diff --git a/python/PyQt6/core/auto_generated/symbology/qgslinesymbollayer.sip.in b/python/PyQt6/core/auto_generated/symbology/qgslinesymbollayer.sip.in index 01eb0515b923..9f80da04123f 100644 --- a/python/PyQt6/core/auto_generated/symbology/qgslinesymbollayer.sip.in +++ b/python/PyQt6/core/auto_generated/symbology/qgslinesymbollayer.sip.in @@ -899,16 +899,12 @@ calculating individual symbol angles. virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ); - virtual void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) ${SIP_FINAL}; - - virtual Qgis::RenderUnit outputUnit() const ${SIP_FINAL}; - + void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) final; + Qgis::RenderUnit outputUnit() const final; virtual void setOutputUnit( Qgis::RenderUnit unit ); - virtual void setMapUnitScale( const QgsMapUnitScale &scale ) ${SIP_FINAL}; - - virtual QgsMapUnitScale mapUnitScale() const ${SIP_FINAL}; - + void setMapUnitScale( const QgsMapUnitScale &scale ) final; + QgsMapUnitScale mapUnitScale() const final; virtual QVariantMap properties() const; virtual bool canCauseArtifactsBetweenAdjacentTiles() const; diff --git a/python/PyQt6/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in b/python/PyQt6/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in index 807853893fb8..99c45855adaa 100644 --- a/python/PyQt6/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in +++ b/python/PyQt6/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in @@ -68,20 +68,17 @@ Constructor for QgsTiledSceneLayer. virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ); - virtual bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) ${SIP_FINAL}; - + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const ${SIP_FINAL}; - + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ); virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const; virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; virtual QString htmlMetadata() const; virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/; diff --git a/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in b/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in index c9924db14036..ae6ac0fecf67 100644 --- a/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in +++ b/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in @@ -502,11 +502,9 @@ Uses :py:class:`QgsExpression` :return: The expression which will be used to preview features for this layer %End - virtual bool hasMapTips() const ${SIP_FINAL}; - - - virtual QgsVectorDataProvider *dataProvider() ${SIP_FINAL}; + bool hasMapTips() const final; + QgsVectorDataProvider *dataProvider() final; virtual QgsMapLayerSelectionProperties *selectionProperties(); virtual QgsMapLayerTemporalProperties *temporalProperties(); @@ -560,8 +558,7 @@ Returns the join buffer object. const QList vectorJoins() const; - virtual bool setDependencies( const QSet &layers ) ${SIP_FINAL}; - + bool setDependencies( const QSet &layers ) final; %Docstring Sets the list of dependencies. @@ -572,8 +569,7 @@ Sets the list of dependencies. :return: ``False`` if a dependency cycle has been detected %End - virtual QSet dependencies() const ${SIP_FINAL}; - + QSet dependencies() const final; %Docstring Gets the list of dependencies. This includes data dependencies set by the user (:py:func:`setDataDependencies`) as well as dependencies given by the provider @@ -861,19 +857,15 @@ Returns a list of the feature renderer generators owned by the layer. Returns point, line or polygon %End - virtual Qgis::WkbType wkbType() const ${SIP_FINAL}; - + Qgis::WkbType wkbType() const final; %Docstring Returns the WKBType or WKBUnknown in case of error %End - virtual QgsCoordinateReferenceSystem sourceCrs() const ${SIP_FINAL}; - - virtual QString sourceName() const ${SIP_FINAL}; - - - virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) ${SIP_FINAL}; + QgsCoordinateReferenceSystem sourceCrs() const final; + QString sourceName() const final; + bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) final; %Docstring Reads vector layer specific state from project file Dom node. @@ -882,8 +874,7 @@ Reads vector layer specific state from project file Dom node. Called by :py:func:`QgsMapLayer.readXml()`. %End - virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - + bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const final; %Docstring Writes vector layer specific state to project file Dom node. @@ -892,13 +883,10 @@ Writes vector layer specific state to project file Dom node. Called by :py:func:`QgsMapLayer.writeXml()`. %End - virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - virtual QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - - virtual void resolveReferences( QgsProject *project ) ${SIP_FINAL}; + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; + void resolveReferences( QgsProject *project ) final; %Docstring Resolves references to other layers (kept as layer IDs after reading XML) into layer objects. %End @@ -930,14 +918,14 @@ Returns the current auxiliary layer. %End - virtual bool readSymbology( const QDomNode &layerNode, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL}; - virtual bool readStyle( const QDomNode &node, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL}; - virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL}; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL}; + bool readSymbology( const QDomNode &layerNode, QString &errorMessage, + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; + bool readStyle( const QDomNode &node, QString &errorMessage, + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; + bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const; %Docstring @@ -951,8 +939,7 @@ Writes the symbology of the layer into the document provided in SLD 1.1 format :return: ``True`` in case of success %End - virtual bool readSld( const QDomNode &node, QString &errorMessage ) ${SIP_FINAL}; - + bool readSld( const QDomNode &node, QString &errorMessage ) final; long long featureCount( const QString &legendKey ) const; %Docstring @@ -972,8 +959,7 @@ calculated by :py:func:`~QgsVectorLayer.countSymbolFeatures` .. versionadded:: 3.10 %End - virtual Qgis::FeatureAvailability hasFeatures() const ${SIP_FINAL}; - + Qgis::FeatureAvailability hasFeatures() const final; %Docstring Determines if this vector layer has features. @@ -987,8 +973,7 @@ Determines if this vector layer has features. .. versionadded:: 3.4 %End - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; QgsVectorLayerFeatureCounter *countSymbolFeatures( bool storeSymbolFids = false ); %Docstring @@ -1024,8 +1009,7 @@ Returns the string (typically sql) used to define a subset of the layer. :return: The subset string or null QString if not implemented by the provider %End - virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const ${SIP_FINAL}; - + QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const final; %Docstring Queries the layer for features specified in request. @@ -1061,8 +1045,7 @@ Queries the layer for the features with the given ids. Queries the layer for the features which intersect the specified rectangle. %End - virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL}; - + bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false ); %Docstring @@ -1652,14 +1635,12 @@ Access to labeling configuration. May be ``None`` if labeling is not used. Sets labeling configuration. Takes ownership of the object. %End - virtual bool isEditable() const ${SIP_FINAL}; - + bool isEditable() const final; %Docstring Returns ``True`` if the provider is in editing mode %End - virtual bool isSpatial() const ${SIP_FINAL}; - + bool isSpatial() const final; %Docstring Returns ``True`` if this is a geometry layer and ``False`` in case of NoGeometry (table only) or UnknownGeometry %End @@ -1676,30 +1657,23 @@ Returns ``True`` if the field comes from the auxiliary layer, ``False`` otherwise. %End - virtual void reload() ${SIP_FINAL}; - + void reload() final; %Docstring Synchronises with changes in the datasource %End - virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) ${SIP_FINAL} /Factory/; - + QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) final /Factory/; %Docstring Returns new instance of :py:class:`QgsMapLayerRenderer` that will be used for rendering of given context %End - virtual QgsRectangle extent() const ${SIP_FINAL}; - - virtual QgsRectangle sourceExtent() const ${SIP_FINAL}; - + QgsRectangle extent() const final; + QgsRectangle sourceExtent() const final; - virtual QgsBox3D extent3D() const ${SIP_FINAL}; - - virtual QgsBox3D sourceExtent3D() const ${SIP_FINAL}; - - - virtual QgsFields fields() const ${SIP_FINAL}; + QgsBox3D extent3D() const final; + QgsBox3D sourceExtent3D() const final; + QgsFields fields() const final; %Docstring Returns the list of fields of this layer. This also includes fields which have not yet been saved to the provider. @@ -1717,8 +1691,7 @@ Returns list of attribute indexes. i.e. a list from 0 ... :py:func:`~QgsVectorLa Returns the list of attributes which make up the layer's primary keys. %End - virtual long long featureCount() const ${SIP_FINAL}; - + long long featureCount() const final; %Docstring Returns feature count including changes which have not yet been committed If you need only the count of committed features call this method on this layer's provider. @@ -2010,8 +1983,7 @@ Deletes a list of attribute fields (but does not commit it) :return: ``True`` if at least one attribute has been deleted %End - virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL}; - + bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; bool deleteFeature( QgsFeatureId fid, QgsVectorLayer::DeleteContext *context = 0 ); %Docstring @@ -2312,8 +2284,7 @@ for the field. .. seealso:: :py:func:`setEditorWidgetSetup` %End - virtual QSet uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL}; - + QSet uniqueValues( int fieldIndex, int limit = -1 ) const final; %Docstring Calculates a list of unique values contained within an attribute in the layer. Note that in some circumstances when unsaved changes are present for the layer then the returned list @@ -2347,8 +2318,7 @@ returned list). :return: list of unique strings containing substring %End - virtual QVariant minimumValue( int index ) const ${SIP_FINAL}; - + QVariant minimumValue( int index ) const final; %Docstring Returns the minimum value for an attribute column or an invalid variant in case of error. @@ -2370,8 +2340,7 @@ Returns the minimum value for an attribute column or an invalid variant in case .. seealso:: :py:func:`uniqueValues` %End - virtual QVariant maximumValue( int index ) const ${SIP_FINAL}; - + QVariant maximumValue( int index ) const final; %Docstring Returns the maximum value for an attribute column or an invalid variant in case of error. @@ -2450,8 +2419,7 @@ Sets the blending mode used for rendering each feature Returns the current blending mode for features %End - virtual QString htmlMetadata() const ${SIP_FINAL}; - + QString htmlMetadata() const final; void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ); %Docstring @@ -2493,11 +2461,9 @@ Sets the attribute table configuration object. This defines the appearance of the attribute table. %End - virtual QgsExpressionContext createExpressionContext() const ${SIP_FINAL}; - - - virtual QgsExpressionContextScope *createExpressionContextScope() const ${SIP_FINAL} /Factory/; + QgsExpressionContext createExpressionContext() const final; + QgsExpressionContextScope *createExpressionContextScope() const final /Factory/; QgsEditFormConfig editFormConfig() const; %Docstring @@ -2916,13 +2882,11 @@ Emitted when the feature count for symbols on this layer has been recalculated. %End protected: - virtual void setExtent( const QgsRectangle &rect ) ${SIP_FINAL}; - + void setExtent( const QgsRectangle &rect ) final; %Docstring Sets the extent %End - virtual void setExtent3D( const QgsBox3D &rect ) ${SIP_FINAL}; - + void setExtent3D( const QgsBox3D &rect ) final; %Docstring Sets the extent %End diff --git a/python/PyQt6/core/auto_generated/vectortile/qgsvectortilelayer.sip.in b/python/PyQt6/core/auto_generated/vectortile/qgsvectortilelayer.sip.in index 08970aeb58b6..6583233018be 100644 --- a/python/PyQt6/core/auto_generated/vectortile/qgsvectortilelayer.sip.in +++ b/python/PyQt6/core/auto_generated/vectortile/qgsvectortilelayer.sip.in @@ -137,10 +137,8 @@ Ownership of the ``subLayers`` is transferrred to the caller. virtual QString loadDefaultMetadata( bool &resultFlag /Out/ ); - virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - virtual QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; virtual QString htmlMetadata() const; diff --git a/python/PyQt6/gui/auto_generated/history/qgshistoryentrynode.sip.in b/python/PyQt6/gui/auto_generated/history/qgshistoryentrynode.sip.in index 739da20f5b64..c9f804a7b0eb 100644 --- a/python/PyQt6/gui/auto_generated/history/qgshistoryentrynode.sip.in +++ b/python/PyQt6/gui/auto_generated/history/qgshistoryentrynode.sip.in @@ -144,8 +144,7 @@ Removes the child at the specified ``index``. Clears the group, removing all its children. %End - virtual int childCount() const ${SIP_FINAL}; - + int childCount() const final; protected: diff --git a/python/PyQt6/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in b/python/PyQt6/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in index 74728072657a..11e846af7484 100644 --- a/python/PyQt6/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in +++ b/python/PyQt6/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in @@ -61,12 +61,9 @@ Saves a style when appriate button is pressed %End protected slots: - virtual void syncToLayer() ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void syncToLayer() final; + void apply() final; + void rollback() final; }; diff --git a/python/PyQt6/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in b/python/PyQt6/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in index 1f7baec6fedb..f5de3be4e4bf 100644 --- a/python/PyQt6/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in +++ b/python/PyQt6/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in @@ -34,8 +34,7 @@ Constructor :param fl: windows flag %End - virtual void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) ${SIP_FINAL}; - + void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) final; virtual QgsExpressionContext createExpressionContext() const; @@ -53,12 +52,9 @@ Saves the default style when appropriate button is pressed %End protected slots: - virtual void optionsStackedWidget_CurrentChanged( int index ) ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void optionsStackedWidget_CurrentChanged( int index ) final; + void apply() final; + void rollback() final; }; /************************************************************************ diff --git a/python/PyQt6/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in b/python/PyQt6/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in index 83c348907051..be4431f85fc3 100644 --- a/python/PyQt6/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in +++ b/python/PyQt6/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in @@ -26,12 +26,9 @@ class QgsVectorLayerProperties : QgsLayerPropertiesDialog protected slots: void optionsStackedWidget_CurrentChanged( int index ) final; - virtual void syncToLayer() ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void syncToLayer() final; + void apply() final; + void rollback() final; signals: diff --git a/python/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in b/python/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in index 6c6cca2f6018..a4bc7df54f26 100644 --- a/python/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in +++ b/python/analysis/auto_generated/vector/geometry_checker/qgssinglegeometrycheck.sip.in @@ -132,8 +132,7 @@ Subclasses need to implement the processGeometry method. Creates a new single geometry check. %End - virtual void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = 0, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const ${SIP_FINAL}; - + void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = 0, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const final; virtual QList processGeometry( const QgsGeometry &geometry ) const = 0; %Docstring diff --git a/python/core/auto_generated/mesh/qgsmeshlayer.sip.in b/python/core/auto_generated/mesh/qgsmeshlayer.sip.in index 6a5b6bb46558..a49cdfde801b 100644 --- a/python/core/auto_generated/mesh/qgsmeshlayer.sip.in +++ b/python/core/auto_generated/mesh/qgsmeshlayer.sip.in @@ -160,8 +160,7 @@ data. virtual bool supportsEditing() const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; QString providerType() const; %Docstring diff --git a/python/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in b/python/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in index 3a43cbcec56b..035ffd2312c1 100644 --- a/python/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in +++ b/python/core/auto_generated/pointcloud/qgspointcloudlayer.sip.in @@ -101,13 +101,11 @@ Constructor - creates a point cloud layer virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ); - virtual bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) ${SIP_FINAL}; - + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const ${SIP_FINAL}; - + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ); @@ -116,8 +114,7 @@ Constructor - creates a point cloud layer virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; virtual QString htmlMetadata() const; virtual QgsMapLayerElevationProperties *elevationProperties(); diff --git a/python/core/auto_generated/qgis.sip.in b/python/core/auto_generated/qgis.sip.in index a2b885ed6ddb..217561e28aae 100644 --- a/python/core/auto_generated/qgis.sip.in +++ b/python/core/auto_generated/qgis.sip.in @@ -3661,7 +3661,6 @@ typedef unsigned long long qgssize; - QString geoWkt(); %Docstring Wkt string that represents a geographic coord sys diff --git a/python/core/auto_generated/qgsfeature.sip.in b/python/core/auto_generated/qgsfeature.sip.in index 8b196f94a4c5..c0fba8325a10 100644 --- a/python/core/auto_generated/qgsfeature.sip.in +++ b/python/core/auto_generated/qgsfeature.sip.in @@ -26,9 +26,6 @@ geometry and a list of field/values attributes. %TypeHeaderCode #include "qgsfeature.h" -#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) -#define sipType_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) -#endif %End public: static const QMetaObject staticMetaObject; diff --git a/python/core/auto_generated/qgspropertycollection.sip.in b/python/core/auto_generated/qgspropertycollection.sip.in index a5c7fc86e4c6..396ae6bdf8dd 100644 --- a/python/core/auto_generated/qgspropertycollection.sip.in +++ b/python/core/auto_generated/qgspropertycollection.sip.in @@ -476,8 +476,7 @@ priority over earlier collections. Returns the number of collections contained within the stack. %End - virtual void clear() ${SIP_FINAL}; - + void clear() final; %Docstring Removes all collections from the stack. %End diff --git a/python/core/auto_generated/raster/qgsrasterlayer.sip.in b/python/core/auto_generated/raster/qgsrasterlayer.sip.in index 31228974204b..bc86b047044e 100644 --- a/python/core/auto_generated/raster/qgsrasterlayer.sip.in +++ b/python/core/auto_generated/raster/qgsrasterlayer.sip.in @@ -333,10 +333,8 @@ In a world file, this is normally the first row (without the sign). .. seealso:: :py:func:`rasterUnitsPerPixelX` %End - virtual void setOpacity( double opacity ) ${SIP_FINAL}; - - virtual double opacity() const ${SIP_FINAL}; - + void setOpacity( double opacity ) final; + double opacity() const final; void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, Qgis::RasterRangeLimit limits = Qgis::RasterRangeLimit::MinimumMaximum, diff --git a/python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in b/python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in index c7fd550f2981..49216bd0ba42 100644 --- a/python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in +++ b/python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in @@ -2579,8 +2579,7 @@ Caller takes ownership of the returned symbol layer. virtual QgsSymbol *subSymbol(); - virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) ${SIP_FINAL}; - + bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) final; virtual void setOutputUnit( Qgis::RenderUnit unit ); @@ -2770,8 +2769,7 @@ Caller takes ownership of the returned symbol layer. virtual QgsSymbol *subSymbol(); - virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) ${SIP_FINAL}; - + bool setSubSymbol( QgsSymbol *symbol /Transfer/ ) final; virtual void setOutputUnit( Qgis::RenderUnit unit ); virtual Qgis::RenderUnit outputUnit() const; diff --git a/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in b/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in index 01eb0515b923..9f80da04123f 100644 --- a/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in +++ b/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in @@ -899,16 +899,12 @@ calculating individual symbol angles. virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ); - virtual void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) ${SIP_FINAL}; - - virtual Qgis::RenderUnit outputUnit() const ${SIP_FINAL}; - + void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) final; + Qgis::RenderUnit outputUnit() const final; virtual void setOutputUnit( Qgis::RenderUnit unit ); - virtual void setMapUnitScale( const QgsMapUnitScale &scale ) ${SIP_FINAL}; - - virtual QgsMapUnitScale mapUnitScale() const ${SIP_FINAL}; - + void setMapUnitScale( const QgsMapUnitScale &scale ) final; + QgsMapUnitScale mapUnitScale() const final; virtual QVariantMap properties() const; virtual bool canCauseArtifactsBetweenAdjacentTiles() const; diff --git a/python/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in b/python/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in index 807853893fb8..99c45855adaa 100644 --- a/python/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in +++ b/python/core/auto_generated/tiledscene/qgstiledscenelayer.sip.in @@ -68,20 +68,17 @@ Constructor for QgsTiledSceneLayer. virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ); - virtual bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) ${SIP_FINAL}; - + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const ${SIP_FINAL}; - + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ); virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const; virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const; - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; virtual QString htmlMetadata() const; virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/; diff --git a/python/core/auto_generated/vector/qgsvectorlayer.sip.in b/python/core/auto_generated/vector/qgsvectorlayer.sip.in index c9924db14036..ae6ac0fecf67 100644 --- a/python/core/auto_generated/vector/qgsvectorlayer.sip.in +++ b/python/core/auto_generated/vector/qgsvectorlayer.sip.in @@ -502,11 +502,9 @@ Uses :py:class:`QgsExpression` :return: The expression which will be used to preview features for this layer %End - virtual bool hasMapTips() const ${SIP_FINAL}; - - - virtual QgsVectorDataProvider *dataProvider() ${SIP_FINAL}; + bool hasMapTips() const final; + QgsVectorDataProvider *dataProvider() final; virtual QgsMapLayerSelectionProperties *selectionProperties(); virtual QgsMapLayerTemporalProperties *temporalProperties(); @@ -560,8 +558,7 @@ Returns the join buffer object. const QList vectorJoins() const; - virtual bool setDependencies( const QSet &layers ) ${SIP_FINAL}; - + bool setDependencies( const QSet &layers ) final; %Docstring Sets the list of dependencies. @@ -572,8 +569,7 @@ Sets the list of dependencies. :return: ``False`` if a dependency cycle has been detected %End - virtual QSet dependencies() const ${SIP_FINAL}; - + QSet dependencies() const final; %Docstring Gets the list of dependencies. This includes data dependencies set by the user (:py:func:`setDataDependencies`) as well as dependencies given by the provider @@ -861,19 +857,15 @@ Returns a list of the feature renderer generators owned by the layer. Returns point, line or polygon %End - virtual Qgis::WkbType wkbType() const ${SIP_FINAL}; - + Qgis::WkbType wkbType() const final; %Docstring Returns the WKBType or WKBUnknown in case of error %End - virtual QgsCoordinateReferenceSystem sourceCrs() const ${SIP_FINAL}; - - virtual QString sourceName() const ${SIP_FINAL}; - - - virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) ${SIP_FINAL}; + QgsCoordinateReferenceSystem sourceCrs() const final; + QString sourceName() const final; + bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) final; %Docstring Reads vector layer specific state from project file Dom node. @@ -882,8 +874,7 @@ Reads vector layer specific state from project file Dom node. Called by :py:func:`QgsMapLayer.readXml()`. %End - virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - + bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const final; %Docstring Writes vector layer specific state to project file Dom node. @@ -892,13 +883,10 @@ Writes vector layer specific state to project file Dom node. Called by :py:func:`QgsMapLayer.writeXml()`. %End - virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - virtual QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - - virtual void resolveReferences( QgsProject *project ) ${SIP_FINAL}; + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; + void resolveReferences( QgsProject *project ) final; %Docstring Resolves references to other layers (kept as layer IDs after reading XML) into layer objects. %End @@ -930,14 +918,14 @@ Returns the current auxiliary layer. %End - virtual bool readSymbology( const QDomNode &layerNode, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL}; - virtual bool readStyle( const QDomNode &node, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL}; - virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL}; - virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL}; + bool readSymbology( const QDomNode &layerNode, QString &errorMessage, + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; + bool readStyle( const QDomNode &node, QString &errorMessage, + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; + bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const; %Docstring @@ -951,8 +939,7 @@ Writes the symbology of the layer into the document provided in SLD 1.1 format :return: ``True`` in case of success %End - virtual bool readSld( const QDomNode &node, QString &errorMessage ) ${SIP_FINAL}; - + bool readSld( const QDomNode &node, QString &errorMessage ) final; long long featureCount( const QString &legendKey ) const; %Docstring @@ -972,8 +959,7 @@ calculated by :py:func:`~QgsVectorLayer.countSymbolFeatures` .. versionadded:: 3.10 %End - virtual Qgis::FeatureAvailability hasFeatures() const ${SIP_FINAL}; - + Qgis::FeatureAvailability hasFeatures() const final; %Docstring Determines if this vector layer has features. @@ -987,8 +973,7 @@ Determines if this vector layer has features. .. versionadded:: 3.4 %End - virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL}; - + QString loadDefaultStyle( bool &resultFlag /Out/ ) final; QgsVectorLayerFeatureCounter *countSymbolFeatures( bool storeSymbolFids = false ); %Docstring @@ -1024,8 +1009,7 @@ Returns the string (typically sql) used to define a subset of the layer. :return: The subset string or null QString if not implemented by the provider %End - virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const ${SIP_FINAL}; - + QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const final; %Docstring Queries the layer for features specified in request. @@ -1061,8 +1045,7 @@ Queries the layer for the features with the given ids. Queries the layer for the features which intersect the specified rectangle. %End - virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL}; - + bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false ); %Docstring @@ -1652,14 +1635,12 @@ Access to labeling configuration. May be ``None`` if labeling is not used. Sets labeling configuration. Takes ownership of the object. %End - virtual bool isEditable() const ${SIP_FINAL}; - + bool isEditable() const final; %Docstring Returns ``True`` if the provider is in editing mode %End - virtual bool isSpatial() const ${SIP_FINAL}; - + bool isSpatial() const final; %Docstring Returns ``True`` if this is a geometry layer and ``False`` in case of NoGeometry (table only) or UnknownGeometry %End @@ -1676,30 +1657,23 @@ Returns ``True`` if the field comes from the auxiliary layer, ``False`` otherwise. %End - virtual void reload() ${SIP_FINAL}; - + void reload() final; %Docstring Synchronises with changes in the datasource %End - virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) ${SIP_FINAL} /Factory/; - + QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) final /Factory/; %Docstring Returns new instance of :py:class:`QgsMapLayerRenderer` that will be used for rendering of given context %End - virtual QgsRectangle extent() const ${SIP_FINAL}; - - virtual QgsRectangle sourceExtent() const ${SIP_FINAL}; - + QgsRectangle extent() const final; + QgsRectangle sourceExtent() const final; - virtual QgsBox3D extent3D() const ${SIP_FINAL}; - - virtual QgsBox3D sourceExtent3D() const ${SIP_FINAL}; - - - virtual QgsFields fields() const ${SIP_FINAL}; + QgsBox3D extent3D() const final; + QgsBox3D sourceExtent3D() const final; + QgsFields fields() const final; %Docstring Returns the list of fields of this layer. This also includes fields which have not yet been saved to the provider. @@ -1717,8 +1691,7 @@ Returns list of attribute indexes. i.e. a list from 0 ... :py:func:`~QgsVectorLa Returns the list of attributes which make up the layer's primary keys. %End - virtual long long featureCount() const ${SIP_FINAL}; - + long long featureCount() const final; %Docstring Returns feature count including changes which have not yet been committed If you need only the count of committed features call this method on this layer's provider. @@ -2010,8 +1983,7 @@ Deletes a list of attribute fields (but does not commit it) :return: ``True`` if at least one attribute has been deleted %End - virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL}; - + bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; bool deleteFeature( QgsFeatureId fid, QgsVectorLayer::DeleteContext *context = 0 ); %Docstring @@ -2312,8 +2284,7 @@ for the field. .. seealso:: :py:func:`setEditorWidgetSetup` %End - virtual QSet uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL}; - + QSet uniqueValues( int fieldIndex, int limit = -1 ) const final; %Docstring Calculates a list of unique values contained within an attribute in the layer. Note that in some circumstances when unsaved changes are present for the layer then the returned list @@ -2347,8 +2318,7 @@ returned list). :return: list of unique strings containing substring %End - virtual QVariant minimumValue( int index ) const ${SIP_FINAL}; - + QVariant minimumValue( int index ) const final; %Docstring Returns the minimum value for an attribute column or an invalid variant in case of error. @@ -2370,8 +2340,7 @@ Returns the minimum value for an attribute column or an invalid variant in case .. seealso:: :py:func:`uniqueValues` %End - virtual QVariant maximumValue( int index ) const ${SIP_FINAL}; - + QVariant maximumValue( int index ) const final; %Docstring Returns the maximum value for an attribute column or an invalid variant in case of error. @@ -2450,8 +2419,7 @@ Sets the blending mode used for rendering each feature Returns the current blending mode for features %End - virtual QString htmlMetadata() const ${SIP_FINAL}; - + QString htmlMetadata() const final; void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ); %Docstring @@ -2493,11 +2461,9 @@ Sets the attribute table configuration object. This defines the appearance of the attribute table. %End - virtual QgsExpressionContext createExpressionContext() const ${SIP_FINAL}; - - - virtual QgsExpressionContextScope *createExpressionContextScope() const ${SIP_FINAL} /Factory/; + QgsExpressionContext createExpressionContext() const final; + QgsExpressionContextScope *createExpressionContextScope() const final /Factory/; QgsEditFormConfig editFormConfig() const; %Docstring @@ -2916,13 +2882,11 @@ Emitted when the feature count for symbols on this layer has been recalculated. %End protected: - virtual void setExtent( const QgsRectangle &rect ) ${SIP_FINAL}; - + void setExtent( const QgsRectangle &rect ) final; %Docstring Sets the extent %End - virtual void setExtent3D( const QgsBox3D &rect ) ${SIP_FINAL}; - + void setExtent3D( const QgsBox3D &rect ) final; %Docstring Sets the extent %End diff --git a/python/core/auto_generated/vectortile/qgsvectortilelayer.sip.in b/python/core/auto_generated/vectortile/qgsvectortilelayer.sip.in index 08970aeb58b6..6583233018be 100644 --- a/python/core/auto_generated/vectortile/qgsvectortilelayer.sip.in +++ b/python/core/auto_generated/vectortile/qgsvectortilelayer.sip.in @@ -137,10 +137,8 @@ Ownership of the ``subLayers`` is transferrred to the caller. virtual QString loadDefaultMetadata( bool &resultFlag /Out/ ); - virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - - virtual QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL}; - + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; virtual QString htmlMetadata() const; diff --git a/python/gui/auto_generated/history/qgshistoryentrynode.sip.in b/python/gui/auto_generated/history/qgshistoryentrynode.sip.in index 739da20f5b64..c9f804a7b0eb 100644 --- a/python/gui/auto_generated/history/qgshistoryentrynode.sip.in +++ b/python/gui/auto_generated/history/qgshistoryentrynode.sip.in @@ -144,8 +144,7 @@ Removes the child at the specified ``index``. Clears the group, removing all its children. %End - virtual int childCount() const ${SIP_FINAL}; - + int childCount() const final; protected: diff --git a/python/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in b/python/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in index 74728072657a..11e846af7484 100644 --- a/python/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in +++ b/python/gui/auto_generated/mesh/qgsmeshlayerproperties.sip.in @@ -61,12 +61,9 @@ Saves a style when appriate button is pressed %End protected slots: - virtual void syncToLayer() ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void syncToLayer() final; + void apply() final; + void rollback() final; }; diff --git a/python/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in b/python/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in index 1f7baec6fedb..f5de3be4e4bf 100644 --- a/python/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in +++ b/python/gui/auto_generated/raster/qgsrasterlayerproperties.sip.in @@ -34,8 +34,7 @@ Constructor :param fl: windows flag %End - virtual void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) ${SIP_FINAL}; - + void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) final; virtual QgsExpressionContext createExpressionContext() const; @@ -53,12 +52,9 @@ Saves the default style when appropriate button is pressed %End protected slots: - virtual void optionsStackedWidget_CurrentChanged( int index ) ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void optionsStackedWidget_CurrentChanged( int index ) final; + void apply() final; + void rollback() final; }; /************************************************************************ diff --git a/python/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in b/python/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in index 83c348907051..be4431f85fc3 100644 --- a/python/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in +++ b/python/gui/auto_generated/vector/qgsvectorlayerproperties.sip.in @@ -26,12 +26,9 @@ class QgsVectorLayerProperties : QgsLayerPropertiesDialog protected slots: void optionsStackedWidget_CurrentChanged( int index ) final; - virtual void syncToLayer() ${SIP_FINAL}; - - virtual void apply() ${SIP_FINAL}; - - virtual void rollback() ${SIP_FINAL}; - + void syncToLayer() final; + void apply() final; + void rollback() final; signals: diff --git a/scripts/sipify.py b/scripts/sipify.py index 40d8545c4b34..46fd85a33b7b 100755 --- a/scripts/sipify.py +++ b/scripts/sipify.py @@ -2387,9 +2387,6 @@ def cpp_to_python_signature(cpp_function: str) -> str: ) CONTEXT.current_line = re.sub(r"\s*\boverride\b", "", CONTEXT.current_line) CONTEXT.current_line = re.sub(r"\s*\bSIP_MAKE_PRIVATE\b", "", CONTEXT.current_line) - CONTEXT.current_line = re.sub( - r"\s*\bFINAL\b", " ${SIP_FINAL}", CONTEXT.current_line - ) CONTEXT.current_line = re.sub(r"\s*\bextern \b", "", CONTEXT.current_line) CONTEXT.current_line = re.sub(r"\s*\bMAYBE_UNUSED \b", "", CONTEXT.current_line) CONTEXT.current_line = re.sub(r"\s*\bNODISCARD \b", "", CONTEXT.current_line) diff --git a/src/analysis/vector/geometry_checker/qgssinglegeometrycheck.h b/src/analysis/vector/geometry_checker/qgssinglegeometrycheck.h index 81b1d503d609..708f8d72dbb3 100644 --- a/src/analysis/vector/geometry_checker/qgssinglegeometrycheck.h +++ b/src/analysis/vector/geometry_checker/qgssinglegeometrycheck.h @@ -154,7 +154,7 @@ class ANALYSIS_EXPORT QgsSingleGeometryCheck : public QgsGeometryCheck : QgsGeometryCheck( context, configuration ) {} - void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = nullptr, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const FINAL; + void collectErrors( const QMap &featurePools, QList &errors, QStringList &messages, QgsFeedback *feedback = nullptr, const QgsGeometryCheck::LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const final; /** * Check the \a geometry for errors. It may make use of \a configuration options. diff --git a/src/app/annotations/qgsannotationlayerproperties.h b/src/app/annotations/qgsannotationlayerproperties.h index 782b82c189e4..e80b890b23c8 100644 --- a/src/app/annotations/qgsannotationlayerproperties.h +++ b/src/app/annotations/qgsannotationlayerproperties.h @@ -39,15 +39,15 @@ class APP_EXPORT QgsAnnotationLayerProperties : public QgsLayerPropertiesDialog, ~QgsAnnotationLayerProperties() override; private slots: - void apply() FINAL; - void rollback() FINAL; + void apply() final; + void rollback() final; void aboutToShowStyleMenu(); void showHelp(); void crsChanged( const QgsCoordinateReferenceSystem &crs ); private: - void syncToLayer() FINAL; + void syncToLayer() final; private: QgsAnnotationLayer *mLayer = nullptr; diff --git a/src/app/pointcloud/qgspointcloudlayerproperties.h b/src/app/pointcloud/qgspointcloudlayerproperties.h index 9766845513f0..89aa97c0c6a5 100644 --- a/src/app/pointcloud/qgspointcloudlayerproperties.h +++ b/src/app/pointcloud/qgspointcloudlayerproperties.h @@ -91,8 +91,8 @@ class APP_EXPORT QgsPointCloudLayerProperties : public QgsLayerPropertiesDialog, QgsPointCloudLayerProperties( QgsPointCloudLayer *lyr, QgsMapCanvas *canvas, QgsMessageBar *messageBar, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags ); private slots: - void apply() FINAL; - void rollback() FINAL; + void apply() final; + void rollback() final; void aboutToShowStyleMenu(); void showHelp(); @@ -100,7 +100,7 @@ class APP_EXPORT QgsPointCloudLayerProperties : public QgsLayerPropertiesDialog, void crsChanged( const QgsCoordinateReferenceSystem &crs ); private: - void syncToLayer() FINAL; + void syncToLayer() final; private: QgsPointCloudLayer *mLayer = nullptr; diff --git a/src/app/tiledscene/qgstiledscenelayerproperties.h b/src/app/tiledscene/qgstiledscenelayerproperties.h index fbcf0b7a697c..9f268acc2b3d 100644 --- a/src/app/tiledscene/qgstiledscenelayerproperties.h +++ b/src/app/tiledscene/qgstiledscenelayerproperties.h @@ -31,9 +31,9 @@ class APP_EXPORT QgsTiledSceneLayerProperties : public QgsLayerPropertiesDialog, QgsTiledSceneLayerProperties( QgsTiledSceneLayer *layer, QgsMapCanvas *canvas, QgsMessageBar *messageBar, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags ); protected slots: - void syncToLayer() FINAL; - void apply() FINAL; - void rollback() FINAL; + void syncToLayer() final; + void apply() final; + void rollback() final; private slots: void aboutToShowStyleMenu(); diff --git a/src/core/mesh/qgsmeshlayer.h b/src/core/mesh/qgsmeshlayer.h index 49c22a1e6ac1..6481389d25eb 100644 --- a/src/core/mesh/qgsmeshlayer.h +++ b/src/core/mesh/qgsmeshlayer.h @@ -195,7 +195,7 @@ class CORE_EXPORT QgsMeshLayer : public QgsMapLayer, public QgsAbstractProfileSo QString htmlMetadata() const override; bool isEditable() const override; bool supportsEditing() const override; - QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL; + QString loadDefaultStyle( bool &resultFlag SIP_OUT ) final; //! Returns the provider type for this layer QString providerType() const; diff --git a/src/core/pointcloud/qgspointcloudlayer.h b/src/core/pointcloud/qgspointcloudlayer.h index befa734dd14d..3751464ed4dc 100644 --- a/src/core/pointcloud/qgspointcloudlayer.h +++ b/src/core/pointcloud/qgspointcloudlayer.h @@ -145,17 +145,17 @@ class CORE_EXPORT QgsPointCloudLayer : public QgsMapLayer, public QgsAbstractPro bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) override; - bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) FINAL; + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const override; - bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const FINAL; + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; void setTransformContext( const QgsCoordinateTransformContext &transformContext ) override; QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const override; QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const override; - QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL; + QString loadDefaultStyle( bool &resultFlag SIP_OUT ) final; QString htmlMetadata() const override; QgsMapLayerElevationProperties *elevationProperties() override; diff --git a/src/core/qgis.h b/src/core/qgis.h index c7c19ce9436b..1313b90b4188 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -6720,10 +6720,6 @@ typedef unsigned long long qgssize; #define MAYBE_UNUSED #endif -#ifndef FINAL -#define FINAL final -#endif - #ifndef SIP_RUN #ifdef _MSC_VER #define BUILTIN_UNREACHABLE \ diff --git a/src/core/qgis_sip.h b/src/core/qgis_sip.h index e95515faae19..cc247d3e874a 100644 --- a/src/core/qgis_sip.h +++ b/src/core/qgis_sip.h @@ -231,17 +231,6 @@ */ #define SIP_TYPEHINT(type) -/* - * Sip supports the final keyword since version 4.19.0, earlier than that - * we will have build issues because it tries to override final methods. - */ -#if SIP_VERSION < 0x041300 -#if defined FINAL -#undef FINAL -#endif -#define FINAL override -#endif - /* * Define Python special method (bool, repr, etc.) using the given method or code * sipify.py will create a dedicated python file named according to the class diff --git a/src/core/qgsfeature.h b/src/core/qgsfeature.h index 0056d0489a04..7cd01efb394c 100644 --- a/src/core/qgsfeature.h +++ b/src/core/qgsfeature.h @@ -56,11 +56,6 @@ class QgsSymbol; */ class CORE_EXPORT QgsFeature { -#ifdef SIP_RUN -#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01) -#define sipType_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant)) -#endif -#endif Q_GADGET Q_PROPERTY( QgsFeatureId id READ id WRITE setId ) diff --git a/src/core/qgspropertycollection.h b/src/core/qgspropertycollection.h index f19da72a1952..bfedd2b66ac7 100644 --- a/src/core/qgspropertycollection.h +++ b/src/core/qgspropertycollection.h @@ -502,7 +502,7 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect /** * Removes all collections from the stack. */ - void clear() FINAL; + void clear() final; /** * Appends a collection to the end of the stack, and transfers ownership of the collection to the stack. Properties diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index 873dbb12b197..2a4d10d94638 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -381,8 +381,8 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer, public QgsAbstractProfile */ double rasterUnitsPerPixelY() const; - void setOpacity( double opacity ) FINAL; - double opacity() const FINAL; + void setOpacity( double opacity ) final; + double opacity() const final; /** * \brief Set contrast enhancement algorithm diff --git a/src/core/symbology/qgsfillsymbollayer.h b/src/core/symbology/qgsfillsymbollayer.h index 65f8a944a247..974ccea44ca1 100644 --- a/src/core/symbology/qgsfillsymbollayer.h +++ b/src/core/symbology/qgsfillsymbollayer.h @@ -2325,7 +2325,7 @@ class CORE_EXPORT QgsRandomMarkerFillSymbolLayer : public QgsFillSymbolLayer QColor color() const override; QgsSymbol *subSymbol() override; - bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL; + bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) final; void setOutputUnit( Qgis::RenderUnit unit ) override; Qgis::RenderUnit outputUnit() const override; @@ -2509,7 +2509,7 @@ class CORE_EXPORT QgsCentroidFillSymbolLayer : public QgsFillSymbolLayer void setColor( const QColor &color ) override; QColor color() const override; QgsSymbol *subSymbol() override; - bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) FINAL; + bool setSubSymbol( QgsSymbol *symbol SIP_TRANSFER ) final; void setOutputUnit( Qgis::RenderUnit unit ) override; Qgis::RenderUnit outputUnit() const override; bool usesMapUnits() const override; diff --git a/src/core/symbology/qgslinesymbollayer.h b/src/core/symbology/qgslinesymbollayer.h index dc13c5506957..b4cb11768eed 100644 --- a/src/core/symbology/qgslinesymbollayer.h +++ b/src/core/symbology/qgslinesymbollayer.h @@ -803,11 +803,11 @@ class CORE_EXPORT QgsTemplatedLineSymbolLayerBase : public QgsLineSymbolLayer const QgsMapUnitScale &averageAngleMapUnitScale() const { return mAverageAngleLengthMapUnitScale; } void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) override; - void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) FINAL; - Qgis::RenderUnit outputUnit() const FINAL; + void renderPolygonStroke( const QPolygonF &points, const QVector *rings, QgsSymbolRenderContext &context ) final; + Qgis::RenderUnit outputUnit() const final; void setOutputUnit( Qgis::RenderUnit unit ) override; - void setMapUnitScale( const QgsMapUnitScale &scale ) FINAL; - QgsMapUnitScale mapUnitScale() const FINAL; + void setMapUnitScale( const QgsMapUnitScale &scale ) final; + QgsMapUnitScale mapUnitScale() const final; QVariantMap properties() const override; bool canCauseArtifactsBetweenAdjacentTiles() const override; diff --git a/src/core/tiledscene/qgstiledscenelayer.h b/src/core/tiledscene/qgstiledscenelayer.h index eee19efd2969..47753b866c7c 100644 --- a/src/core/tiledscene/qgstiledscenelayer.h +++ b/src/core/tiledscene/qgstiledscenelayer.h @@ -102,14 +102,14 @@ class CORE_EXPORT QgsTiledSceneLayer : public QgsMapLayer bool writeXml( QDomNode &layerNode, QDomDocument &doc, const QgsReadWriteContext &context ) const override; bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) override; - bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) FINAL; + bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) final; bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const override; - bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const FINAL; + bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const final; void setTransformContext( const QgsCoordinateTransformContext &transformContext ) override; QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const override; QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const override; - QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL; + QString loadDefaultStyle( bool &resultFlag SIP_OUT ) final; QString htmlMetadata() const override; QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) override SIP_FACTORY; QString loadDefaultMetadata( bool &resultFlag SIP_OUT ) override; diff --git a/src/core/vector/qgsvectorlayer.h b/src/core/vector/qgsvectorlayer.h index 725e53fc6e19..6160e8dcf7d9 100644 --- a/src/core/vector/qgsvectorlayer.h +++ b/src/core/vector/qgsvectorlayer.h @@ -660,10 +660,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ QString displayExpression() const; - bool hasMapTips() const FINAL; + bool hasMapTips() const final; - QgsVectorDataProvider *dataProvider() FINAL; - const QgsVectorDataProvider *dataProvider() const FINAL SIP_SKIP; + QgsVectorDataProvider *dataProvider() final; + const QgsVectorDataProvider *dataProvider() const final SIP_SKIP; QgsMapLayerSelectionProperties *selectionProperties() override; QgsMapLayerTemporalProperties *temporalProperties() override; QgsMapLayerElevationProperties *elevationProperties() override; @@ -717,7 +717,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \param layers set of QgsMapLayerDependency. Only user-defined dependencies will be added * \returns FALSE if a dependency cycle has been detected */ - bool setDependencies( const QSet &layers ) FINAL; + bool setDependencies( const QSet &layers ) final; /** * Gets the list of dependencies. This includes data dependencies set by the user (\see setDataDependencies) @@ -725,7 +725,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * * \returns a set of QgsMapLayerDependency */ - QSet dependencies() const FINAL; + QSet dependencies() const final; /** * Add a new field which is calculated by the expression specified @@ -984,30 +984,30 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte Q_INVOKABLE Qgis::GeometryType geometryType() const; //! Returns the WKBType or WKBUnknown in case of error - Q_INVOKABLE Qgis::WkbType wkbType() const FINAL; + Q_INVOKABLE Qgis::WkbType wkbType() const final; - QgsCoordinateReferenceSystem sourceCrs() const FINAL; - QString sourceName() const FINAL; + QgsCoordinateReferenceSystem sourceCrs() const final; + QString sourceName() const final; /** * Reads vector layer specific state from project file Dom node. * \note Called by QgsMapLayer::readXml(). */ - bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) FINAL; + bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) final; /** * Writes vector layer specific state to project file Dom node. * \note Called by QgsMapLayer::writeXml(). */ - bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const FINAL; + bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const final; - QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const FINAL; - QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const FINAL; + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; /** * Resolves references to other layers (kept as layer IDs after reading XML) into layer objects. */ - void resolveReferences( QgsProject *project ) FINAL; + void resolveReferences( QgsProject *project ) final; /** * Loads the auxiliary layer for this vector layer. If there's no @@ -1046,13 +1046,13 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte const QgsAuxiliaryLayer *auxiliaryLayer() const SIP_SKIP; bool readSymbology( const QDomNode &layerNode, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL; + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; bool readStyle( const QDomNode &node, QString &errorMessage, - QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL; + QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) final; bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL; + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, - const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL; + const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const final; /** * Writes the symbology of the layer into the document provided in SLD 1.1 format @@ -1064,7 +1064,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const; - bool readSld( const QDomNode &node, QString &errorMessage ) FINAL; + bool readSld( const QDomNode &node, QString &errorMessage ) final; /** * Number of features rendered with specified legend key. Features must be first @@ -1091,9 +1091,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * * \since QGIS 3.4 */ - Qgis::FeatureAvailability hasFeatures() const FINAL; + Qgis::FeatureAvailability hasFeatures() const final; - QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL; + QString loadDefaultStyle( bool &resultFlag SIP_OUT ) final; /** * Count features for symbols. @@ -1129,7 +1129,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \param request feature request describing parameters of features to return * \returns iterator for matching features from provider */ - QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const FINAL; + QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const final; /** * Queries the layer for features matching a given expression. @@ -1172,7 +1172,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte return getFeatures( QgsFeatureRequest( rectangle ) ); } - bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL; + bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; /** * Updates an existing \a feature in the layer, replacing the attributes and geometry for the feature @@ -1625,10 +1625,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte void setLabeling( QgsAbstractVectorLayerLabeling *labeling SIP_TRANSFER ); //! Returns TRUE if the provider is in editing mode - bool isEditable() const FINAL; + bool isEditable() const final; //! Returns TRUE if this is a geometry layer and FALSE in case of NoGeometry (table only) or UnknownGeometry - bool isSpatial() const FINAL; + bool isSpatial() const final; //! Returns TRUE if the provider has been modified since the last commit bool isModified() const override; @@ -1641,18 +1641,18 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte bool isAuxiliaryField( int index, int &srcIndex ) const; //! Synchronises with changes in the datasource - void reload() FINAL; + void reload() final; /** * Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context */ - QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) FINAL SIP_FACTORY; + QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) final SIP_FACTORY; - QgsRectangle extent() const FINAL; - QgsRectangle sourceExtent() const FINAL; + QgsRectangle extent() const final; + QgsRectangle sourceExtent() const final; - QgsBox3D extent3D() const FINAL; - QgsBox3D sourceExtent3D() const FINAL; + QgsBox3D extent3D() const final; + QgsBox3D sourceExtent3D() const final; /** * Returns the list of fields of this layer. @@ -1660,7 +1660,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * * \returns A list of fields */ - QgsFields fields() const FINAL; + QgsFields fields() const final; /** * Returns list of attribute indexes. i.e. a list from 0 ... fieldCount() @@ -1677,7 +1677,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * If you need only the count of committed features call this method on this layer's provider. * \returns the number of features on this layer or -1 if unknown. */ - long long featureCount() const FINAL; + long long featureCount() const final; /** * Makes layer read-only (editing disabled) or not @@ -1937,7 +1937,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ bool deleteAttributes( const QList &attrs ); - bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL; + bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) final; /** * Deletes a feature from the layer (but does not commit it). @@ -2221,7 +2221,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \see minimumValue() * \see maximumValue() */ - QSet uniqueValues( int fieldIndex, int limit = -1 ) const FINAL; + QSet uniqueValues( int fieldIndex, int limit = -1 ) const final; /** * Returns unique string values of an attribute which contain a specified subset string. Subset @@ -2253,7 +2253,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \see minimumAndMaximumValue() * \see uniqueValues() */ - QVariant minimumValue( int index ) const FINAL; + QVariant minimumValue( int index ) const final; /** * Returns the maximum value for an attribute column or an invalid variant in case of error. @@ -2269,7 +2269,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \see minimumAndMaximumValue() * \see uniqueValues() */ - QVariant maximumValue( int index ) const FINAL; + QVariant maximumValue( int index ) const final; /** @@ -2320,7 +2320,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte //! Returns the current blending mode for features QPainter::CompositionMode featureBlendMode() const; - QString htmlMetadata() const FINAL; + QString htmlMetadata() const final; /** * Sets the simplification settings for fast rendering of features @@ -2358,9 +2358,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ void setAttributeTableConfig( const QgsAttributeTableConfig &attributeTableConfig ); - QgsExpressionContext createExpressionContext() const FINAL; + QgsExpressionContext createExpressionContext() const final; - QgsExpressionContextScope *createExpressionContextScope() const FINAL SIP_FACTORY; + QgsExpressionContextScope *createExpressionContextScope() const final SIP_FACTORY; /** * Returns the configuration of the form used to represent this vector layer. @@ -2788,9 +2788,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte protected: //! Sets the extent - void setExtent( const QgsRectangle &rect ) FINAL; + void setExtent( const QgsRectangle &rect ) final; //! Sets the extent - void setExtent3D( const QgsBox3D &rect ) FINAL; + void setExtent3D( const QgsBox3D &rect ) final; private slots: void invalidateSymbolCountedFlag(); @@ -2815,7 +2815,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte * \see setReadOnly() * \see readOnlyChanged() */ - bool isReadOnly() const FINAL; + bool isReadOnly() const final; /** * Bind layer to a specific data provider diff --git a/src/core/vectortile/qgsvectortilelayer.h b/src/core/vectortile/qgsvectortilelayer.h index 6208a1d0be74..88aa3f8cdf5e 100644 --- a/src/core/vectortile/qgsvectortilelayer.h +++ b/src/core/vectortile/qgsvectortilelayer.h @@ -169,8 +169,8 @@ class CORE_EXPORT QgsVectorTileLayer : public QgsMapLayer QString loadDefaultMetadata( bool &resultFlag SIP_OUT ) override; - QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const FINAL; - QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const FINAL; + QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const final; + QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const final; QString htmlMetadata() const override; // new methods diff --git a/src/gui/history/qgshistoryentrynode.h b/src/gui/history/qgshistoryentrynode.h index fa441342a31c..871e63fd350f 100644 --- a/src/gui/history/qgshistoryentrynode.h +++ b/src/gui/history/qgshistoryentrynode.h @@ -168,7 +168,7 @@ class GUI_EXPORT QgsHistoryEntryGroup : public QgsHistoryEntryNode */ void clear(); - int childCount() const FINAL; + int childCount() const final; protected: std::deque> mChildren SIP_SKIP; diff --git a/src/gui/maptools/qgsmaptooldigitizefeature.h b/src/gui/maptools/qgsmaptooldigitizefeature.h index a85c02948462..6f7053db77a1 100644 --- a/src/gui/maptools/qgsmaptooldigitizefeature.h +++ b/src/gui/maptools/qgsmaptooldigitizefeature.h @@ -96,7 +96,7 @@ class GUI_EXPORT QgsMapToolDigitizeFeature : public QgsMapToolCaptureLayerGeomet * Called when the feature has been digitized. * \param geometry the digitized geometry */ - void layerGeometryCaptured( const QgsGeometry &geometry ) FINAL; + void layerGeometryCaptured( const QgsGeometry &geometry ) final; /** * Called when the feature has been digitized diff --git a/src/gui/mesh/qgsmeshlayerproperties.h b/src/gui/mesh/qgsmeshlayerproperties.h index 7f8b8a918d0f..2c7f7143572f 100644 --- a/src/gui/mesh/qgsmeshlayerproperties.h +++ b/src/gui/mesh/qgsmeshlayerproperties.h @@ -75,9 +75,9 @@ class GUI_EXPORT QgsMeshLayerProperties : public QgsLayerPropertiesDialog, priva Q_DECL_DEPRECATED void saveStyleAs() SIP_DEPRECATED; protected slots: - void syncToLayer() FINAL; - void apply() FINAL; - void rollback() FINAL; + void syncToLayer() final; + void apply() final; + void rollback() final; private slots: diff --git a/src/gui/raster/qgsrasterlayerproperties.h b/src/gui/raster/qgsrasterlayerproperties.h index 70902c4f2d81..c821cc0ac3f5 100644 --- a/src/gui/raster/qgsrasterlayerproperties.h +++ b/src/gui/raster/qgsrasterlayerproperties.h @@ -81,7 +81,7 @@ class GUI_EXPORT QgsRasterLayerProperties : public QgsLayerPropertiesDialog, pri */ QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *canvas, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags ); - void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) FINAL; + void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory ) final; QgsExpressionContext createExpressionContext() const override; @@ -95,9 +95,9 @@ class GUI_EXPORT QgsRasterLayerProperties : public QgsLayerPropertiesDialog, pri Q_DECL_DEPRECATED void saveDefaultStyle() SIP_DEPRECATED; protected slots: - void optionsStackedWidget_CurrentChanged( int index ) FINAL; - void apply() FINAL; - void rollback() FINAL; + void optionsStackedWidget_CurrentChanged( int index ) final; + void apply() final; + void rollback() final; private: // TODO -- consider moving these to a common raster widget base class @@ -172,7 +172,7 @@ class GUI_EXPORT QgsRasterLayerProperties : public QgsLayerPropertiesDialog, pri void aboutToShowStyleMenu(); //! Make GUI reflect the layer's state - void syncToLayer() FINAL; + void syncToLayer() final; // Update the preview of the map tip void updateMapTipPreview(); diff --git a/src/gui/vector/qgsvectorlayerproperties.h b/src/gui/vector/qgsvectorlayerproperties.h index 2a5cdc4f4e35..d6471133692e 100644 --- a/src/gui/vector/qgsvectorlayerproperties.h +++ b/src/gui/vector/qgsvectorlayerproperties.h @@ -65,9 +65,9 @@ class GUI_EXPORT QgsVectorLayerProperties : public QgsLayerPropertiesDialog, pri protected slots: void optionsStackedWidget_CurrentChanged( int index ) final; - void syncToLayer() FINAL; - void apply() FINAL; - void rollback() FINAL; + void syncToLayer() final; + void apply() final; + void rollback() final; private slots: diff --git a/src/gui/vectortile/qgsvectortilelayerproperties.h b/src/gui/vectortile/qgsvectortilelayerproperties.h index 1af87376f2e2..4b0bd18105b6 100644 --- a/src/gui/vectortile/qgsvectortilelayerproperties.h +++ b/src/gui/vectortile/qgsvectortilelayerproperties.h @@ -64,14 +64,14 @@ class GUI_EXPORT QgsVectorTileLayerProperties : public QgsLayerPropertiesDialog, Q_DECL_DEPRECATED void saveStyleAs() SIP_DEPRECATED; private slots: - void apply() FINAL; + void apply() final; void aboutToShowStyleMenu(); void showHelp(); void crsChanged( const QgsCoordinateReferenceSystem &crs ); private: - void syncToLayer() FINAL; + void syncToLayer() final; private: QgsVectorTileLayer *mLayer = nullptr; diff --git a/src/python/qgspythonutilsimpl.cpp b/src/python/qgspythonutilsimpl.cpp index 14facb8ea425..cb44ae79fc95 100644 --- a/src/python/qgspythonutilsimpl.cpp +++ b/src/python/qgspythonutilsimpl.cpp @@ -43,9 +43,7 @@ QgsPythonUtilsImpl::QgsPythonUtilsImpl() QgsPythonUtilsImpl::~QgsPythonUtilsImpl() { -#if SIP_VERSION >= 0x40e06 exitPython(); -#endif } bool QgsPythonUtilsImpl::checkSystemImports()