Fix strings in QImageWriter.
Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
5193c14536
commit
75defbf241
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user