Commit 998cc6a8 authored by Laurent Montel's avatar Laurent Montel 😁

Store url in attachment too

parent d7dbdd03
......@@ -112,6 +112,7 @@ void AttachmentFromUrlJob::Private::transferJobResult( KJob *job )
part->setMimeType( mimeType.toLatin1() );
part->setName( fileName );
part->setFileName( fileName );
part->setUrl(mUrl);
part->setData( mData );
q->setAttachmentPart( part );
q->emitResult(); // Success.
......
......@@ -23,6 +23,8 @@
#include <kmime/kmime_content.h>
#include <kmime/kmime_util.h>
#include <KUrl>
using namespace MessageCore;
uint MessageCore::qHash( const MessageCore::AttachmentPart::Ptr &ptr )
......@@ -57,7 +59,7 @@ public:
mToSign( false )
{
}
KUrl mUrl;
QString mName;
QString mFileName;
QString mDescription;
......@@ -228,3 +230,13 @@ bool AttachmentPart::isMessageOrMessageCollection() const
{
return ( mimeType() == "message/rfc822" ) || ( mimeType() == "multipart/digest" );
}
void AttachmentPart::setUrl(const KUrl &url)
{
d->mUrl = url;
}
KUrl AttachmentPart::url() const
{
return d->mUrl;
}
......@@ -28,7 +28,7 @@
#include <QtCore/QMetaType>
#include <boost/shared_ptr.hpp>
class KUrl;
namespace MessageCore {
/**
......@@ -197,6 +197,10 @@ public:
* (message/rfc822) or a collection of encapsulated messages (multipart/digest)
*/
bool isMessageOrMessageCollection() const;
void setUrl(const KUrl &url);
KUrl url() const;
private:
//@cond PRIVATE
class Private;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment