Temporarily enabled `-Wall` and fixed more warnings, but there are several uninitialized variables usages which may require review by the code author in order to ensure the refactor is correct so we leave these additional warnings disabled for now.
Fixed:
* removed unused lambda captures
* removed unused variables
* fixed sign comparisons between variables
Moved the `throw` statements introduced in an earlier commit to after the `switch` statement and removed the `default` which could mask an unhandled case.
Changed some situations where every enum item was listed, but fell through to a default action by replacing the explicitly enumerated items with a `default`. This was primarily where the enum was defined in an external library.
Adding a configuration to invoke clang-format v13 on all modified files
as part of the commit process, and a new script file `setup-env.sh` to
manage installing the pre-commit hook.
The hook is installed using a local python venv to ensure the correct
version of clang-format is used. This approach also enables the hook to
be installed on any platform which supports python although the setup
script is limited to platforms which support bash.
We used v14 of clang-format in commit 2dfb5a483e2a3518cd0bb40f39a05915253d88b6 which introduced unwanted changes. Revert to the formatting enforced by v13 of clang-format.
The refactor to remove deprecated symbols also broke compatibility with versions of QT prior to QT5.14. This commit adds back support for earlier versions of QT. Mostly this is via the new "qtsupport.h" header file, but for supporting the changed `QSet` constructor we had to put the changes into each source file. This is, of course, not optimal.
* add default to switch statements throwing an exception on unhandled
case. This removes `control reaches end of non-void function` in many
functions.
* fix QT5.14 deprecations, which will also make it easier to move to QT6
- fix QSet initialization
- rename `endl` -> `Qt::endl`
- rename `QString::SkipEmptyParts` -> `Qt::SkipEmptyParts`
- and more...
* Scintilla editor
- add missing `override`
- replace deprecated functions
* Settings
- fix deprecated QDir assignment
- code-style: replace assignment with initializers (to match QDir in this file)