File indexing completed on 2024-11-24 04:50:44

0001 // SPDX-FileCopyrightText: 2023 Carl Schwan <carl.schwan@gnupg.com>
0002 // SPDX-License-Identifier: LGPL-2.0-or-later
0003 
0004 #include "messagehandler.h"
0005 #include <MimeTreeParserCore/FileOpener>
0006 
0007 using namespace MimeTreeParser::Core;
0008 
0009 void MessageHandler::open(const QUrl &file)
0010 {
0011     const auto messages = FileOpener::openFile(file.toLocalFile());
0012     if (!messages.isEmpty()) {
0013         Q_EMIT messageOpened(messages[0]);
0014     }
0015 }
0016 
0017 #include "moc_messagehandler.cpp"