From d41b912b73f82eb42bb7710ff831e676f4c7e51f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 11 Mar 2019 16:48:09 +0100 Subject: shiboken: Generate deprecation information for functions and classes Add a deprecation note to deprecated functions and classes. There is a standard deprecated directive, but it takes the version as a mandatory parameter, which we are unable to obtain from Clang. Change-Id: Ice27b297fbd86def41d99b0f3505551ed301077f Reviewed-by: Cristian Maureira-Fredes --- sources/shiboken2/ApiExtractor/abstractmetalang.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sources/shiboken2/ApiExtractor') diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp index 5940aa86a..95f8048cd 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp @@ -1285,6 +1285,8 @@ void AbstractMetaFunction::formatDebugVerbose(QDebug &d) const d << " [userAdded]"; if (m_explicit) d << " [explicit]"; + if (attributes().testFlag(AbstractMetaAttributes::Deprecated)) + d << " [deprecated]"; if (m_pointerOperator) d << " [operator->]"; if (m_isCallOperator) @@ -2637,6 +2639,8 @@ QDebug operator<<(QDebug d, const AbstractMetaClass *ac) d << '"' << ac->fullName() << '"'; if (ac->attributes() & AbstractMetaAttributes::FinalCppClass) d << " [final]"; + if (ac->attributes().testFlag(AbstractMetaAttributes::Deprecated)) + d << " [deprecated]"; if (ac->m_baseClass) d << ", inherits \"" << ac->m_baseClass->name() << '"'; if (ac->m_templateBaseClass) -- cgit v1.2.3