Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix typos in libs subdirectory Fixes typos in source documentation and comments.

Kunda Kidd9abd4b83e7
diff --git a/libs/global/KisAdaptedLock.h b/libs/global/KisAdaptedLock.h
index 33dfcb9d01..41aafe820e 100644
--- a/libs/global/KisAdaptedLock.h
+++ b/libs/global/KisAdaptedLock.h
@@ -17,7 +17,7 @@
* `unlock()` and (optionally) `try_lock()` interface and
* pass it to `KisAdaptedLock`. The resulting class will
* behave as normal `std::unique_lock` and lock/unlock the
- * object as you intructed it.
+ * object as you instructed it.
*
* See examples in `KisCursorOverrideLockAdapter` and
* `KisLockFrameGenerationLock`
diff --git a/libs/global/KisBezierPatchParamSpaceUtils.h b/libs/global/KisBezierPatchParamSpaceUtils.h
index 9a516a485f..93216317c7 100644
--- a/libs/global/KisBezierPatchParamSpaceUtils.h
+++ b/libs/global/KisBezierPatchParamSpaceUtils.h
@@ -59,7 +59,7 @@ struct Range
* Returns the "forward distance" between `*this` and `rhs`. The forward
* distance is undefined if the ranges overlap.
*
- * - if the ranges overlap ot touch each other with at least one
+ * - if the ranges overlap or touch each other with at least one
* point, then std::nullopt is returned
*
* - if `*this` is placed to the _left_ of `rhs`, then the distance
@@ -126,7 +126,7 @@ QDebug operator<<(QDebug dbg, const Range &r)
* the source space
* @param srcPrecision src-space precision at which the search is stopped
* @param squeezeRange when doing iterational search, pass the opposite-axis
- * range of the rectange
+ * range of the rectangle
* @return a pair of {externalRange, internalRange} which "covers" and "is covered"
* by the rectangle correspondingly
*
diff --git a/libs/global/KisMpl.h b/libs/global/KisMpl.h
index a7be4c4c8f..f00393706e 100644
--- a/libs/global/KisMpl.h
+++ b/libs/global/KisMpl.h
@@ -425,10 +425,10 @@ inline auto mem_greater_equal(MemTypeNoRef (Class::*ptr)() const noexcept, MemTy
*
* std::vector<Struct> vec({{0},{1},{2},{3}});
*
- * // find the first element, whose 'id' is not less that 1
+ * // find the first element, whose 'id' is not less than 1
* auto it1 = std::lower_bound(vec.begin(), vec.end(), 1, kismpl::mem_less(&Struct::id));
*
- * // find the first element, whose 'id' retunred by 'idConstFunc()' is not less that 1
+ * // find the first element, whose 'id' returned by 'idConstFunc()' is not less than 1
* auto it2 = std::lower_bound(vec.begin(), vec.end(), 1, kismpl::mem_less(&Struct::idConstFunc, 1));
*
* // the functor can automatically dereference pointers and shared pointers
diff --git a/libs/global/KisSynchronizedConnection.h b/libs/global/KisSynchronizedConnection.h
index a52fc495da..7d3ee334a2 100644
--- a/libs/global/KisSynchronizedConnection.h
+++ b/libs/global/KisSynchronizedConnection.h
@@ -56,7 +56,7 @@ public:
* actions are executed in the GUI thread, and (usually) don't have an event
* loop at all
*
- * Defautl value: false
+ * Default value: false
*/
static void setAutoModeForUnittestsEnabled(bool value);
static bool isAutoModeForUnittestsEnabled();
diff --git a/libs/global/KisUsageLogger.h b/libs/global/KisUsageLogger.h
index 50f6fa4ff7..d27a0a0f05 100644
--- a/libs/global/KisUsageLogger.h
+++ b/libs/global/KisUsageLogger.h
@@ -26,7 +26,7 @@ public:
static void close();
/// basic system information
- /// (there is other information spreaded in the code
+ /// (there is other information spread in the code
/// check usages of writeSysInfo for details)
static QString basicSystemInfo();
diff --git a/libs/global/kis_algebra_2d.h b/libs/global/kis_algebra_2d.h
index b05c32809d..58a08f6787 100644
--- a/libs/global/kis_algebra_2d.h
+++ b/libs/global/kis_algebra_2d.h
@@ -839,7 +839,7 @@ QPointF KRITAGLOBAL_EXPORT moveElasticPoint(const QPointF &pt,
* @param pt point in question, tied to points \p base, \p anchorPoints
* using springs
* @param base initial position of the dragged point
- * @param newBase final position of tht dragged point
+ * @param newBase final position of the dragged point
* @param anchorPoints anchor points
* @return the new position of \p pt
*
diff --git a/libs/global/kis_global.h b/libs/global/kis_global.h
index 186e0c3ed2..fdad1fe2af 100644
--- a/libs/global/kis_global.h
+++ b/libs/global/kis_global.h
@@ -37,7 +37,7 @@ template <typename T>
constexpr inline const T &kisBoundFast(const T &min, const T &val, const T &max)
{
/**
- * This is a fork of an old verion of qBound. It has the following properties:
+ * This is a fork of an old version of qBound. It has the following properties:
* 1) Does **not** have asserts (we cannot have them in blendmodes)
* 2) Does not have automatic type deduction. The user must explicitly type the
* common type in case of ambiguity.
diff --git a/libs/image/brushengine/kis_paint_information.h b/libs/image/brushengine/kis_paint_information.h
index f933f9d987..ee30e3acc8 100644
--- a/libs/image/brushengine/kis_paint_information.h
+++ b/libs/image/brushengine/kis_paint_information.h
@@ -302,7 +302,7 @@ public:
// TODO: Refactor the static mix functions to non-static in-place mutation
// versions like mixOtherOnlyPosition and mixOtherWithoutTime.
// Heap allocation on Windows is awfully slow and will fragment the memory
- // badly. Since KisPaintInformation allocates on the heap, we should re-use
+ // badly. Since KisPaintInformation allocates on the heap, we should reuse
// existing instance whenever possible, especially in loops.
// Ref: https://phabricator.kde.org/D6578
diff --git a/libs/image/tiles3/kis_tiled_data_manager.cc b/libs/image/tiles3/kis_tiled_data_manager.cc
index 31e618da58..956c79dd45 100644
--- a/libs/image/tiles3/kis_tiled_data_manager.cc
+++ b/libs/image/tiles3/kis_tiled_data_manager.cc
@@ -22,9 +22,9 @@
#include "kis_global.h"
-/* The data area is divided into tiles each say 64x64 pixels (defined at compiletime)
+/* The data area is divided into tiles each say 64x64 pixels (defined at compile time)
* The tiles are laid out in a matrix that can have negative indexes.
- * The matrix grows automatically if needed (a call for writeacces to a tile
+ * The matrix grows automatically if needed (a call for writeaccess to a tile
* outside the current extent)
* Even though the matrix has grown it may still not contain tiles at specific positions.
* They are created on demand
diff --git a/libs/resources/KisDatabaseTransactionLock.h b/libs/resources/KisDatabaseTransactionLock.h
index 960f59152d..557e74eecf 100644
--- a/libs/resources/KisDatabaseTransactionLock.h
+++ b/libs/resources/KisDatabaseTransactionLock.h
@@ -34,7 +34,7 @@ private:
/**
* A RAII-style class for managing transactions over a database.
*
- * When the lock is created (and locked) a transacion is started. If the
+ * When the lock is created (and locked) a transaction is started. If the
* lock is destroyed before the commit() is explicitly called, then the
* transaction is **rolled back**.
*
@@ -67,7 +67,7 @@ private:
*
* NOTE:
*
- * As a rule of thumb, always wrap the actions performing mutliple
+ * As a rule of thumb, always wrap the actions performing multiple
* database-modifying steps into a transaction. It will perform
* much (~10 times) faster in SQLite, because otherwise SQLite will
* implicitly wrap every single action into its own transaction and
diff --git a/libs/resources/KisResourceLocator.cpp b/libs/resources/KisResourceLocator.cpp
index 3be4abb676..9477e2feeb 100644
--- a/libs/resources/KisResourceLocator.cpp
+++ b/libs/resources/KisResourceLocator.cpp
@@ -970,7 +970,7 @@ QString KisResourceLocator::filePathForResource(KoResourceSP resource)
void KisResourceLocator::updateFontStorage()
{
if (!KisResourceCacheDb::synchronizeStorage(fontStorage())) {
- qWarning() << i18n("Could not synchronize updated font registery with the database");
+ qWarning() << i18n("Could not synchronize updated font registry with the database");
} else {
Q_EMIT storageResynchronized(fontStorage()->location(), false);
}
diff --git a/libs/resources/sql/0_0_18_0002_update_metadata_table_constraints.sql b/libs/resources/sql/0_0_18_0002_update_metadata_table_constraints.sql
index 122b5feb4d..235ed5862a 100644
--- a/libs/resources/sql/0_0_18_0002_update_metadata_table_constraints.sql
+++ b/libs/resources/sql/0_0_18_0002_update_metadata_table_constraints.sql
@@ -1,6 +1,6 @@
PRAGMA foreign_keys=off;
--- Create a new table with the contraints set
+-- Create a new table with the constraints set
CREATE TABLE metadata_new (
id INTEGER PRIMARY KEY
, foreign_id INTEGER
diff --git a/libs/resourcewidgets/KisResourceItemListView.cpp b/libs/resourcewidgets/KisResourceItemListView.cpp
index 38c94da2b0..a31a3303d6 100644
--- a/libs/resourcewidgets/KisResourceItemListView.cpp
+++ b/libs/resourcewidgets/KisResourceItemListView.cpp
@@ -80,7 +80,7 @@ void KisResourceItemListView::setListViewMode(ListViewMode viewMode)
setFlow(Flow::LeftToRight);
setWrapping(false);
- // this is the only way to hide it and not have it ocupy space
+ // this is the only way to hide it and not have it occupy space
horizontalScrollBar()->setStyleSheet("QScrollBar::horizontal {height: 0px;}");
setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
diff --git a/libs/resourcewidgets/KisResourceItemListWidget.cpp b/libs/resourcewidgets/KisResourceItemListWidget.cpp
index 6da413743a..6cc7967c6e 100644
--- a/libs/resourcewidgets/KisResourceItemListWidget.cpp
+++ b/libs/resourcewidgets/KisResourceItemListWidget.cpp
@@ -71,7 +71,7 @@ void KisResourceItemListWidget::setListViewMode(ListViewMode viewMode)
setFlow(Flow::LeftToRight);
setWrapping(false);
- // this is the only way to hide it and not have it ocupy space
+ // this is the only way to hide it and not have it occupy space
horizontalScrollBar()->setStyleSheet("QScrollBar::horizontal {height: 0px;}");
setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
break;
diff --git a/libs/resourcewidgets/KisResourceItemListWidget.h b/libs/resourcewidgets/KisResourceItemListWidget.h
index beeba34d82..a4c51d2c58 100644
--- a/libs/resourcewidgets/KisResourceItemListWidget.h
+++ b/libs/resourcewidgets/KisResourceItemListWidget.h
@@ -39,7 +39,7 @@ public:
* @brief setStrictSelectionMode sets additional restrictions on the selection.
*
* When in QAbstractItemView::SingleSelection mode, this ensures that the
- * selection never gets transfered to another item. Instead, the selection
+ * selection never gets transferred to another item. Instead, the selection
* is cleared if the current item gets removed (filtered) from the model.
* Furthermore, it prevents users from deselecting the current item with Ctrl+click.
* This behavior is important for resource selectors.
diff --git a/libs/ui/KisApplication.cpp b/libs/ui/KisApplication.cpp
index 04f8bfa541..10a247c288 100644
--- a/libs/ui/KisApplication.cpp
+++ b/libs/ui/KisApplication.cpp
@@ -931,7 +931,7 @@ bool KisApplication::isStoreApplication()
#ifdef Q_OS_WIN
// This is also true for user-installed MSIX, but that's
// likely only true in institutional situations, where
- // we don't want to show the beggining banner either.
+ // we don't want to show the beginning banner either.
if (KisWindowsPackageUtils::isRunningInPackage()) {
return true;
}
diff --git a/libs/ui/animation/KisFFMpegWrapper.cpp b/libs/ui/animation/KisFFMpegWrapper.cpp
index f55ec9212b..e43e99d6a9 100644
--- a/libs/ui/animation/KisFFMpegWrapper.cpp
+++ b/libs/ui/animation/KisFFMpegWrapper.cpp
@@ -618,7 +618,7 @@ QJsonObject KisFFMpegWrapper::findProcessInfo(const QString &processName, const
}
QStringList KisFFMpegWrapper::getSupportedCodecs(const QJsonObject& ffmpegProcessInfo) {
- // TODO: I really don't like having to deal with JSON in C++ code as fequently as we are here.
+ // TODO: I really don't like having to deal with JSON in C++ code as frequently as we are here.
// We should make a proper datatype for FFMPEG Process Information!
QStringList encodersToReturn = {};
diff --git a/libs/ui/forms/wdggeneralsettings.ui b/libs/ui/forms/wdggeneralsettings.ui
index 862f2506a8..059050d22d 100644
--- a/libs/ui/forms/wdggeneralsettings.ui
+++ b/libs/ui/forms/wdggeneralsettings.ui
@@ -1069,7 +1069,7 @@
<item>
<widget class="QCheckBox" name="m_chkAutoPin">
<property name="toolTip">
- <string>When this option is checked newly created layers will be automatically pinned to the animation timeline. This is useful when animating with a small number of layers or when many elements on different animated layers are interacting with eachother.</string>
+ <string>When this option is checked newly created layers will be automatically pinned to the animation timeline. This is useful when animating with a small number of layers or when many elements on different animated layers are interacting with each other.</string>
</property>
<property name="text">
<string>Automatically pin new layers to timeline</string>
diff --git a/libs/ui/qtsingleapplication/qtlockedfile.cpp b/libs/ui/qtsingleapplication/qtlockedfile.cpp
index 78f20bc26a..4cca306d11 100644
--- a/libs/ui/qtsingleapplication/qtlockedfile.cpp
+++ b/libs/ui/qtsingleapplication/qtlockedfile.cpp
@@ -121,8 +121,8 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const
can be locked.
If \a block is true, this function will block until the lock is
- aquired. If \a block is false, this function returns \e false
- immediately if the lock cannot be aquired.
+ acquired. If \a block is false, this function returns \e false
+ immediately if the lock cannot be acquired.
If this object already has a lock of type \a mode, this function
returns \e true immediately. If this object has a lock of a
diff --git a/libs/ui/utils/KisFileIconCreator.cpp b/libs/ui/utils/KisFileIconCreator.cpp
index c33124a6ca..6866b7fd4c 100644
--- a/libs/ui/utils/KisFileIconCreator.cpp
+++ b/libs/ui/utils/KisFileIconCreator.cpp
@@ -123,7 +123,7 @@ bool KisFileIconCreator::createFileIcon(QString path, QIcon &icon, qreal deviceP
}
} else if (mimeType == "image/tiff" || mimeType == "image/x-tiff" || mimeType == "image/jxl") {
// Workaround for a bug in Qt tiff QImageIO plugin
- // XXX: Also for JPEG-XL if KImageFormats haven't updated to accomodate libjxl >= v0.9.0 API changes.
+ // XXX: Also for JPEG-XL if KImageFormats haven't updated to accommodate libjxl >= v0.9.0 API changes.
QScopedPointer<KisDocument> doc(KisPart::instance()->createTemporaryDocument());
doc->setFileBatchMode(true);
bool r = doc->openPath(path, KisDocument::DontAddToRecent);
diff --git a/libs/ui/widgets/KisScreenColorSampler.cpp b/libs/ui/widgets/KisScreenColorSampler.cpp
index c513f05cb4..85aa5b46a6 100644
--- a/libs/ui/widgets/KisScreenColorSampler.cpp
+++ b/libs/ui/widgets/KisScreenColorSampler.cpp
@@ -291,7 +291,7 @@ void KisScreenColorSampler::continueUpdateColorSampling(const QPoint &globalPos)
{
const KoColor color = grabScreenColor(globalPos);
// QTBUG-39792, do not change standard, custom color selectors while moving as
- // otherwise it is not possible to pre-select a custom cell for assignment.
+ // otherwise it is not possible to preselect a custom cell for assignment.
setCurrentColor(color);
Q_EMIT sigNewColorHovered(currentColor());
updateColorLabelText(globalPos);
diff --git a/libs/ui/widgets/KoStrokeConfigWidget.cpp b/libs/ui/widgets/KoStrokeConfigWidget.cpp
index 80dc124756..8b28d22f56 100644
--- a/libs/ui/widgets/KoStrokeConfigWidget.cpp
+++ b/libs/ui/widgets/KoStrokeConfigWidget.cpp
@@ -227,7 +227,7 @@ KoStrokeConfigWidget::KoStrokeConfigWidget(KoCanvasBase *canvas, QWidget * paren
d->ui->lineWidth->preventDecimalsChangeFromUnitManager(true);
d->ui->lineWidth->setUnit(KoUnit(KoUnit::Point));
// if someone wants 0, just set to "none" on UI
- // note: when intialized, there's probably no document opened or even if some documents are opened, the resolution
+ // note: when initialized, there's probably no document opened or even if some documents are opened, the resolution
// of document may not be the same...
// min/max/step are then defined in Pt - values here are considered @600dpi; 0.10px = 0.03Pt / 1000px = 240.00pt
d->ui->lineWidth->setMinMaxStep(0.03, 240.0, 0.01);
diff --git a/libs/widgets/KisLevelsSlider.h b/libs/widgets/KisLevelsSlider.h
index 76542c974e..e6461e949a 100644
--- a/libs/widgets/KisLevelsSlider.h
+++ b/libs/widgets/KisLevelsSlider.h
@@ -142,7 +142,7 @@ protected:
* @brief This is a simple input levels slider that has no gamma handle. Use it
* if you want to show a simple mapping or contrast adjustment. The handles
* are constrained so that the black point handle can not pass the white point
- * handle and viceversa
+ * handle and vice-versa
*/
class KRITAWIDGETS_EXPORT KisInputLevelsSlider : public KisLevelsSlider
{
@@ -215,7 +215,7 @@ protected:
/**
* @brief This is a input levels slider that has a gamma handle. The handles
* are constrained so that the black point handle can not pass the white point
- * handle and viceversa
+ * handle and vice-versa
*/
class KRITAWIDGETS_EXPORT KisInputLevelsSliderWithGamma : public KisInputLevelsSlider
{
@@ -294,19 +294,19 @@ public Q_SLOTS:
/**
* @brief Sets the black point. For this slider the black and the white
* points are always in the same position, so changing the black point will
- * also change the white point and viceversa
+ * also change the white point and vice-versa
*/
void setHandlePosition(int handleIndex, qreal newPosition) override;
/**
* @brief Sets the black point. For this slider the black and the white
* points are always in the same position, so changing the black point will
- * also change the white point and viceversa
+ * also change the white point and vice-versa
*/
void setBlackPoint(qreal newBlackPoint) override;
/**
* @brief Sets the white point. For this slider the black and the white
* points are always in the same position, so changing the black point will
- * also change the white point and viceversa
+ * also change the white point and vice-versa
*/
void setWhitePoint(qreal newWhitePoint) override;
void reset(qreal newBlackPoint, qreal newWhitePoint) override;
diff --git a/libs/widgets/KisWidgetConnectionUtils.h b/libs/widgets/KisWidgetConnectionUtils.h
index 4a3007ed73..0060140d51 100644
--- a/libs/widgets/KisWidgetConnectionUtils.h
+++ b/libs/widgets/KisWidgetConnectionUtils.h
@@ -132,7 +132,7 @@ using DoubleSpinBoxState = SpinBoxState<qreal>;
* (via lager::reader); the type of the property should be a "state",
* e.g. `CheckBoxState`.
* \param writeProperty the qt-property of the model where the user-selected value will be written
- * to (should be either lager::cursor or lager::wirter); the type of the property
+ * to (should be either lager::cursor or lager::writer); the type of the property
* should coincide with the value type of the widget, e.g. `bool` for `QCheckBox`
*/
void KRITAWIDGETS_EXPORT connectControl(QAbstractButton *button, QObject *source, const char *property);
diff --git a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
index 91a251ee8b..074ad6fe27 100644
--- a/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
+++ b/libs/widgetutils/xmlgui/kkeysequencewidget.cpp
@@ -885,7 +885,7 @@ void KKeySequenceButton::keyPressEvent(QKeyEvent *e)
// We now have a valid key press.
if (keyQt) {
/**
- * Here is the trap, which is different on every OS. On Widnows Qt
+ * Here is the trap, which is different on every OS. On Windows, Qt
* has incomprehensible rules on translating AltGr-related key
* sequences into shortcuts. On macOS symbols may confuse Qt when
* using Cmd+Shift-based shortcuts. * So we should just ask Qt