diff --git a/src/imageformats/ani.cpp b/src/imageformats/ani.cpp index ebf8082..5fa0d46 100644 --- a/src/imageformats/ani.cpp +++ b/src/imageformats/ani.cpp @@ -383,7 +383,7 @@ bool ANIHandler::ensureScanned() const // TODO should we check that the number of rate entries matches nSteps? auto *dataPtr = data.data(); - QVector list; + QList list; for (int i = 0; i < data.size(); i += sizeof(quint32_le)) { const auto entry = *(reinterpret_cast(dataPtr + i)); list.append(entry); diff --git a/src/imageformats/ani_p.h b/src/imageformats/ani_p.h index e33eee4..f5cbca6 100644 --- a/src/imageformats/ani_p.h +++ b/src/imageformats/ani_p.h @@ -41,14 +41,14 @@ private: int m_frameCount = 0; // "physical" frames int m_imageCount = 0; // logical images // Stores a custom sequence of images - QVector m_imageSequence; + QList m_imageSequence; // and the corresponding offsets where they are // since we can't read the image data sequentally in this case then - QVector m_frameOffsets; + QList m_frameOffsets; qint64 m_firstFrameOffset = 0; int m_displayRate = 0; - QVector m_displayRates; + QList m_displayRates; QString m_name; QString m_artist; diff --git a/src/imageformats/jxl_p.h b/src/imageformats/jxl_p.h index 7a4af0b..3e93808 100644 --- a/src/imageformats/jxl_p.h +++ b/src/imageformats/jxl_p.h @@ -14,8 +14,8 @@ #include #include #include +#include #include -#include #include @@ -71,7 +71,7 @@ private: void *m_runner; JxlBasicInfo m_basicinfo; - QVector m_framedelays; + QList m_framedelays; int m_next_image_delay; QImage m_current_image; diff --git a/src/imageformats/psd.cpp b/src/imageformats/psd.cpp index 710d1a6..85ef237 100644 --- a/src/imageformats/psd.cpp +++ b/src/imageformats/psd.cpp @@ -126,7 +126,7 @@ struct PSDDuotoneOptions { */ struct PSDColorModeDataSection { PSDDuotoneOptions duotone; - QVector palette; + QList palette; }; using PSDImageResourceSection = QHash; @@ -458,7 +458,7 @@ PSDColorModeDataSection readColorModeDataSection(QDataStream &s, bool *ok = null } else { // read the palette (768 bytes) auto&& palette = cms.palette; - QVector vect(size); + QList vect(size); for (auto&& v : vect) s >> v; for (qsizetype i = 0, n = vect.size()/3; i < n; ++i) @@ -1109,7 +1109,7 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img) return false; } - QVector strides(header.height * header.channel_count, raw_count); + QList strides(header.height * header.channel_count, raw_count); // Read the compressed stride sizes if (compression) { for (auto&& v : strides) { @@ -1124,7 +1124,7 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img) } // calculate the absolute file positions of each stride (required when a colorspace conversion should be done) auto device = stream.device(); - QVector stridePositions(strides.size()); + QList stridePositions(strides.size()); if (!stridePositions.isEmpty()) { stridePositions[0] = device->pos(); } diff --git a/src/imageformats/ras.cpp b/src/imageformats/ras.cpp index b149909..bd250ff 100644 --- a/src/imageformats/ras.cpp +++ b/src/imageformats/ras.cpp @@ -221,7 +221,7 @@ static bool LoadRAS(QDataStream &s, const RasHeader &ras, QImage &img) // Read palette if needed. if (ras.ColorMapType == RAS_COLOR_MAP_TYPE_RGB) { - QVector palette(ras.ColorMapLength); + QList palette(ras.ColorMapLength); for (quint32 i = 0; i < ras.ColorMapLength; ++i) { s >> palette[i]; } diff --git a/src/imageformats/rgb.cpp b/src/imageformats/rgb.cpp index 99e3081..bfd92d3 100644 --- a/src/imageformats/rgb.cpp +++ b/src/imageformats/rgb.cpp @@ -22,13 +22,13 @@ #include "rgb_p.h" #include "util_p.h" +#include #include -#include #include #include -class RLEData : public QVector +class RLEData : public QList { public: RLEData() @@ -61,7 +61,7 @@ public: { } uint insert(const uchar *d, uint l); - QVector vector(); + QList vector(); void setBaseOffset(uint o) { _offset = o; @@ -107,7 +107,7 @@ private: QByteArray _data; QByteArray::Iterator _pos; RLEMap _rlemap; - QVector _rlevector; + QList _rlevector; uint _numrows; bool readData(QImage &); @@ -421,9 +421,9 @@ uint RLEMap::insert(const uchar *d, uint l) return QMap::insert(data, _counter++).value(); } -QVector RLEMap::vector() +QList RLEMap::vector() { - QVector v(size()); + QList v(size()); for (Iterator it = begin(); it != end(); ++it) { v.replace(it.value(), &it.key()); } diff --git a/src/imageformats/util_p.h b/src/imageformats/util_p.h index 2429ffe..c318ea3 100644 --- a/src/imageformats/util_p.h +++ b/src/imageformats/util_p.h @@ -13,7 +13,7 @@ #include #include -// QVector uses some extra space for stuff, hence the 32 here suggested by Thiago Macieira +// QList uses some extra space for stuff, hence the 32 here suggested by Thiago Macieira static constexpr int kMaxQVectorSize = std::numeric_limits::max() - 32; // On Qt 6 to make the plugins fail to allocate if the image size is greater than QImageReader::allocationLimit() diff --git a/src/imageformats/xcf.cpp b/src/imageformats/xcf.cpp index 7dd5da9..9a20cbe 100644 --- a/src/imageformats/xcf.cpp +++ b/src/imageformats/xcf.cpp @@ -14,10 +14,10 @@ #include #include #include +#include #include #include #include -#include #include #ifndef XCF_QT5_SUPPORT @@ -110,7 +110,7 @@ struct RandomTable { * parallel processing on a tile-by-tile basis. Here, though, * we just read them in en-masse and store them in a matrix. */ -typedef QVector> Tiles; +typedef QList> Tiles; class XCFImageFormat { @@ -492,7 +492,7 @@ public: qint32 tattoo; //!< (unique identifier?) quint32 unit; //!< Units of The GIMP (inch, mm, pica, etc...) qint32 num_colors = 0; //!< number of colors in an indexed image - QVector palette; //!< indexed image color palette + QList palette; //!< indexed image color palette int num_layers; //!< number of layers Layer layer; //!< most recently read layer @@ -545,7 +545,7 @@ private: //! This table is used as a shared grayscale ramp to be set on grayscale //! images. This is because Qt does not differentiate between indexed and //! grayscale images. - static QVector grayTable; + static QList grayTable; //! This table provides the add_pixel saturation values (i.e. 250 + 250 = 255). // static int add_lut[256][256]; - this is so lame waste of 256k of memory @@ -646,7 +646,7 @@ bool XCFImageFormat::random_table_initialized; constexpr RandomTable XCFImageFormat::randomTable; -QVector XCFImageFormat::grayTable; +QList XCFImageFormat::grayTable; bool XCFImageFormat::modeAffectsSourceAlpha(const quint32 type) { @@ -993,7 +993,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream &xcf_io, XCFImage &xcf_imag return false; } - xcf_image.palette = QVector(); + xcf_image.palette = QList(); xcf_image.palette.reserve(xcf_image.num_colors); for (int i = 0; i < xcf_image.num_colors; i++) { @@ -2013,7 +2013,7 @@ bool XCFImageFormat::loadLevel(QDataStream &xcf_io, Layer &layer, qint32 bpp, co const uint blockSize = TILE_WIDTH * TILE_HEIGHT * bpp * 1.5; - QVector buffer; + QList buffer; if (needConvert) { buffer.resize(blockSize * (bpp == 2 ? 2 : 1)); }