Skip to content

Commit

Permalink
Prevent builds which utilise API deprecated in <= Qt 5.8
Browse files Browse the repository at this point in the history
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...
  • Loading branch information
nyalldawson committed Feb 8, 2020
1 parent aad4e84 commit 06d4dee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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")
Expand Down

0 comments on commit 06d4dee

Please sign in to comment.