diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-06-17 22:53:53 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-06-25 09:54:16 +0200 |
commit | d7ccd8cb4565c8643b158891c9de3187c1586dc9 (patch) | |
tree | 5f3fbd8a91cf2c460891453497f8e4b8ac2f82ba /tests/benchmarks | |
parent | 2df4991cb1a893522caac838d6c4edf5ad8da464 (diff) |
Remove QByteArray's methods taking QString and their uses
[ChangeLog][QtCore][QByteArray] Remove method overloads taking
QString as argument, all of which were equivalent to passing the
toUtf8() of the string instead.
Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp index 21018920f7..10b1b90ce2 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp @@ -318,7 +318,7 @@ bool QFileSystemIteratorPrivate::advanceHelper() if (m_entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { QByteArray ba = m_dirPaths.top(); ba += '\\'; - ba += QString::fromWCharArray(m_entry->cFileName); + ba += QString::fromWCharArray(m_entry->cFileName).toUtf8(); pushSubDirectory(ba); } #else @@ -638,7 +638,7 @@ QString QFileSystemIterator::filePath() const else if (d->m_entry) { ba += '/'; #ifdef Q_OS_WIN - ba += QString::fromWCharArray(d->m_entry->cFileName); + ba += QString::fromWCharArray(d->m_entry->cFileName).toUtf8(); #else ba += d->m_entry->d_name; #endif diff --git a/tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp b/tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp index 4dc4cecbf7..ff8e49a9a8 100644 --- a/tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp +++ b/tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp @@ -148,7 +148,7 @@ tst_qnetworkreply_from_cache::tst_qnetworkreply_from_cache() void tst_qnetworkreply_from_cache::timeReadAll(const QString &headers, const QByteArray &data) { QByteArray reply; - reply.append(headers); + reply.append(headers.toUtf8()); reply.append(data); m_replyData.reserve(data.size()); |