diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-02 17:10:32 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-02 17:10:32 -0300 |
commit | cff48628063b8cf145c01a0f84c19fabd75682db (patch) | |
tree | 163131831d13fd56e3c46bc2c3c1c138772d9139 /cppgenerator.cpp | |
parent | ddc5bef058932584f5da644b606fad74707a63c7 (diff) |
Adds support for extensible converters for value type classes.
Value type classes without implicit conversions use the default
implementation provided by ValueTypeConverter. This commit updates
ValueTypeConverter to check for extended conversions, since even a
class without implicit conversions in one module could get some
conversion operators in another.
CppGenerator now writes 'isConvertible' calls to all object and
value types checks leaving the door open to extended conversions.
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r-- | cppgenerator.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 915d0ef79..1480d7d1a 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -1054,9 +1054,7 @@ void CppGenerator::writeInvalidCppObjectCheck(QTextStream& s, QString pyArgName, void CppGenerator::writeTypeCheck(QTextStream& s, const AbstractMetaType* argType, QString argumentName, bool isNumber, QString customType) { - bool writeIsConvertibleCheck = !implicitConversions(argType).isEmpty() - || argType->typeEntry()->isObject() - || argType->isValuePointer(); + bool writeIsConvertibleCheck = argType->typeEntry()->isObject() || argType->typeEntry()->isValue(); if (writeIsConvertibleCheck || isCString(argType) || isPairContainer(argType)) s << '('; |