The SpellChecker Plugin is a spellchecker plugin for the Qt Creator IDE. This plugin spell checks Comments and String Literals in source files for spelling mistakes and suggest the correct spelling for misspelled words, if possible.
Currently the plugin only checks C++ files and uses the Hunspell Spell Checker to check words for spelling mistakes. The plugin provides an options page in Qt Creator that can be used to configure the parsers as well as the spell checkers available.
To download a pre-built version of the plugin, refer to section 2.
To build the plugin self, see section 6.
The motivation for this plugin is that my spelling is terrible and I was looking for a plugin that could spell check my Doxygen comments. I feel that good comments are essential to any piece of software. I could not find one suitable to my needs so I decided to challenge myself to see if I can implement one myself. In one of my courses on varsity I investigated the Qt Creator source code and was amazed with the whole plugin system, thus it also inspired me to try and contribute to such a project.
I did look a lot at the code in the TODO plugin as a basis for my own implementation. I do not think that I have violated any licenses doing so since I have never just copied code from the plugin. If there are any places that can be problematic regarding any licenses, please contact me so that I can resolve the issues. I want to contribute to the Open Source Community, but it is not my intention to step on any toes in the process.
# Set up venv
C:\Python\3.11\python.exe
python.exe -m venv .venv
# ps1
.\.venv\Scripts\Activate.ps1
# bash
source ...
# Setup conan
python -m pip install conan
conan profile detect
conan config install .conan
# Build
conan install . -pr cpp20
cmake --preset conan-default
cmake --build --preset conan-release
I do create pre-built releases for each version of the plugin that I tag. The latest release can be obtained from the Releases page. Read the README.txt file associated with the release for information on how to install the plugin into the relevant Release version of Qt Creator.
Although I try to create binaries for the latest version of QtCreator, there is a bit of a delay from when a new version of QtCreator is released and a new version of the plugin is released. I started using GitHub Actions to build and package the releases and hope this will reduce the delay.
For a video demonstrating how to set up and use the plugin check out the following link: https://youtu.be/3Dg5u1Mrj0I (Thank you Jesper from KDAB).
If you want to read the steps yourself (probably with spelling mistakes): After opening Qt Creator and the plugin loaded successfully the following steps must be performed before starting to use the SpellChecker plugin:
"plain"
link on the above page when downloading the dictionary files and not the file names directly.%APPDATA%\QtProject\
and on Linux this is in ~/.config/QtProject/
.:book: Make sure to check out the wiki page :book:
The following useful widgets are added to the QtCreator user interface to allows the user to interact with the plugin:
The following settings are available to the plugin
On the "SpellChecker" tab of the Spell Checker Options page is a setting "Only check current editor". If this setting is set the plugin will only parse the current open editor, reparsing it when changes are made. The results of parsed files will be remembered and still get listed in the Navigation Widget when a new file is opened.
When this setting is not set the plugin will parse all files in the project when a new project is switched to. For large projects this might take a bit of time to parse all files in the project. This has been successfully tested with the QtCreator sources.
A list of projects that will not be checked for spelling mistakes if opened, even of the setting is enabled to scan complete projects.
The C++ parser can be configured to parse only Comments, only String Literals or both.
The parser also has settings that affects how the following types of words will be handled:
Apart from these settings, the plugin also attempts to remove Doxygen Tags in Doxygen comments, in an effort to reduce the number of false positives.
Since version 2.0.7 GitHub Actions are used to build the plugin in the cloud.
Since Qt Creator v7.0 qmake was removed as the build system and replaced it with cmake. In reaction the version of the plugin was stepped to version 3. With this a lot of effort went into getting the GitHub Action updated to build the plugin and documented steps were removed from this README. Please refer to the GitHub Action script for the steps to build.
The following list is a list with a hint into priority of some outstanding tasks I want to do.