diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-30 17:36:14 +0200 |
---|---|---|
committer | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2020-10-06 11:16:36 +0200 |
commit | fa8d021fa6fcb040fb702b6ffd2deee52a3b748a (patch) | |
tree | 15c6a311dcf9e6c64a162ba62d2d9a83846ba159 /src/corelib/io/qfilesystemiterator_unix.cpp | |
parent | 40874625f996899ca1e976f0240da697e784c2c6 (diff) |
Convert a couple of APIs to use views
Try to get rid of APIs that use raw 'const {char, QChar} *, length'
pairs. Instead, use QByteArrayView or QStringView.
As QStringConverter is a new class, simply change the API to what we'd like
to have. Also adjust hidden API in QStringBuilder and friends.
Change-Id: I897d47f63a7b965f5574a1e51da64147f9e981f6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemiterator_unix.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemiterator_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemiterator_unix.cpp b/src/corelib/io/qfilesystemiterator_unix.cpp index c69138e3ba..cf01eeff15 100644 --- a/src/corelib/io/qfilesystemiterator_unix.cpp +++ b/src/corelib/io/qfilesystemiterator_unix.cpp @@ -56,7 +56,7 @@ static bool checkNameDecodable(const char *d_name, qsizetype len) // This function is called in a loop from advance() below, but the loop is // usually run only once. - return QUtf8::isValidUtf8(d_name, len).isValidUtf8; + return QUtf8::isValidUtf8(QByteArrayView(d_name, len)).isValidUtf8; } QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters, |