mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Add a new CMake flag to disable deprecated functionality
Anything which is going to disappear can be #ifdef'd with this definition. This is an additional hint if your 3rd party code is prepared for the next level of QGIS. For a start it's used to disable old labelling which causes deadlocks when used with PyQt5-Python3.
This commit is contained in:
parent
69153ab068
commit
340f0f2754
@ -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
|
||||
|
@ -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" \
|
||||
..
|
||||
|
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user