aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/messages.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-13 11:00:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-18 15:45:34 +0100
commitea02836aa048cfdd853122273f25a5a2c2d7d493 (patch)
treeb09c37432409e8fb38bdee669c7747d2c0b89798 /sources/shiboken2/ApiExtractor/messages.cpp
parent688176a3c35f49c7c087ca2f0e8c841e72133176 (diff)
shiboken: Fix crash when smartptr template class cannot be found
shiboken currently crashes when naively trying to use std::shared_ptr since it does not see the template due to system directories being excluded from clang parsing. Add an error message and bail out. Task-number: PYSIDE-454 Change-Id: I6627e968061f8f704a90f898879f3861308e1705 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/messages.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/messages.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/messages.cpp b/sources/shiboken2/ApiExtractor/messages.cpp
index 5b3a57fcc..b571c08b9 100644
--- a/sources/shiboken2/ApiExtractor/messages.cpp
+++ b/sources/shiboken2/ApiExtractor/messages.cpp
@@ -328,6 +328,18 @@ QString msgConversionTypesDiffer(const QString &varType, const QString &conversi
return result;
}
+QString msgCannotFindSmartPointer(const QString &instantiationType,
+ const AbstractMetaClassList &pointers)
+{
+ QString result;
+ QTextStream str(&result);
+ str << "Unable to find smart pointer type for " << instantiationType << " (known types:";
+ for (auto t : pointers)
+ str << ' ' << t->fullName();
+ str << ").";
+ return result;
+}
+
// main.cpp
QString msgLeftOverArguments(const QMap<QString, QString> &remainingArgs)