diff options
author | Arno <arno@disconnect.de> | 2017-12-27 06:45:45 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-12-27 06:45:45 +0100 |
commit | 6f2dfb28b0850448067bfd425e195269cc92cb03 (patch) | |
tree | 3cdd03d14ca4ef1bf8072df8898a227367903265 | |
parent | 22dc15b0797403935e504a13bf075cec918b988e (diff) | |
download | SheMov-6f2dfb28b0850448067bfd425e195269cc92cb03.tar.gz SheMov-6f2dfb28b0850448067bfd425e195269cc92cb03.tar.bz2 SheMov-6f2dfb28b0850448067bfd425e195269cc92cb03.zip |
Remove deprecation warning and Q_FOREACH
Use QImage::sizeInBytes instead of QImage::byteCount as suggested by
documentation.
-rw-r--r-- | filepropertiesdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<QVariant>() << tr("depth") << img.depth(), rootItem); appendItem(QList<QVariant>() << tr("alpha channel") << (img.hasAlphaChannel() ? tr("yes") : tr("no")), rootItem); appendItem(QList<QVariant>() << tr("qt format") << img.format(), rootItem); - appendItem(QList<QVariant>() << tr("byte count") << img.byteCount(), rootItem); + appendItem(QList<QVariant>() << 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("<center>File not found in Archive</center>")); }else{ QString text = QString(tr("<p>Archived as:</p><ul>")); - foreach(QString a, archived){ + for(const QString &a : archived){ text.append(QString(tr("<li>%1</li>")).arg(a)); } text.append("</ul>"); |