From 5140567853383b7bfe6b80205896e0f6b79a747f Mon Sep 17 00:00:00 2001 From: Kunda Ki Date: Fri, 5 Dec 2025 10:41:17 +0000 Subject: [PATCH] Fix various typos in the codebase Fixes mostly source documentation, comments, and some user-facing typos. Found via `codespell -q 3 -S "*.eps,*.raw" -L ahd,siz,widthn` --- README.md | 4 ++-- autotests/templateimage.h | 2 +- src/imageformats/chunks_p.h | 6 +++--- src/imageformats/dds.cpp | 2 +- src/imageformats/eps.cpp | 2 +- src/imageformats/hdr.cpp | 2 +- src/imageformats/jxl.cpp | 2 +- src/imageformats/jxr.cpp | 2 +- src/imageformats/microexif.cpp | 4 ++-- src/imageformats/microexif_p.h | 2 +- src/imageformats/psd.cpp | 4 ++-- src/imageformats/raw.cpp | 2 +- src/imageformats/raw_p.h | 2 +- src/imageformats/xcf.cpp | 4 ++-- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 4d870d2..5043e34 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,7 @@ in your cmake options.** The following defines can be defined in cmake to modify the behavior of the plugin: -- `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride aligment based on DDS +- `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride alignment based on DDS pitch: it is known that some writers do not set it correctly. ### The HEIF plugin @@ -382,7 +382,7 @@ The following defines can be defined in cmake to modify the behavior of the plugin: - `JXR_DENY_FLOAT_IMAGE`: disables the use of float images and consequently any HDR data will be lost. -- `JXR_DISABLE_DEPTH_CONVERSION`: remove the neeeds of additional memory by +- `JXR_DISABLE_DEPTH_CONVERSION`: remove the needs of additional memory by disabling the conversion between different color depths (e.g. RGBA64bpp to RGBA32bpp) at the cost of reduced compatibility. - `JXR_DISABLE_BGRA_HACK`: Windows displays and opens JXR files correctly out diff --git a/autotests/templateimage.h b/autotests/templateimage.h index d2bb504..d9a0008 100644 --- a/autotests/templateimage.h +++ b/autotests/templateimage.h @@ -56,7 +56,7 @@ public: /*! * \brief skipSequentialDeviceTest - * \return tre it the sequential test should be skipped. + * \return True if the sequential test should be skipped. */ bool skipSequentialDeviceTest() const; diff --git a/src/imageformats/chunks_p.h b/src/imageformats/chunks_p.h index 94266be..bb9d485 100644 --- a/src/imageformats/chunks_p.h +++ b/src/imageformats/chunks_p.h @@ -36,7 +36,7 @@ Q_DECLARE_LOGGING_CATEGORY(LOG_IFFPLUGIN) #define LIST_CHUNK QByteArray("LIST") #define PROP_CHUNK QByteArray("PROP") -// Main chuncks (Maya) +// Main chunks (Maya) #define CAT4_CHUNK QByteArray("CAT4") // 4 byte alignment #define FOR4_CHUNK QByteArray("FOR4") #define LIS4_CHUNK QByteArray("LIS4") @@ -145,7 +145,7 @@ public: /*! * \brief bytes - * \return The size (in bytes) of the chunck data. + * \return The size (in bytes) of the chunk data. */ quint32 bytes() const; @@ -870,7 +870,7 @@ public: /*! * \brief transformation * \return The image transformation. - * \note The Default implentation returns the trasformation of EXIF chunk (if any). + * \note The Default implementation returns the transformation of EXIF chunk (if any). */ virtual QImageIOHandler::Transformation transformation() const; diff --git a/src/imageformats/dds.cpp b/src/imageformats/dds.cpp index e9caf66..c636c32 100644 --- a/src/imageformats/dds.cpp +++ b/src/imageformats/dds.cpp @@ -20,7 +20,7 @@ #include #ifndef DDS_DISABLE_STRIDE_ALIGNMENT -// Disable the stride aligment based on DDS pitch: it is known that some writers do not set it correctly +// Disable the stride alignment based on DDS pitch: it is known that some writers do not set it correctly // #define DDS_DISABLE_STRIDE_ALIGNMENT #endif diff --git a/src/imageformats/eps.cpp b/src/imageformats/eps.cpp index 6c20c6e..f828fe7 100644 --- a/src/imageformats/eps.cpp +++ b/src/imageformats/eps.cpp @@ -179,7 +179,7 @@ bool EPSHandler::read(QImage *image) const QString gsExec = QStandardPaths::findExecutable(QStringLiteral("gs")); if (gsExec.isEmpty()) { - qCWarning(EPSPLUGIN) << "Couldn't find gs exectuable (from GhostScript) in PATH."; + qCWarning(EPSPLUGIN) << "Couldn't find gs executable (from GhostScript) in PATH."; return false; } diff --git a/src/imageformats/hdr.cpp b/src/imageformats/hdr.cpp index ae88254..866ff77 100644 --- a/src/imageformats/hdr.cpp +++ b/src/imageformats/hdr.cpp @@ -514,7 +514,7 @@ bool HDRHandler::canRead(QIODevice *device) return true; } - // allow to load offical test cases: https://radsite.lbl.gov/radiance/framed.html + // allow to load official test cases: https://radsite.lbl.gov/radiance/framed.html device->startTransaction(); auto h = HDRHandlerPrivate::readHeader(device); device->rollbackTransaction(); diff --git a/src/imageformats/jxl.cpp b/src/imageformats/jxl.cpp index a7faa32..3ee13df 100644 --- a/src/imageformats/jxl.cpp +++ b/src/imageformats/jxl.cpp @@ -180,7 +180,7 @@ bool QJpegXLHandler::ensureDecoder() int num_worker_threads = QThread::idealThreadCount(); if (!m_runner && num_worker_threads >= 4) { /* use half of the threads because plug-in is usually used in environment - * where application performs another tasks in backround (pre-load other images) */ + * where application performs other tasks in the background (pre-load other images) */ num_worker_threads = num_worker_threads / 2; num_worker_threads = qBound(2, num_worker_threads, 64); m_runner = JxlThreadParallelRunnerCreate(nullptr, num_worker_threads); diff --git a/src/imageformats/jxr.cpp b/src/imageformats/jxr.cpp index 40d7160..936ab4d 100644 --- a/src/imageformats/jxr.cpp +++ b/src/imageformats/jxr.cpp @@ -45,7 +45,7 @@ Q_LOGGING_CATEGORY(LOG_JXRPLUGIN, "kf.imageformats.plugins.jxr", QtWarningMsg) // #define JXR_DENY_FLOAT_IMAGE /*! - * Remove the neeeds of additional memory by disabling the conversion between + * Remove the needs of additional memory by disabling the conversion between * different color depths (e.g. RGBA64bpp to RGBA32bpp). * * NOTE: Leaving deptch conversion enabled (default) ensures maximum read compatibility. diff --git a/src/imageformats/microexif.cpp b/src/imageformats/microexif.cpp index 9eae917..c9e3fb9 100644 --- a/src/imageformats/microexif.cpp +++ b/src/imageformats/microexif.cpp @@ -256,7 +256,7 @@ static bool checkHeader(QDataStream &ds) /*! * \brief updatePos - * Write the current stram position in \a pos position as uint32. + * Write the current stream position in \a pos position as uint32. * \return True on success, otherwise false; */ static bool updatePos(QDataStream &ds, quint32 pos) @@ -510,7 +510,7 @@ static QByteArray readBytes(QDataStream &ds, quint32 count, bool asciiz) * \param pos The position of the IFD. * \param knownTags List of known and supported tags. * \param nextIfd The position of next IFD (0 if none). - * \return True on succes, otherwise false. + * \return True on success, otherwise false. */ static bool readIfd(QDataStream &ds, MicroExif::Tags &tags, quint32 pos = 0, const KnownTags &knownTags = staticTagTypes, quint32 *nextIfd = nullptr) { diff --git a/src/imageformats/microexif_p.h b/src/imageformats/microexif_p.h index fdfcc70..887a13b 100644 --- a/src/imageformats/microexif_p.h +++ b/src/imageformats/microexif_p.h @@ -125,7 +125,7 @@ public: /*! * \brief transformation - * \return The orientation converted in the equvalent Qt transformation. + * \return The orientation converted in the equivalent Qt transformation. * \sa orientation */ QImageIOHandler::Transformation transformation() const; diff --git a/src/imageformats/psd.cpp b/src/imageformats/psd.cpp index 5305dad..4e391e2 100644 --- a/src/imageformats/psd.cpp +++ b/src/imageformats/psd.cpp @@ -640,7 +640,7 @@ static bool setResolution(QImage &img, const PSDImageResourceSection &irs) s.skipRawData(4); // Display data (not used here) - s >> i32; // Vertial resolution in pixels per inch. + s >> i32; // Vertical resolution in pixels per inch. if (i32 <= 0) return false; auto vres = dpi2ppm(fixedPointToDouble(i32)); @@ -1529,7 +1529,7 @@ bool PSDHandler::read(QImage *image) planarToChunchy(scanLine, rawStride.data(), header.width, 0, imgChannels); planarToChunchy(scanLine, rawStride.data(), header.width, 1, imgChannels); planarToChunchy(scanLine, rawStride.data(), header.width, 2, imgChannels); - } else { // 32-bits float images: Grayscale (coverted to equivalent integer 16-bits) + } else { // 32-bits float images: Grayscale (converted to equivalent integer 16-bits) planarToChunchyFloatToUInt16(scanLine, rawStride.data(), header.width, c, imgChannels); } } diff --git a/src/imageformats/raw.cpp b/src/imageformats/raw.cpp index fb98489..f1cfcca 100644 --- a/src/imageformats/raw.cpp +++ b/src/imageformats/raw.cpp @@ -610,7 +610,7 @@ void setParams(QImageIOHandler *handler, LibRaw *rawProcessor) * \brief use_auto_wb * Average the whole image for white balance (0 - off, 1 - on) * - * This is usefull if no camera white balance is available. + * This is useful if no camera white balance is available. */ params.use_auto_wb = T_AW(quality); diff --git a/src/imageformats/raw_p.h b/src/imageformats/raw_p.h index b14f344..0b7daaf 100644 --- a/src/imageformats/raw_p.h +++ b/src/imageformats/raw_p.h @@ -49,7 +49,7 @@ private: * _: reserved (should be zero) * I: interpolation quality (0 - linear, 1 - VNG, 2 - PPG, 3 - AHD, 4 - DCB, 11 - DHT, 12 - AAHD) * C: output colorspace (0 - raw, 1 - sRGB, 2 - Adobe, 3 - Wide, 4 - ProPhoto, 5 - XYZ, 6 - ACES, 7 - DCI-P3, 8 - Rec2020) - * W: use camera white balace (0 - off, 1 - on) + * W: use camera white balance (0 - off, 1 - on) * A: use auto white balance (0 - off, 1 - on) * B: output bit per sample (0 - 8-bits, 1 - 16-bits) * H: half size image (0 - off, 1 - on) diff --git a/src/imageformats/xcf.cpp b/src/imageformats/xcf.cpp index b2ad9fa..fd2adbe 100644 --- a/src/imageformats/xcf.cpp +++ b/src/imageformats/xcf.cpp @@ -1379,13 +1379,13 @@ bool XCFImageFormat::composeTiles(XCFImage &xcf_image) // SANITY CHECK: Avoid to load XCF with a layer grater than 10 times the final image if (qint64(layer.width) * layer.height / 10 > qint64(xcf_image.header.width) * xcf_image.header.height) { if (qint64(layer.width) * layer.height > 16384 * 16384) { // large layers only - qCWarning(XCFPLUGIN) << "Euristic sanity check: the image may be corrupted!"; + qCWarning(XCFPLUGIN) << "Heuristic sanity check: the image may be corrupted!"; return false; } } #ifndef XCF_QT5_SUPPORT - // Qt 6 image allocation limit calculation: we have to check the limit here because the image is splitted in + // Qt 6 image allocation limit calculation: we have to check the limit here because the image is split in // tiles of 64x64 pixels. The required memory to build the image is at least doubled because tiles are loaded // and then the final image is created by copying the tiles inside it. // NOTE: on Windows to open a 10GiB image the plugin uses 28GiB of RAM