summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-10 12:49:59 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-10 12:27:37 +0000
commitb0c04069b18f58696c6a87e02c8854628eb9988d (patch)
treedd2b8e43a11bf2592c4f9e342e40af4cafd5a7df
parenta0543241df2273ad60a4c92e4ffe6e0cfb1042b9 (diff)
Documentation: Replace nullptr by None in signatures
Task-number: PYSIDE-903 Change-Id: I4dc2cce4741c87e08b8b3d0dc911c62d044ee054 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index 19ddd5f3..ea971287 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -53,6 +53,8 @@ static inline QString titleAttribute() { return QStringLiteral("title"); }
static inline QString fullTitleAttribute() { return QStringLiteral("fulltitle"); }
static inline QString briefAttribute() { return QStringLiteral("brief"); }
+static inline QString none() { return QStringLiteral("None"); }
+
static bool shouldSkip(const AbstractMetaFunction* func)
{
// Constructors go to separate section
@@ -1787,11 +1789,13 @@ QString QtDocGenerator::parseArgDocStyle(const AbstractMetaClass* /* cppClass */
|| defValue.startsWith(QLatin1String("QList"))) {
defValue = QLatin1String("list()");
} else if (defValue == QLatin1String("QVariant()")) {
- defValue = QLatin1String("None");
+ defValue = none();
} else {
defValue.replace(QLatin1String("::"), QLatin1String("."));
- if (defValue == QLatin1String("0") && (arg->type()->isQObject() || arg->type()->isObject()))
- defValue = QLatin1String("None");
+ if (defValue == QLatin1String("nullptr"))
+ defValue = none();
+ else if (defValue == QLatin1String("0") && (arg->type()->isQObject() || arg->type()->isObject()))
+ defValue = none();
}
ret += QLatin1Char('=') + defValue;
}