diff options
-rw-r--r-- | generator/cppgenerator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index 30fe65f1c..979cc532a 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -1833,6 +1833,13 @@ void CppGenerator::writeFunctionCalls(QTextStream& s, const OverloadData& overlo void CppGenerator::writeSingleFunctionCall(QTextStream& s, const OverloadData& overloadData, const AbstractMetaFunction* func) { + if (func->isDeprecated()) { + qDebug() << "DEPRECATED FUNCTION:" << func->signature(); + s << INDENT << "Shiboken::warning(PyExc_DeprecationWarning, 1, \"Function: '" + << func->signature().replace("::", ".") + << "' is marked as deprecated, please check the documentation for more information.\");" << endl; + } + if (func->functionType() == AbstractMetaFunction::EmptyFunction) { s << INDENT << "PyErr_Format(PyExc_TypeError, \"%s is a private method.\", \"" << func->signature().replace("::", ".") << "\");" << endl; s << INDENT << "return " << m_currentErrorCode << ';' << endl; |