summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-26 21:36:50 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-26 21:36:50 (GMT)
commit7fd28c37ddd4905c74323ef59427de6178d40c58 (patch)
tree12adfffefad0857f6fcd0725cfc9bf4356134ccc
parent153a79d3f72c51a072a651d658fdda0650b5665e (diff)
Minor optimization
-rw-r--r--messagecomposer/src/imagescaling/imagescaling.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/messagecomposer/src/imagescaling/imagescaling.cpp b/messagecomposer/src/imagescaling/imagescaling.cpp
index 201203a..538a3e5 100644
--- a/messagecomposer/src/imagescaling/imagescaling.cpp
+++ b/messagecomposer/src/imagescaling/imagescaling.cpp
@@ -67,7 +67,7 @@ bool ImageScaling::resizeImage()
int maximumWidth = MessageComposer::MessageComposerSettings::self()->maximumWidth();
if (maximumWidth == -1) {
- maximumWidth = MessageComposer::MessageComposerSettings::self()->customMaximumWidth();
+ maximumWidth = MessageComposer::MessageComposerSettings::self()->customMaximumWidth();
}
int maximumHeight = MessageComposer::MessageComposerSettings::self()->maximumHeight();
if (maximumHeight == -1) {
@@ -91,7 +91,7 @@ bool ImageScaling::resizeImage()
int minimumWidth = MessageComposer::MessageComposerSettings::self()->minimumWidth();
if (minimumWidth == -1) {
- minimumWidth = MessageComposer::MessageComposerSettings::self()->customMinimumWidth();
+ minimumWidth = MessageComposer::MessageComposerSettings::self()->customMinimumWidth();
}
int minimumHeight = MessageComposer::MessageComposerSettings::self()->minimumHeight();
@@ -111,13 +111,13 @@ bool ImageScaling::resizeImage()
QByteArray format;
if (d->mMimeType == "image/jpeg") {
- format = "JPG";
+ format = QByteArrayLiteral("JPG");
} else if (d->mMimeType == "image/png") {
- format = "PNG";
+ format = QByteArrayLiteral("PNG");
} else {
format = MessageComposer::MessageComposerSettings::self()->writeFormat().toLocal8Bit();
if (format.isEmpty()) {
- format = "PNG";
+ format = QByteArrayLiteral("PNG");
}
}
const bool result = d->mImage.save(&d->mBuffer, format.constData());