diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-10 16:26:10 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-11 07:57:29 +0200 |
commit | d2bff203f53120c33d79a37b170d2bacc49d67b4 (patch) | |
tree | a972cc86100a9f7546a944807b26bca6af706b00 /sources | |
parent | acaa0e5ce430d87eea1d76620e3b9e3584a55f86 (diff) |
shiboken6: Remove unused arguments from ShibokenGenerator::cpythonIsConvertibleFunction()
Task-number: PYSIDE-1605
Change-Id: Ic94d71d0b09314d4736a77f89b66fddac15febdb
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
3 files changed, 8 insertions, 16 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 1cda61c93..c62c5c384 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -2407,7 +2407,7 @@ void CppGenerator::writeTypeCheck(TextStream &s, AbstractMetaType argType, // TODO-CONVERTER: merge this with the code below. QString typeCheck; if (customCheck.isEmpty()) - typeCheck = cpythonIsConvertibleFunction(argType, argType.isEnum() ? false : isNumber); + typeCheck = cpythonIsConvertibleFunction(argType); else typeCheck = customCheck; typeCheck.append(u'(' +argumentName + u')'); diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp index 3f776f7ad..1a734d1e6 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp @@ -1127,9 +1127,7 @@ ShibokenGenerator::CPythonCheckFunctionResult return result; } -QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type, - bool /* genericNumberType */, - bool /* checkExact */) +QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type) { if (type->isWrapperType()) { QString result = QLatin1String("Shiboken::Conversions::"); @@ -1148,8 +1146,7 @@ QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type, return QString::fromLatin1("Shiboken::Conversions::isPythonToCppConvertible(%1, ") .arg(converterObject(type)); } -QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaType, - bool /* genericNumberType */) const +QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaType) const { if (metaType.typeEntry()->isCustom()) { auto customCheckResult = guessCPythonCheckFunction(metaType.typeEntry()->name()); @@ -1185,10 +1182,9 @@ QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaTyp return result; } -QString ShibokenGenerator::cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg, - bool genericNumberType) const +QString ShibokenGenerator::cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg) const { - return cpythonIsConvertibleFunction(metaArg.type(), genericNumberType); + return cpythonIsConvertibleFunction(metaArg.type()); } QString ShibokenGenerator::cpythonToCppConversionFunction(const AbstractMetaClass *metaClass) diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.h b/sources/shiboken6/generator/shiboken/shibokengenerator.h index 9bb3327ac..414410141 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.h +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.h @@ -255,13 +255,9 @@ protected: std::optional<AbstractMetaType> type; }; static CPythonCheckFunctionResult guessCPythonCheckFunction(const QString &type); - static QString cpythonIsConvertibleFunction(const TypeEntry *type, - bool genericNumberType = false, - bool checkExact = false); - QString cpythonIsConvertibleFunction(AbstractMetaType metaType, - bool genericNumberType = false) const; - QString cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg, - bool genericNumberType = false) const; + static QString cpythonIsConvertibleFunction(const TypeEntry *type); + QString cpythonIsConvertibleFunction(AbstractMetaType metaType) const; + QString cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg) const; static QString cpythonToCppConversionFunction(const AbstractMetaClass *metaClass) ; static QString cpythonToCppConversionFunction(const AbstractMetaType &type, |