aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/messages.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-23 07:58:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-23 15:21:26 +0200
commitff94459c809e2ccd13e6d669b053667d35b3e571 (patch)
tree288d92c99176db334fa5e2f3ae449b248ac3a27c /sources/shiboken2/ApiExtractor/messages.h
parent443d3d036b062fddec85d8258f9af3852fdfd173 (diff)
shiboken2: Add file location to more warnings
Output most warnings in the standard file:line syntax used by compilers. This is done for C++ source code and typesystem files. Introduce a class SourceLocation and add it to type entry, AbstractMetaFunction and AbstractMetaClass. Move more messages into messages.cpp and output the location. Change the errors reported by the XML typesystem parser to the same format. [ChangeLog][shiboken] A number of error and warning messages have been prefixed by file name and line for better tooling. Task-number: PYSIDE-904 Change-Id: Ie2008f4060757e9d7ca1b25c00c7c5585240a7b8 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/messages.h')
-rw-r--r--sources/shiboken2/ApiExtractor/messages.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/messages.h b/sources/shiboken2/ApiExtractor/messages.h
index 3934c35b3..72484050a 100644
--- a/sources/shiboken2/ApiExtractor/messages.h
+++ b/sources/shiboken2/ApiExtractor/messages.h
@@ -37,6 +37,8 @@
#include <QtCore/QString>
#include <QtCore/QVector>
+class EnumTypeEntry;
+class FunctionTypeEntry;
class TypeEntry;
class TypeInfo;
struct TypeRejection;
@@ -52,9 +54,9 @@ QString msgAddedFunctionInvalidArgType(const QString &addedFuncName,
QString msgAddedFunctionInvalidReturnType(const QString &addedFuncName,
const QString &typeName, const QString &why);
-QString msgNoFunctionForModification(const QString &signature,
+QString msgNoFunctionForModification(const AbstractMetaClass *klass,
+ const QString &signature,
const QString &originalSignature,
- const QString &className,
const QStringList &possibleSignatures,
const AbstractMetaFunctionList &allFunctions);
@@ -66,6 +68,9 @@ QString msgNoEnumTypeConflict(const EnumModelItem &enumItem,
const QString &className,
const TypeEntry *t);
+QString msgNamespaceNoTypeEntry(const NamespaceModelItem &item,
+ const QString &fullName);
+
QString msgAmbiguousVaryingTypesFound(const QString &qualifiedName, const TypeEntries &te);
QString msgAmbiguousTypesFound(const QString &qualifiedName, const TypeEntries &te);
@@ -78,6 +83,27 @@ QString msgUnmatchedReturnType(const FunctionModelItem &functionItem,
QString msgSkippingFunction(const FunctionModelItem &functionItem,
const QString &signature, const QString &why);
+QString msgSkippingField(const VariableModelItem &field, const QString &className,
+ const QString &type);
+
+QString msgTypeNotDefined(const TypeEntry *entry);
+
+QString msgGlobalFunctionNotDefined(const FunctionTypeEntry *fte,
+ const QString &signature);
+
+QString msgStrippingArgument(const FunctionModelItem &f, int i,
+ const QString &originalSignature,
+ const ArgumentModelItem &arg);
+
+QString msgEnumNotDefined(const EnumTypeEntry *t);
+
+QString msgUnknownBase(const AbstractMetaClass *metaClass,
+ const QString &baseClassName);
+
+QString msgArrayModificationFailed(const FunctionModelItem &functionItem,
+ const QString &className,
+ const QString &errorMessage);
+
QString msgCannotResolveEntity(const QString &name, const QString &reason);
QString msgCannotSetArrayUsage(const QString &function, int i, const QString &reason);