示例#1
0
QString ImapPartAttachmentItem::caption() const
{
    Imap::Mailbox::TreeItemPart *part = partPtr();
    if (part && !part->fileName().isEmpty()) {
        return part->fileName();
    } else {
        return MessageComposer::tr("IMAP part %1").arg(QString::fromUtf8(imapUrl()));
    }
}
示例#2
0
QByteArray ImapPartAttachmentItem::contentDispositionHeader() const
{
    Imap::Mailbox::TreeItemPart *part = partPtr();
    if (!part)
        return QByteArray();
    return "Content-Disposition: attachment;\r\n\tfilename=\"" + part->fileName().toUtf8() + "\"\r\n";
}