Skip to content

feat(qml): add first-class spell checking for QML files - #197

Open
marcelpetrick wants to merge 1 commit into
CJCombrink:mainfrom
marcelpetrick:mpe/qml_specllcheck_issue196
Open

feat(qml): add first-class spell checking for QML files#197
marcelpetrick wants to merge 1 commit into
CJCombrink:mainfrom
marcelpetrick:mpe/qml_specllcheck_issue196

Conversation

@marcelpetrick

@marcelpetrick marcelpetrick commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Add a dedicated QML document parser alongside the existing C++ parser. This addresses a long-standing gap by checking user-facing QML text without treating QML and JavaScript code identifiers as prose.

The implementation:

  • scans line comments, block comments, quoted strings, and template literals
  • preserves file, line, column, offset, length, and token classification
  • filters URLs, email addresses, numbers, color values, and all-caps words
  • splits compound candidates at underscores, dots, numbers, and camelCase boundaries
  • supports current-file and project-wide operation with background processing
  • reparses edited documents with debouncing and cancels stale or shutdown work
  • provides independent settings for comments and string literals
  • adds the Spell Check context menu to the QML editor
  • registers the parser and required QML dependencies with Qt Creator
  • documents behavior, configuration, and lexical-scanner limitations
  • adds focused tests for extraction, filtering, modes, and source positions
  • sets the plugin version to 3.12.2

This contribution is intended as a helpful addition for a feature that has been missing for years. It is my first Qt Creator plugin contribution, and I am happy to build humbly on the work of Carel Combrink @CJCombrink and the other contributors.

Tested with Qt Creator 19.0.2 using the build helper from mpe/qml_check. The QML parser test suite passes with /usr/bin/ctest.

Solves #196

Add a dedicated QML document parser alongside the existing C++ parser. This addresses a long-standing gap by checking user-facing QML text without treating QML and JavaScript code identifiers as prose.

The implementation:

- scans line comments, block comments, quoted strings, and template literals
- preserves file, line, column, offset, length, and token classification
- filters URLs, email addresses, numbers, color values, and all-caps words
- splits compound candidates at underscores, dots, numbers, and camelCase boundaries
- supports current-file and project-wide operation with background processing
- reparses edited documents with debouncing and cancels stale or shutdown work
- provides independent settings for comments and string literals
- adds the Spell Check context menu to the QML editor
- registers the parser and required QML dependencies with Qt Creator
- documents behavior, configuration, and lexical-scanner limitations
- adds focused tests for extraction, filtering, modes, and source positions
- sets the plugin version to 3.12.2

This contribution is intended as a helpful addition for a feature that has been missing for years. It is my first Qt Creator plugin contribution, and I am happy to build humbly on the work of Carel Combrink and the other contributors.

Tested with Qt Creator 19.0.2 using the build helper from mpe/qml_check. The QML parser test suite passes with /usr/bin/ctest.
@marcelpetrick

Copy link
Copy Markdown
Contributor Author

@CJCombrink ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant