aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-11 16:48:09 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-13 20:32:11 +0000
commitd41b912b73f82eb42bb7710ff831e676f4c7e51f (patch)
tree5fbe4b0baf8280dc4d3a42febb50e2b99f217059 /sources/shiboken2/ApiExtractor
parent166a9ca4c0a07af94ea72d767ca0e9dd28552786 (diff)
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 <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.cpp4
1 files changed, 4 insertions, 0 deletions
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)