From 6f2dfb28b0850448067bfd425e195269cc92cb03 Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 27 Dec 2017 06:45:45 +0100 Subject: Remove deprecation warning and Q_FOREACH Use QImage::sizeInBytes instead of QImage::byteCount as suggested by documentation. --- filepropertiesdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'filepropertiesdialog.cpp') diff --git a/filepropertiesdialog.cpp b/filepropertiesdialog.cpp index 14b8c8a..39c4466 100644 --- a/filepropertiesdialog.cpp +++ b/filepropertiesdialog.cpp @@ -144,7 +144,7 @@ void FilePropertiesDialog::pictureData(){ appendItem(QList() << tr("depth") << img.depth(), rootItem); appendItem(QList() << tr("alpha channel") << (img.hasAlphaChannel() ? tr("yes") : tr("no")), rootItem); appendItem(QList() << tr("qt format") << img.format(), rootItem); - appendItem(QList() << tr("byte count") << img.byteCount(), rootItem); + appendItem(QList() << tr("byte count") << img.sizeInBytes(), rootItem); mPicModel->setRoot(rootItem); //now let's see if the file is already in the archive @@ -163,7 +163,7 @@ void FilePropertiesDialog::pictureData(){ mArchivedAs->setText(tr("
File not found in Archive
")); }else{ QString text = QString(tr("

Archived as:

    ")); - foreach(QString a, archived){ + for(const QString &a : archived){ text.append(QString(tr("
  • %1
  • ")).arg(a)); } text.append("
"); -- cgit v1.2.3-70-g09d2