From ecfdafddfcef30c897cd8fa7d4e30cf33daff7d6 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Tue, 22 Mar 2016 20:46:17 +0200 Subject: [PATCH] Little optimization --HG-- branch : feature --- src/app/valentina/dialogs/dialogpatternproperties.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index 50ecacea1..3970ae562 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -663,16 +663,16 @@ void DialogPatternProperties::SetNewImage() QFileInfo f(fileName); QString extension = f.suffix().toUpper(); - if (extension == "JPEG") + if (extension == QLatin1String("JPEG")) { extension = "JPG"; } - if (extension == "PNG" || extension == "JPG" || extension == "BMP") + if (extension == QLatin1String("PNG") || extension == QLatin1String("JPG") || extension == QLatin1String("BMP")) { QByteArray byteArray; QBuffer buffer(&byteArray); buffer.open(QIODevice::WriteOnly); - image.save(&buffer, extension.toLatin1().data()); // writes the image in 'extension' format inside the buffer + image.save(&buffer, extension.toLatin1().data()); //writes the image in 'extension' format inside the buffer QString iconBase64 = QString::fromLatin1(byteArray.toBase64().data()); // save our image to file.val