diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-23 14:42:13 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-24 11:25:27 +0200 |
| commit | d9bad33ad2cd0e49e22c82f8d05422274cbbf1c8 (patch) | |
| tree | 69627530b7bf7497ea20577f672cc67be1c554d8 /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | a4c432bc007d515b843b30765dfa0b82851255b9 (diff) | |
shiboken6: Improve message for a mismatched global function
Output a list of candidates with matching name in case some type
was misspelt.
Change-Id: Ie763a912d02907d562f3feeb2eba44e811d80118
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 796d18c4b..d851a02e0 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -311,12 +311,16 @@ QString msgTypeNotDefined(const TypeEntry *entry) } QString msgGlobalFunctionNotDefined(const FunctionTypeEntry *fte, - const QString &signature) + const QString &signature, + const QStringList &candidates) { QString result; QTextStream str(&result); str << fte->sourceLocation() << "Global function '" << signature - << "' is specified in typesystem, but not defined. " << msgCompilationError; + << "' is specified in typesystem, but not defined."; + if (!candidates.isEmpty()) + str << " Candidates are: " << candidates.join(u", "_qs); + str << ' ' << msgCompilationError; return result; } |
