Messagelib
7#include "attachmentfromurlutils.h"
8#include "MessageCore/MessageCoreSettings"
9#include "attachmentfromfolderjob.h"
10#include "attachmentfromurljob.h"
11#include "messagecore_debug.h"
13#include <QMimeDatabase>
17MessageCore::AttachmentFromUrlBaseJob *AttachmentFromUrlUtils::createAttachmentJob(
const QUrl &url, QObject *parent)
19 MessageCore::AttachmentFromUrlBaseJob *ajob =
nullptr;
22 qCDebug(MESSAGECORE_LOG) <<
"Creating attachment from folder";
23 ajob =
new MessageCore::AttachmentFromFolderJob(url, parent);
25 ajob =
new MessageCore::AttachmentFromUrlJob(url, parent);
26 qCDebug(MESSAGECORE_LOG) <<
"Creating attachment from file";
28 if (MessageCore::MessageCoreSettings::maximumAttachmentSize() > 0) {
29 ajob->setMaximumAllowedSize(MessageCore::MessageCoreSettings::maximumAttachmentSize());
QMimeType mimeTypeForUrl(const QUrl &url) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:39 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.