diff options
author | Ingo Klöcker <[email protected]> | 2024-05-21 10:36:11 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2024-05-21 10:36:11 +0000 |
commit | c933269d3a59e9a36587406ed2c130ea1b292852 (patch) | |
tree | 8c44d92ccd4e3e70f8680b0112a8c777aa5fa751 /lang | |
parent | qt: Fix warning about missing return (diff) | |
download | gpgme-c933269d3a59e9a36587406ed2c130ea1b292852.tar.gz gpgme-c933269d3a59e9a36587406ed2c130ea1b292852.zip |
qt: Avoid bogus stringop-overread warning
* lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use
QByteArray overload of QString::fromUtf8.
--
There's no need to make the code more complicated than necessary. Unless
we want to provoke weird compiler warnings. :-)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/qt/src/threadedjobmixin.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lang/qt/src/threadedjobmixin.cpp b/lang/qt/src/threadedjobmixin.cpp index b7963c39..a1438a7f 100644 --- a/lang/qt/src/threadedjobmixin.cpp +++ b/lang/qt/src/threadedjobmixin.cpp @@ -98,8 +98,7 @@ QString _detail::audit_log_as_html(Context *ctx, GpgME::Error &err) } else if ((err = ctx->getAuditLog(data, CMSAuditLogFlags))) { return QString::fromLocal8Bit(err.asString()); } - const QByteArray ba = dp.data(); - return QString::fromUtf8(ba.data(), ba.size()); + return QString::fromUtf8(dp.data()); } return QStringLiteral("Unsupported protocol for Audit Log"); |