diff options
| author | Semih Yavuz <semih.yavuz@qt.io> | 2025-09-03 15:33:50 +0200 |
|---|---|---|
| committer | Semih Yavuz <semih.yavuz@qt.io> | 2025-10-01 15:17:40 +0200 |
| commit | 89212b6ae4d61d288df6611b88dfabf5abb09a58 (patch) | |
| tree | f0a82f492f630b64b001be4808bf0675beef7e4f /tools/qmlformat/qmlformat.cpp | |
| parent | 6fb81c0e51a496878e606d3888e8f9525d18b92b (diff) | |
qmlformat: Disable WriteOutCheck at runtime
- WriteOutCheck is now set to None for runtime usage, simplifying logic and avoiding
complex DOM comparisons and exceptions. It is already disabled for
several cases.
- The check remains available for test purposes.
Task-number: QTBUG-97796
Change-Id: I259511f84cf8a71f46fc3df698cb9a8a462dc559
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tools/qmlformat/qmlformat.cpp')
| -rw-r--r-- | tools/qmlformat/qmlformat.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/qmlformat/qmlformat.cpp b/tools/qmlformat/qmlformat.cpp index 8de32628a6..13566fb503 100644 --- a/tools/qmlformat/qmlformat.cpp +++ b/tools/qmlformat/qmlformat.cpp @@ -92,12 +92,8 @@ static bool parseFile(const QString &filename, const QQmlFormatOptions &options) const auto &code = getFileItemOwner(fileItem)->code(); auto lwOptions = options.optionsForCode(code); - WriteOutChecks checks = WriteOutCheck::Default; - //Disable writeOutChecks for some usecases - if (options.sortImports() || options.forceEnabled() || options.isMaxColumnWidthSet() || code.size() > 32000 - || fileItem.internalKind() == DomType::JsFile) { - checks = WriteOutCheck::None; - } + // Use checks only for test purposes + WriteOutChecks checks = WriteOutCheck::None; bool res = false; if (options.isInplace()) { |
