mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 00:58:32 -04:00
Proper use of range for
This commit is contained in:
parent
c03b1075f3
commit
c1d3fb0778
@ -27,7 +27,7 @@ QStringList Comic::getSupportedImageFormats()
|
|||||||
{
|
{
|
||||||
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
||||||
QStringList supportedImageFormatStrings;
|
QStringList supportedImageFormatStrings;
|
||||||
for (QByteArray item : supportedImageFormats) {
|
for (QByteArray &item : supportedImageFormats) {
|
||||||
supportedImageFormatStrings.append(QString::fromLocal8Bit("*." + item));
|
supportedImageFormatStrings.append(QString::fromLocal8Bit("*." + item));
|
||||||
}
|
}
|
||||||
return supportedImageFormatStrings;
|
return supportedImageFormatStrings;
|
||||||
@ -37,7 +37,7 @@ QStringList Comic::getSupportedImageLiteralFormats()
|
|||||||
{
|
{
|
||||||
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
||||||
QStringList supportedImageFormatStrings;
|
QStringList supportedImageFormatStrings;
|
||||||
for (QByteArray item : supportedImageFormats) {
|
for (QByteArray &item : supportedImageFormats) {
|
||||||
supportedImageFormatStrings.append(QString::fromLocal8Bit(item));
|
supportedImageFormatStrings.append(QString::fromLocal8Bit(item));
|
||||||
}
|
}
|
||||||
return supportedImageFormatStrings;
|
return supportedImageFormatStrings;
|
||||||
|
@ -1276,7 +1276,7 @@ YACReaderPageFlowGL::~YACReaderPageFlowGL()
|
|||||||
|
|
||||||
makeCurrent();
|
makeCurrent();
|
||||||
|
|
||||||
for (auto image : images) {
|
for (auto &image : images) {
|
||||||
if (image.texture != defaultTexture) {
|
if (image.texture != defaultTexture) {
|
||||||
if (image.texture->isCreated()) {
|
if (image.texture->isCreated()) {
|
||||||
image.texture->destroy();
|
image.texture->destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user