diff options
-rw-r--r-- | sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 8 | ||||
-rw-r--r-- | sources/shiboken2/ApiExtractor/messages.cpp | 20 |
2 files changed, 15 insertions, 13 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 9331259ca..19e571169 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -4402,7 +4402,7 @@ s1.addTransition(button.clicked, s1h)</code> <suppress-warning text="unhandled enum value: (sizeof(void*)<<3) in QSysInfo::Sizes"/> <suppress-warning text="unmatched enum ~0u"/> <suppress-warning text="unmatched enum (sizeof(void*)<<3)"/> - <suppress-warning text="signature 'setCustomType(float)' for function modification in 'QEasingCurve' not found. Possible candidates: setCustomType(double) in QEasingCurve"/> + <suppress-warning text="^signature 'setCustomType(float)' for function modification in 'QEasingCurve' not found.*$"/> <suppress-warning text="enum 'enum_4' does not have a type entry or is not an enum" /> <suppress-warning text="enum 'enum_5' does not have a type entry or is not an enum" /> <suppress-warning text="enum 'FP_NORMAL' does not have a type entry or is not an enum" /> @@ -4412,11 +4412,11 @@ s1.addTransition(button.clicked, s1h)</code> <suppress-warning text="enum 'PM_MessageBoxHeight' does not have a type entry or is not an enum" /> <!-- this function only exists on Windows --> - <suppress-warning text="signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found. Possible candidates:*"/> + <suppress-warning text="^signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.*"/> <!-- this is necessary to avoid warning on other modules --> - <suppress-warning text="signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found. Possible candidates:*"/> - <suppress-warning text="signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found. Possible candidates:*"/> + <suppress-warning text="^signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found.*"/> + <suppress-warning text="^signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found.*"/> <!-- This enum is intenaly used --> <suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum" /> diff --git a/sources/shiboken2/ApiExtractor/messages.cpp b/sources/shiboken2/ApiExtractor/messages.cpp index c4537ee39..b81585933 100644 --- a/sources/shiboken2/ApiExtractor/messages.cpp +++ b/sources/shiboken2/ApiExtractor/messages.cpp @@ -55,15 +55,17 @@ QString msgNoFunctionForModification(const QString &signature, str << " (specified as '" << originalSignature << "')"; str << " for function modification in '" << className << "' not found."; - if (possibleSignatures.isEmpty()) { - str << " No candidates were found. Member functions: "; - for (int f = 0, size = allFunctions.size(); f < size; ++f) { - if (f) - str << ", "; - str << allFunctions.at(f)->minimalSignature(); - } - } else { - str << " Possible candidates: " << possibleSignatures.join(QLatin1String(", ")); + if (!possibleSignatures.isEmpty()) { + str << "\n Possible candidates:\n"; + for (const auto &s : possibleSignatures) + str << " " << s << '\n'; + } else if (!allFunctions.isEmpty()) { + str << "\n No candidates were found. Member functions:\n"; + const int maxCount = qMin(10, allFunctions.size()); + for (int f = 0; f < maxCount; ++f) + str << " " << allFunctions.at(f)->minimalSignature() << '\n'; + if (maxCount < allFunctions.size()) + str << " ...\n"; } return result; } |