From 75defbf241df78c8ffc18681c3ddbbfc92134226 Mon Sep 17 00:00:00 2001 From: ABBAPOH Date: Fri, 13 Dec 2013 16:31:07 +0400 Subject: Fix strings in QImageWriter. Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476 Reviewed-by: Friedemann Kleint Reviewed-by: Konstantin Ritt --- src/gui/image/qimagewriter.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 8dd5fdd111..c12dbb6544 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -279,7 +279,7 @@ QImageWriterPrivate::QImageWriterPrivate(QImageWriter *qq) compression = 0; gamma = 0.0; imageWriterError = QImageWriter::UnknownError; - errorString = QT_TRANSLATE_NOOP(QImageWriter, QLatin1String("Unknown error")); + errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageWriter, "Unknown error")); q = qq; } @@ -288,22 +288,19 @@ bool QImageWriterPrivate::canWriteHelper() { if (!device) { imageWriterError = QImageWriter::DeviceError; - errorString = QT_TRANSLATE_NOOP(QImageWriter, - QLatin1String("Device is not set")); + errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageWriter, "Device is not set")); return false; } if (!device->isOpen()) device->open(QIODevice::WriteOnly); if (!device->isWritable()) { imageWriterError = QImageWriter::DeviceError; - errorString = QT_TRANSLATE_NOOP(QImageWriter, - QLatin1String("Device not writable")); + errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageWriter, "Device not writable")); return false; } if (!handler && (handler = createWriteHandlerHelper(device, format)) == 0) { imageWriterError = QImageWriter::UnsupportedFormatError; - errorString = QT_TRANSLATE_NOOP(QImageWriter, - QLatin1String("Unsupported image format")); + errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageWriter, "Unsupported image format")); return false; } return true; @@ -670,8 +667,7 @@ bool QImageWriter::supportsOption(QImageIOHandler::ImageOption option) const { if (!d->handler && (d->handler = createWriteHandlerHelper(d->device, d->format)) == 0) { d->imageWriterError = QImageWriter::UnsupportedFormatError; - d->errorString = QT_TRANSLATE_NOOP(QImageWriter, - QLatin1String("Unsupported image format")); + d->errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageWriter, "Unsupported image format")); return false; } -- cgit v1.2.3