From 75c2618effc06ccfdd3990dcd4e7c8e63aef17e6 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann Date: Fri, 12 Mar 2021 17:06:47 +0100 Subject: [PATCH] Qmake: Introduce Qt deprecation macros As the minimum build requirements are now Qt 5.9, enable the QT_DEPRECATED_SINCE macro and set the deprecation target to 5.9 and earlier. This will make our build fail if functions deprecated in Qt 5.9 or earlier are used. Also, enable the QT_DEPRECATED_WARNINGS macro so our build system warns us when we are using functions deprecated in newer versions of Qt so we can port away from those too. --- config.pri | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.pri b/config.pri index 64b23da4..3b14f8c2 100644 --- a/config.pri +++ b/config.pri @@ -39,6 +39,9 @@ minQtVersion(6, 0, 0) { error(YACReader does not support building with Qt6 (yet)) } +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050900 +DEFINES += QT_DEPRECATED_WARNINGS + # reduce log pollution CONFIG += silent