aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-05 15:34:44 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-06 09:35:24 +0000
commite186166f292fbaf8fa8af3fbffdf4f08e9cb7009 (patch)
treef187a623794e0849f8ec7aabf5c3a50ac7155674 /sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
parent81f128c5f09a7cae9e549458bcf23943b0b9a351 (diff)
Replace QString::null/isNull() by QString()/isEmpty()
Fix warnings appearing in Qt 5.13: sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:873:25: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:873:25: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:880:25: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] sources/shiboken2/generator/shiboken2/shibokengenerator.cpp:880:25: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] sources/shiboken2/generator/shiboken2/cppgenerator.cpp:5060:34: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] sources/shiboken2/generator/shiboken2/cppgenerator.cpp:5060:34: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations] Change-Id: I7c938df64babf824b58bf5c785b281a88d5111db Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/shibokengenerator.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index a226f2c00..ca5dab54e 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -870,14 +870,14 @@ QString ShibokenGenerator::converterObject(const TypeEntry* type)
if (type->isArray()) {
qDebug() << "Warning: no idea how to handle the Qt5 type " << type->qualifiedCppName();
- return QString::null;
+ return QString();
}
/* the typedef'd primitive types case */
const PrimitiveTypeEntry* pte = dynamic_cast<const PrimitiveTypeEntry*>(type);
if (!pte) {
qDebug() << "Warning: the Qt5 primitive type is unknown" << type->qualifiedCppName();
- return QString::null;
+ return QString();
}
if (pte->basicReferencedTypeEntry())
pte = pte->basicReferencedTypeEntry();
@@ -1457,7 +1457,7 @@ void ShibokenGenerator::writeFunctionArguments(QTextStream &s,
QString ShibokenGenerator::functionReturnType(const AbstractMetaFunction* func, Options options) const
{
QString modifiedReturnType = QString(func->typeReplaced(0));
- if (!modifiedReturnType.isNull() && !(options & OriginalTypeDescription))
+ if (!modifiedReturnType.isEmpty() && !(options & OriginalTypeDescription))
return modifiedReturnType;
return translateType(func->type(), func->implementingClass(), options);
}
@@ -1821,7 +1821,7 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
if (func->isVirtual() && !func->isAbstract() && (!avoidProtectedHack() || !func->isProtected())) {
QString methodCallArgs = getArgumentsFromMethodCall(code);
- if (!methodCallArgs.isNull()) {
+ if (!methodCallArgs.isEmpty()) {
const QString pattern = QStringLiteral("%CPPSELF.%FUNCTION_NAME(%1)").arg(methodCallArgs);
if (func->name() == QLatin1String("metaObject")) {
QString wrapperClassName = wrapperName(func->ownerClass());