summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-11 16:30:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-11 16:42:11 +0000
commit1bb4368a420ef12e3714bd4edfff34b8b3c983a8 (patch)
tree9f9b5aa642f42c7780d1706ce451ae9f12caae9d
parentd8e9469523019a9438701616cdf59cc12cb4ef61 (diff)
shiboken: Suppress warnings about deprecated code in Qt
Always generate QT_WARNING_DISABLE_DEPRECATED into Qt wrappers, silencing any deprecation warnings. Change-Id: I621ee357e6eddaee52dbb8ea12fe6dee8b588bec Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 20030bcd..7fea87c1 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -369,6 +369,9 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext)
if (metaClass->typeEntry()->typeFlags() & ComplexTypeEntry::Deprecated)
s << "#Deprecated" << endl;
+ if (usePySideExtensions())
+ s << "\nQT_WARNING_DISABLE_DEPRECATED\n";
+
// Use class base namespace
{
const AbstractMetaClass *context = metaClass->enclosingClass();