File indexing completed on 2024-05-12 05:28:19
0001 // SPDX-FileCopyrightText: 2016 Sandro Knauß <sknauss@kde.org> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 #include "utils.h" 0005 0006 using namespace MimeTreeParser; 0007 0008 KMime::Content *MimeTreeParser::findTypeInDirectChildren(KMime::Content *content, const QByteArray &mimeType) 0009 { 0010 for (const auto child : content->contents()) { 0011 if ((!child->contentType()->isEmpty()) && (mimeType == child->contentType()->mimeType())) { 0012 return child; 0013 } 0014 } 0015 return nullptr; 0016 }