diff --git a/CMakeLists.txt b/CMakeLists.txt index f6576dffba1..45f3694ac70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -668,6 +668,11 @@ IF (UNIX AND NOT APPLE) SET (QGIS_MANUAL_DIR ${CMAKE_INSTALL_PREFIX}/${QGIS_MANUAL_SUBDIR}) ENDIF (UNIX AND NOT APPLE) +SET (DISABLE_DEPRECATED ${ENABLE_QT5} CACHE BOOL "If set to true, it will disable deprecated functionality to prepare for the next generation of QGIS") +IF (DISABLE_DEPRECATED) + ADD_DEFINITIONS(-DQGIS_DISABLE_DEPRECATED) +ENDIF (DISABLE_DEPRECATED) + ############################################################# # Python build dependency diff --git a/ci/travis/linux/qt5/install.sh b/ci/travis/linux/qt5/install.sh index 12a5148baa4..e46cdea13ac 100755 --- a/ci/travis/linux/qt5/install.sh +++ b/ci/travis/linux/qt5/install.sh @@ -35,6 +35,7 @@ cmake \ -DWITH_SERVER=ON \ -DENABLE_QT5=ON \ -DENABLE_PYTHON3=ON \ + -DDISABLE_DEPRECATED=ON \ -DPORT_PLUGINS=ON \ -DCXX_EXTRA_FLAGS="$CLANG_WARNINGS" \ .. diff --git a/src/core/qgsmaprenderercustompainterjob.cpp b/src/core/qgsmaprenderercustompainterjob.cpp index 61562737b00..f842a4deda3 100644 --- a/src/core/qgsmaprenderercustompainterjob.cpp +++ b/src/core/qgsmaprenderercustompainterjob.cpp @@ -293,9 +293,10 @@ void QgsMapRendererJob::drawLabeling( const QgsMapSettings& settings, QgsRenderC renderContext.setPainter( painter ); renderContext.setLabelingEngine( labelingEngine ); +#if !defined(QGIS_DISABLE_DEPRECATED) // old labeling - to be removed at some point... drawOldLabeling( settings, renderContext ); - +#endif drawNewLabeling( settings, renderContext, labelingEngine ); if ( labelingEngine2 )