diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-09-05 13:41:43 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-11-02 12:04:19 +0000 |
commit | 8c9037dc83fbdbb0b9913961fbe7f84066630e18 (patch) | |
tree | c68ca10add975adf4dadf669ea5a96b9c5c0f07d /sources/shiboken2/generator/shiboken2/cppgenerator.cpp | |
parent | e30e0c161b2b4d50484314bf006e9e5e8ff6b380 (diff) |
Remove dead / unused code regarding conversions
There's a lot of code that was previously used for doing conversions
between C++ / Python types (apparently relying on extensive
RTTI / typeid manipulations), which got superseded by a cleaner
templated approach.
The old code was left behind, and there were a few instances where it
was still used even though it wasn't needed, like in QtScript
typesystem XML and shiboken's enum handling.
Remove the old code, apply the small changes needed to make it work
with new the code.
This is cleanup to reduce the confusion regarding conversion
behavior, and also preparation for a proper implementation of handling
"void*" types.
Change-Id: I8f16bb31436f9a677bb2d64c7197c4375005b656
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 6cc148140..a2b497132 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -234,7 +234,6 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext) s << "#include <qapp_macro.h>" << endl; } - s << "#include <typeresolver.h>" << endl; s << "#include <typeinfo>" << endl; if (usePySideExtensions() && metaClass->isQObject()) { s << "#include <signalmanager.h>" << endl; @@ -3486,7 +3485,6 @@ void CppGenerator::writeEnumConverterInitialization(QTextStream& s, const TypeEn } s << INDENT << "Shiboken::Enum::setTypeConverter(" << enumPythonType << ", converter);" << endl; - s << INDENT << "Shiboken::Enum::setTypeConverter(" << enumPythonType << ", converter);" << endl; QStringList cppSignature = enumType->qualifiedCppName().split(QLatin1String("::"), QString::SkipEmptyParts); while (!cppSignature.isEmpty()) { QString signature = cppSignature.join(QLatin1String("::")); @@ -5509,24 +5507,6 @@ bool CppGenerator::finishGeneration() cppSignature.removeFirst(); } } - // Register type resolver for all containers found in signals. - QSet<QByteArray> typeResolvers; - foreach (AbstractMetaClass* metaClass, classes()) { - if (!metaClass->isQObject() || !metaClass->typeEntry()->generateCode()) - continue; - foreach (AbstractMetaFunction* func, metaClass->functions()) { - if (func->isSignal()) { - foreach (AbstractMetaArgument* arg, func->arguments()) { - if (arg->type()->isContainer()) { - QString value = translateType(arg->type(), metaClass, ExcludeConst | ExcludeReference); - if (value.startsWith(QLatin1String("::"))) - value.remove(0, 2); - typeResolvers << QMetaObject::normalizedType(value.toUtf8().constData()); - } - } - } - } - } s << endl; if (maxTypeIndex) |