Skip to content

Commit

Permalink
Fixed spelling errors found by codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn committed May 11, 2023
1 parent 3266469 commit d2cddb7
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/manual/automapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ A result from the two rules above.
If you have some Automapping rules from before Tiled 1.9, they should still work much as they always did in most cases. When Tiled sees that a rule map contains `regions` layers, it will automatically bring back the old behavior - rules will be matched in order by default, and cells within input regions that are empty in all the input layers for a given layer and index will be treated as "Other".

:::{warning}
In Tiled 1.9.x, the presense of `regions` layers did not imply **MatchInOrder**. If you're using 1.9.x rather than 1.10+ and want to use legacy rules, you'll need to set the **MatchInOrder** map property to `true`.
In Tiled 1.9.x, the presence of `regions` layers did not imply **MatchInOrder**. If you're using 1.9.x rather than 1.10+ and want to use legacy rules, you'll need to set the **MatchInOrder** map property to `true`.
:::

If you'd like to instead update your rules to not rely on any legacy behavior, that can be as simple as deleting your `regions` layer(s), or it might take some extra work, depending on how exactly your rules are set up:
Expand Down
2 changes: 1 addition & 1 deletion src/libtiled/mapobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ QRectF MapObject::boundsUseTile() const
// * It does not deal with rotation.

if (const Tile *tile = mCell.tile()) {
// Using the tile for determing boundary
// Using the tile for determining boundary
// Note the position given is the bottom-left corner so correct for that
return QRectF(QPointF(mPos.x(),
mPos.y() - tile->height()),
Expand Down
2 changes: 1 addition & 1 deletion src/libtiled/mapobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TILEDSHARED_EXPORT MapObject : public Object
* When a polygon is set, the shape determines whether it should be
* interpreted as a filled polygon or a line.
*
* Text objects contain arbitrary text, contained withih their rectangle
* Text objects contain arbitrary text, contained within their rectangle
* (in screen coordinates).
*/
enum Shape {
Expand Down
2 changes: 1 addition & 1 deletion src/libtiled/tiled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Tiled::CompatibilityVersion Tiled::versionFromString(const QString &string)
void Tiled::increaseImageAllocationLimit(int mbLimit)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// Adjust the allocation limit to accomodate larger images
// Adjust the allocation limit to accommodate larger images
const int currentLimit = QImageReader::allocationLimit();
if (currentLimit && currentLimit < mbLimit)
QImageReader::setAllocationLimit(mbLimit);
Expand Down
4 changes: 2 additions & 2 deletions src/libtiled/wangset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ qreal WangSet::wangIdProbability(WangId wangId) const
}

/**
* Returns whether or not the given wangId is valid in the contex of the
* Returns whether or not the given wangId is valid in the context of the
* current wangSet
*/
bool WangSet::wangIdIsValid(WangId wangId) const
Expand Down Expand Up @@ -935,7 +935,7 @@ WangId WangSet::templateWangIdAt(unsigned n) const
break;
case Edge:
for (int i = WangId::NumEdges - 1; i >= 0; --i) {
//this is the number of permutations possible bellow this point in the wangId
//this is the number of permutations possible below this point in the wangId
const int belowPermutations = qPow(colorCount(), i);
const int value = n / belowPermutations;

Expand Down
2 changes: 1 addition & 1 deletion src/libtiled/worldmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ World *WorldManager::addEmptyWorld(const QString &fileName, QString *errorString
/**
* Loads the world with the given \a fileName.
*
* \returns the world if it was loaded succesfully, optionally setting
* \returns the world if it was loaded successfully, optionally setting
* \a errorString when not.
*/
World *WorldManager::loadWorld(const QString &fileName, QString *errorString)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/defold/defoldplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bool DefoldPlugin::write(const Tiled::Map *map, const QString &fileName, Options
double z = 0.0;

while (auto tileLayer = static_cast<Tiled::TileLayer*>(it.next())) {
// Defold exports the z value to be beteen -1 and 1, so these
// Defold exports the z value to be between -1 and 1, so these
// automatic increments should allow up to 10000 layers.
z = optionalProperty(tileLayer, QStringLiteral("z"), z + 0.0001);

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/gmx/gmxplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ bool GmxPlugin::write(const Map *map, const QString &fileName, Options options)
stream.writeAttribute("yview", QString::number(qRound(pos.y())));
stream.writeAttribute("wview", QString::number(qRound(object->width())));
stream.writeAttribute("hview", QString::number(qRound(object->height())));
// Round these incase user adds properties as floats and not ints
// Round these in case user adds properties as floats and not ints
stream.writeAttribute("xport", QString::number(qRound(optionalProperty(object, "xport", 0.0))));
stream.writeAttribute("yport", QString::number(qRound(optionalProperty(object, "yport", 0.0))));
stream.writeAttribute("wport", QString::number(qRound(optionalProperty(object, "wport", 1024.0))));
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/tengine/tengineplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,30 +260,30 @@ bool TenginePlugin::write(const Tiled::Map *map, const QString &fileName, Option
QString lineStop;
QString itemStart;
QString itemStop;
QString seperator;
QString separator;
if (outputLists) {
returnStart = "{";
returnStop = "}";
lineStart = "{";
lineStop = "},";
itemStart = "[[";
itemStop = "]]";
seperator = ",";
separator = ",";
} else {
returnStart = "[[";
returnStop = "]]";
lineStart = "";
lineStop = "";
itemStart = "";
itemStop = "";
seperator = "";
separator = "";
}
out << Qt::endl << "-- ASCII map section" << Qt::endl;
out << "return " << returnStart << Qt::endl;
for (int y = 0; y < height; ++y) {
out << lineStart;
for (int x = 0; x < width; ++x) {
out << itemStart << asciiMap[x + (y * width)] << itemStop << seperator;
out << itemStart << asciiMap[x + (y * width)] << itemStop << separator;
}
if (y == height - 1) {
out << lineStop << returnStop;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/yy/yyplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ static void fillTileLayer(GMRTileLayer &gmrTileLayer, const TileLayer *tileLayer
gmrTileLayer.SerialiseHeight = tileLayer->height();
gmrTileLayer.SerialiseWidth = tileLayer->width();

constexpr unsigned Unintialized = 0x80000000;
constexpr unsigned Uninitialized = 0x80000000;
constexpr unsigned FlippedHorizontally = 0x10000000;
constexpr unsigned FlippedVertically = 0x20000000;
constexpr unsigned Rotated90 = 0x40000000;
Expand All @@ -694,7 +694,7 @@ static void fillTileLayer(GMRTileLayer &gmrTileLayer, const TileLayer *tileLayer
for (int x = 0; x < tileLayer->width(); ++x) {
const Cell &cell = tileLayer->cellAt(x, y);
if (cell.tileset() != tileset) {
gmrTileLayer.tiles.push_back(Unintialized);
gmrTileLayer.tiles.push_back(Uninitialized);
continue;
}

Expand Down Expand Up @@ -946,7 +946,7 @@ static std::unique_ptr<GMRLayer> processObjectGroup(const ObjectGroup *objectGro
view.yview = qRound(mapObject->y());
view.wview = qRound(mapObject->width());
view.hview = qRound(mapObject->height());
// Round these incase user adds properties as floats and not ints
// Round these in case user adds properties as floats and not ints
view.xport = qRound(optionalProperty(mapObject, "xport", 0.0));
view.yport = qRound(optionalProperty(mapObject, "yport", 0.0));
view.wport = qRound(optionalProperty(mapObject, "wport", 1024.0));
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/changetilewangid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ bool ChangeTileWangId::mergeWith(const QUndoCommand *other)
mWangSet == o->mWangSet))
return false;

// suboptimal, could use a map to remove any unnessesary changes if the
// suboptimal, could use a map to remove any unnecessary changes if the
// same tile has multiple changes.
mChanges += o->mChanges;

Expand Down
4 changes: 2 additions & 2 deletions src/tiled/documentmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ bool DocumentManager::switchToDocument(const QString &fileName)

/**
* Switches to the given \a document, if there is already a tab open for it.
* \return whether the switch was succesful
* \return whether the switch was successful
*/
bool DocumentManager::switchToDocument(Document *document)
{
Expand Down Expand Up @@ -450,7 +450,7 @@ void DocumentManager::switchToDocument(MapDocument *mapDocument, QPointF viewCen
}

/**
* Switches to the given \a mapDocument, taking tilesets into accout
* Switches to the given \a mapDocument, taking tilesets into account
*/
void DocumentManager::switchToDocumentAndHandleSimiliarTileset(MapDocument *mapDocument, QPointF viewCenter, qreal scale)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ QVector<QPoint> pointsOnEllipse(int x0, int y0, int x1, int y1)
}

/**
* returns an elliptical region centered at x0,y0 with radius determinded by x1,y1
* returns an elliptical region centered at x0,y0 with radius determined by x1,y1
*/
QRegion ellipseRegion(int x0, int y0, int x1, int y1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/issuescounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class IssuesCounter : public QToolButton
public:
explicit IssuesCounter(QWidget *parent = nullptr);

// Skip the QToolButton implementations, due to custum contents
// Skip the QToolButton implementations, due to custom contents
QSize sizeHint() const override { return QAbstractButton::sizeHint(); }
QSize minimumSizeHint() const override { return QAbstractButton::minimumSizeHint(); };

Expand Down
2 changes: 1 addition & 1 deletion src/tiled/preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class TILED_EDITOR_EXPORT Preferences : public QSettings
};

ObjectLabelVisiblity objectLabelVisibility() const;
void setObjectLabelVisibility(ObjectLabelVisiblity visiblity);
void setObjectLabelVisibility(ObjectLabelVisiblity visibility);

bool labelForHoveredObject() const;
void setLabelForHoveredObject(bool enabled);
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/tilesetdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ void TilesetDock::embedTileset()
return;

// To embed a tileset we clone it, since further changes to that tileset
// should not affect the exteral tileset.
// should not affect the external tileset.
SharedTileset embeddedTileset = tileset->clone();

QUndoStack *undoStack = mMapDocument->undoStack();
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/toolmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void ToolManager::unregisterTool(AbstractTool *tool)
/**
* Selects the given tool. It should be previously added using registerTool().
*
* Returns whether the tool was succesfully selected.
* Returns whether the tool was successfully selected.
*/
bool ToolManager::selectTool(AbstractTool *tool)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tiledapp/commandlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool CommandLineParser::parse(const QStringList &arguments)

// Long options
if (arg.at(1) == QLatin1Char('-')) {
// Double hypen "--" means no more options will follow
// Double hyphen "--" means no more options will follow
if (arg.length() == 2) {
noMoreArguments = true;
continue;
Expand Down

0 comments on commit d2cddb7

Please sign in to comment.