path: root/src/plugins/platforms
diff options
authorLars Knoll <>2020-07-30 17:14:34 +0200
committerMÃ¥rten Nordheim <>2020-10-05 10:12:04 +0200
commit6abdbb65e59779af56ae25372a853efca19eac59 (patch)
tree0addf2c97067395e845dd90739fddbe99f90bc68 /src/plugins/platforms
parentc09df7b57c1e4b25b5e20c63d2bab63d0d12dea0 (diff)
Change QString::fromLatin1 and friends to use QByteArrayView
Also adjust the QString constructor from QByteArray to ignore \0 characters in the string (and not terminate conversion there). [ChangeLog][QtCore][QString] Constructing a QString from a QByteArray will not stop at intermediate '\0' (null) characters in the string as in Qt 5, but will convert all characters in the byte array. Change-Id: I1f6bfefe76dfa9072b165903fec7aa4af1abd882 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/plugins/platforms')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/ b/src/plugins/platforms/ios/
index 411f6ebf81..c7dbe43124 100644
--- a/src/plugins/platforms/ios/
+++ b/src/plugins/platforms/ios/
@@ -245,7 +245,7 @@ static QString deviceModelIdentifier()
char value[size];
sysctlbyname(key, &value, &size, NULL, 0);
- return QString::fromLatin1(value);
+ return QString::fromLatin1(QByteArrayView(value, qsizetype(size)));