aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/applecodesignutils.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-02-26 14:38:54 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-02-26 15:52:26 +0000
commit4fd17d627106fde01284075038e15cc0680611bc (patch)
tree25c5b7e8ec774d362ad97e86d0ecd1d8527fbac5 /src/lib/corelib/tools/applecodesignutils.cpp
parent0b8f0b771080e51a59664782ced6b3a1cc5111ca (diff)
Return initializer list where it is possible
This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/applecodesignutils.cpp')
-rw-r--r--src/lib/corelib/tools/applecodesignutils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/corelib/tools/applecodesignutils.cpp b/src/lib/corelib/tools/applecodesignutils.cpp
index f89fc7732..67c4f5238 100644
--- a/src/lib/corelib/tools/applecodesignutils.cpp
+++ b/src/lib/corelib/tools/applecodesignutils.cpp
@@ -58,17 +58,17 @@ QByteArray smimeMessageContent(const QByteArray &data)
{
QCFType<CMSDecoderRef> decoder = NULL;
if (CMSDecoderCreate(&decoder) != noErr)
- return QByteArray();
+ return {};
if (CMSDecoderUpdateMessage(decoder, data.constData(), data.size()) != noErr)
- return QByteArray();
+ return {};
if (CMSDecoderFinalizeMessage(decoder) != noErr)
- return QByteArray();
+ return {};
QCFType<CFDataRef> content = NULL;
if (CMSDecoderCopyContent(decoder, &content) != noErr)
- return QByteArray();
+ return {};
return QByteArray::fromCFData(content);
}
@@ -83,7 +83,7 @@ QVariantMap certificateInfo(const QByteArray &data)
for (const auto &extension : cert.extensions()) {
if (extension.name() == QStringLiteral("extendedKeyUsage")) {
if (!extension.value().toStringList().contains(QStringLiteral("Code Signing")))
- return QVariantMap();
+ return {};
}
}
@@ -120,7 +120,7 @@ QVariantMap identitiesProperties()
&kCFTypeDictionaryValueCallBacks);
QCFType<CFTypeRef> result = NULL;
if (SecItemCopyMatching(query, &result) != errSecSuccess)
- return QVariantMap();
+ return {};
QVariantMap items;
const auto tryAppend = [&](SecIdentityRef identity) {