mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
autotests: print QImageReader::supportedImageFormats, to debug CI failures
This commit is contained in:
parent
52fbe1863b
commit
becd7aff3a
@ -127,6 +127,12 @@ int main(int argc, char ** argv)
|
||||
<< "Starting basic read tests for "
|
||||
<< suffix << " images *********\n";
|
||||
|
||||
const QList<QByteArray> formats = QImageReader::supportedImageFormats();
|
||||
QStringList formatStrings;
|
||||
formatStrings.reserve(formats.size());
|
||||
std::transform(formats.begin(), formats.end(), std::back_inserter(formatStrings), [](const QByteArray &format) { return QString(format); });
|
||||
QTextStream(stdout) << "QImageReader::supportedImageFormats: " << formatStrings.join(", ");
|
||||
|
||||
const QFileInfoList lstImgDir = imgdir.entryInfoList();
|
||||
for (const QFileInfo &fi : lstImgDir) {
|
||||
int suffixPos = fi.filePath().count() - suffix.count();
|
||||
@ -134,7 +140,7 @@ int main(int argc, char ** argv)
|
||||
QString expfile = fi.filePath().replace(suffixPos, suffix.count(), QStringLiteral("png"));
|
||||
QString expfilename = QFileInfo(expfile).fileName();
|
||||
|
||||
QImageReader inputReader(inputfile, format.constData());
|
||||
QImageReader inputReader(inputfile, format);
|
||||
QImageReader expReader(expfile, "png");
|
||||
|
||||
QImage inputImage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user