Commit ca5befce authored by Laurent Montel's avatar Laurent Montel 😁

Not necessary to inherit from a QObject.

parent 529356f4
......@@ -508,15 +508,14 @@ void Composer::addAttachmentPart( AttachmentPart::Ptr part, bool autoresizeImage
Q_ASSERT( !d->attachmentParts.contains( part ) );
if( autoresizeImage ) {
if (MessageComposer::Utils::resizeImage(part)) {
MessageComposer::ImageScalingJob *autoResizeJob = new MessageComposer::ImageScalingJob(this);
if(autoResizeJob->loadImageFromData(part->data())) {
if(autoResizeJob->resizeImage()) {
part->setData(autoResizeJob->imageArray());
part->setMimeType(autoResizeJob->mimetype());
MessageComposer::ImageScalingJob autoResizeJob;
if(autoResizeJob.loadImageFromData(part->data())) {
if(autoResizeJob.resizeImage()) {
part->setData(autoResizeJob.imageArray());
part->setMimeType(autoResizeJob.mimetype());
MessageComposer::Utils::changeFileName(part);
}
}
delete autoResizeJob;
}
}
d->attachmentParts.append( part );
......
......@@ -22,8 +22,7 @@
using namespace MessageComposer;
ImageScalingJob::ImageScalingJob(QObject *parent)
:QObject(parent)
ImageScalingJob::ImageScalingJob()
{
}
......
......@@ -23,11 +23,10 @@
#include <QBuffer>
namespace MessageComposer {
class ImageScalingJob : public QObject
class ImageScalingJob
{
Q_OBJECT
public:
explicit ImageScalingJob(QObject *parent);
ImageScalingJob();
~ImageScalingJob();
/**
......
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