-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Simplify indenation implementation * feat: Add TextDocument::indentationAtLine * feat: TextDocument::setIndentation This function allows setting the *absolute* indentation for the current line/selection. * feat: Line-based indentation API Add API for indenting at a given line number, not just at the current selection/position. * refactor!: indentationAt API now returns int The `indentationAtLine` and `...AtPosition` methods now return `int`, in accordance to the `indent` and `setIndentation` methods. The old behavior is still accessible via the `indentTextAtLine` and `indentTextAtPosition` functions. It turned out to still be useful, as there are a few situation where you just want to copy the indentation from another line. Getting access to the original indentation is useful there, as it can deal better with cases where Knuts indentation settings don't match up with the actual indentation in the file. * refactor!: Remove TextDocument::removeIndent Calling `indent` with negative values has exactly the same effect, so remove this duplicate function. `remove` is also not a great name for what the function did, as it didn't remove the entire indentation but rather "reduced" it. * chore: Bump photonwidgets to new indentation API Note: This uses a yet-unmerged commit in photonwidgets Ideally this commit should be updated to a stable version of photonwidgets before merging * fix: Mark indentation getter API as Q_INVOKABLE Clazy in the CI is right, that these should indeed not be slots, but rather Q_INVOKABLE.
- Loading branch information
1 parent
2d893d4
commit 67d7a97
Showing
12 changed files
with
327 additions
and
116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Submodule photonwidgets
updated
from 3ea1a6 to f6fe20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
version = 1 | ||
SPDX-PackageName = "knut" | ||
SPDX-PackageSupplier = "<[email protected]>" | ||
SPDX-PackageDownloadLocation = "https://github.com/KDAB/knut/" | ||
|
||
[[annotations]] | ||
path = [".pre-commit-config.yaml", ".codespellrc", ".clangd", "**.clang-format", ".clazy", ".gitattributes", ".github/workflows/documentation.yml", ".gitignore", ".gitmodules", ".krazy", "knut.code-workspace", ".github/**.yml", "mkdocs.yml"] | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>" | ||
SPDX-License-Identifier = "BSD-3-Clause" | ||
|
||
[[annotations]] | ||
path = ["**.md", "docs/API/mapping.txt", "docs/**.png", "docs/**.puml", "docs/**.gif", "docs/**.svg", "docs/**.css"] | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>" | ||
SPDX-License-Identifier = "GPL-3.0-only" | ||
|
||
[[annotations]] | ||
path = ["**.json", "**.ui", "**.qrc", "**.rc", "**.xml", "src/**.png", "src/**.ico", "version.txt"] | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>" | ||
SPDX-License-Identifier = "GPL-2.0-only OR GPL-3.0-only" | ||
|
||
[[annotations]] | ||
path = "test_data/**" | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>" | ||
SPDX-License-Identifier = "GPL-2.0-only OR GPL-3.0-only" | ||
|
||
[[annotations]] | ||
path = ["test_data/rcfiles/cryEdit/Resource.h", "test_data/rcfiles/luaDebugger/resource.h"] | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "Amazon.com, Inc. or its affiliates or its licensors" | ||
SPDX-License-Identifier = "Apache-2.0 OR MIT" | ||
|
||
[[annotations]] | ||
path = "qt6.natvis" | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "2022 The Qt Company Ltd." | ||
SPDX-License-Identifier = "GPL-3.0-only OR LicenseRef-Qt-Commercial" | ||
|
||
[[annotations]] | ||
path = "src/gui/gui/**.png" | ||
precedence = "aggregate" | ||
SPDX-FileCopyrightText = "The Pictogrammers" | ||
SPDX-License-Identifier = "Apache-2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.