Skip to content

Commit

Permalink
Merge "imageviewer example: Show the color space description when loa…
Browse files Browse the repository at this point in the history
…ding"
  • Loading branch information
FriedemannKleint authored and Qt CI Bot committed Mar 5, 2021
2 parents b2c9642 + 0a39278 commit 7402f41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/widgets/widgets/imageviewer/imageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ bool ImageViewer::loadFile(const QString &fileName)

setWindowFilePath(fileName);

const QString message = tr("Opened \"%1\", %2x%3, Depth: %4")
.arg(QDir::toNativeSeparators(fileName)).arg(image.width()).arg(image.height()).arg(image.depth());
const QString description = image.colorSpace().isValid()
? image.colorSpace().description() : tr("unknown");
const QString message = tr("Opened \"%1\", %2x%3, Depth: %4 (%5)")
.arg(QDir::toNativeSeparators(fileName)).arg(image.width()).arg(image.height())
.arg(image.depth()).arg(description);
statusBar()->showMessage(message);
return true;
}
Expand Down

0 comments on commit 7402f41

Please sign in to comment.