Skip to content
Permalink
Browse files

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.
  • Loading branch information
m-kuhn committed Apr 19, 2016
1 parent 69153ab commit 340f0f2754de213d9144d4f5afa2c7c0c799ad50
Showing with 8 additions and 1 deletion.
  1. +5 −0 CMakeLists.txt
  2. +1 −0 ci/travis/linux/qt5/install.sh
  3. +2 −1 src/core/qgsmaprenderercustompainterjob.cpp
@@ -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 )

0 comments on commit 340f0f2

Please sign in to comment.
You can’t perform that action at this time.