aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-09 18:12:53 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-09 18:19:19 +0100
commit1df1167ff1226637cf659debaa3296f03f4a3994 (patch)
tree5f1a25356c81c6ff7d9b953ece4493a301c97239 /src/qml/jsruntime
parentcbe1869fbe7048f34513b201a1d9111a0a64257a (diff)
V4 string object: Avoid some compile warnings
Assigning a plain char to QChar is deprecated. What we want here is the special Null character, though. Change-Id: I0f3cd56c8820fdf5afa40cf608e738e04163680a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index e710e14750..e41c1030b3 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -653,7 +653,7 @@ ReturnedValue StringPrototype::method_padEnd(const FunctionObject *f, const Valu
toFill -= copy;
ch += copy;
}
- *ch = '\0';
+ *ch = QChar::Null;
return v4->newString(padded)->asReturnedValue();
}
@@ -695,7 +695,7 @@ ReturnedValue StringPrototype::method_padStart(const FunctionObject *f, const Va
}
memcpy(ch, original.constData(), oldLength*sizeof(QChar));
ch += oldLength;
- *ch = '\0';
+ *ch = QChar::Null;
return v4->newString(padded)->asReturnedValue();
}