Prevent builds which utilise API deprecated in <= Qt 5.8

Ideally this would be at least 5.9 (the minimum Qt version supported),
but unfortunately the Qwt libraries utilise QString::null in public
headers which was deprecated in Qt 5.9.

I've got a feeling Qwt is going to be a pain point once again when
Qt6 rolls around...
This commit is contained in:
Nyall Dawson 2020-02-07 09:54:53 +10:00
parent aad4e84438
commit 06d4dee523

View File

@ -604,6 +604,10 @@ IF(MSVC)
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF(MSVC)
# Prevent build when Qt api deprecated before this Qt version is used:
# Unfortunately Qwt uses deprecated QString::null in headers, preventing this being raised above 5.8
ADD_DEFINITIONS(-DQT_DISABLE_DEPRECATED_BEFORE=0x050800)
IF(ENABLE_COVERAGE)
INCLUDE("cmake/modules/coverage/CodeCoverage.cmake")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage --coverage")