Commit 5c74af01 authored by Laurent Montel's avatar Laurent Montel 😁

Rename class

parent ca5befce
......@@ -60,7 +60,7 @@ set( messagecomposer_recipient_src
)
set( messagecomposer_imagescaling_src
imagescaling/imagescalingjob.cpp
imagescaling/imagescaling.cpp
imagescaling/imagescalingwidget.cpp
imagescaling/imagescalingutils.cpp
imagescaling/imagescalingselectformat.cpp
......
......@@ -33,7 +33,7 @@
#include "signencryptjob.h"
#include "skeletonmessagejob.h"
#include "transparentjob.h"
#include "imagescaling/imagescalingjob.h"
#include "imagescaling/imagescaling.h"
#include "imagescaling/imagescalingutils.h"
#include "settings/messagecomposersettings.h"
......@@ -508,7 +508,7 @@ void Composer::addAttachmentPart( AttachmentPart::Ptr part, bool autoresizeImage
Q_ASSERT( !d->attachmentParts.contains( part ) );
if( autoresizeImage ) {
if (MessageComposer::Utils::resizeImage(part)) {
MessageComposer::ImageScalingJob autoResizeJob;
MessageComposer::ImageScaling autoResizeJob;
if(autoResizeJob.loadImageFromData(part->data())) {
if(autoResizeJob.resizeImage()) {
part->setData(autoResizeJob.imageArray());
......
......@@ -14,7 +14,7 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "imagescalingjob.h"
#include "imagescaling.h"
#include "settings/messagecomposersettings.h"
#include <QBuffer>
......@@ -22,15 +22,15 @@
using namespace MessageComposer;
ImageScalingJob::ImageScalingJob()
ImageScaling::ImageScaling()
{
}
ImageScalingJob::~ImageScalingJob()
ImageScaling::~ImageScaling()
{
}
bool ImageScalingJob::loadImageFromData(const QByteArray& data)
bool ImageScaling::loadImageFromData(const QByteArray& data)
{
if (!mImage.loadFromData(data)) {
return false;
......@@ -38,7 +38,7 @@ bool ImageScalingJob::loadImageFromData(const QByteArray& data)
return true;
}
bool ImageScalingJob::resizeImage()
bool ImageScaling::resizeImage()
{
if (mImage.isNull())
return false;
......@@ -102,7 +102,7 @@ bool ImageScalingJob::resizeImage()
}
QByteArray ImageScalingJob::mimetype() const
QByteArray ImageScaling::mimetype() const
{
//Add more mimetype if a day we add more saving format.
const QString type = MessageComposer::MessageComposerSettings::self()->writeFormat();
......@@ -114,7 +114,7 @@ QByteArray ImageScalingJob::mimetype() const
return QByteArray();
}
QByteArray ImageScalingJob::imageArray() const
QByteArray ImageScaling::imageArray() const
{
return mBuffer.data();
}
......
......@@ -14,20 +14,19 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMAGESCALINGJOB_H
#define IMAGESCALINGJOB_H
#ifndef IMAGESCALING_H
#define IMAGESCALING_H
#include <QByteArray>
#include <QObject>
#include <QImage>
#include <QBuffer>
namespace MessageComposer {
class ImageScalingJob
class ImageScaling
{
public:
ImageScalingJob();
~ImageScalingJob();
ImageScaling();
~ImageScaling();
/**
* @brief loadImageFromData
......@@ -60,4 +59,4 @@ private:
};
}
#endif // IMAGESCALINGJOB_H
#endif // IMAGESCALING_H
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