mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
QImage::byteCount -> QImage::sizeInByes
This commit is contained in:
parent
bff22e2a76
commit
75ef81a109
@ -210,11 +210,11 @@ private Q_SLOTS:
|
||||
QFile picDumpFile(fileNameBase + QStringLiteral("-expected.data"));
|
||||
QVERIFY2(picDumpFile.open(QIODevice::WriteOnly), qPrintable(picDumpFile.errorString()));
|
||||
picDumpFile.write(reinterpret_cast<const char *>(inputImage.bits()),
|
||||
inputImage.byteCount());
|
||||
inputImage.sizeInBytes());
|
||||
QFile pngDumpFile(fileNameBase + QStringLiteral("-actual.data"));
|
||||
QVERIFY2(pngDumpFile.open(QIODevice::WriteOnly), qPrintable(pngDumpFile.errorString()));
|
||||
pngDumpFile.write(reinterpret_cast<const char *>(expImage.bits()),
|
||||
expImage.byteCount());
|
||||
expImage.sizeInBytes());
|
||||
QString msg = QStringLiteral("Read image (")
|
||||
+ picDumpFile.fileName()
|
||||
+ QStringLiteral(") differed from expected image (")
|
||||
|
@ -35,8 +35,8 @@ static void writeImageData(const char *name, const QString &filename, const QIma
|
||||
{
|
||||
QFile file(filename);
|
||||
if (file.open(QIODevice::WriteOnly)) {
|
||||
qint64 written = file.write(reinterpret_cast<const char *>(image.bits()), image.byteCount());
|
||||
if (written == image.byteCount()) {
|
||||
qint64 written = file.write(reinterpret_cast<const char *>(image.bits()), image.sizeInBytes());
|
||||
if (written == image.sizeInBytes()) {
|
||||
QTextStream(stdout) << " " << name
|
||||
<< " written to " << filename << "\n";
|
||||
} else {
|
||||
|
@ -116,8 +116,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
img = img.convertToFormat(qformat);
|
||||
}
|
||||
qint64 written = output.write(reinterpret_cast<const char *>(img.bits()), img.byteCount());
|
||||
if (written != img.byteCount()) {
|
||||
qint64 written = output.write(reinterpret_cast<const char *>(img.bits()), img.sizeInBytes());
|
||||
if (written != img.sizeInBytes()) {
|
||||
QTextStream(stderr) << "Could not write image data to " << files.at(1)
|
||||
<< ":" << output.errorString() << "\n";
|
||||
return 5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user