Make QCString behavior more similar to std::string
- Replace resize(0) by clear()
- Replace resize(n+1) by resize(n)
- Replace truncate(n) by resize(n)
Relaxed the requirement that, when EXAMPLE_PATH is not set, only
an absolute path is resolved. If a relative path from where doxygen is
run exists, this is now also accepted. Works for \include and
\include{doc} equally.
Doxygen stores a couple of settings persistently in the browser (via e.g. cookies).
By default these settings apply to all HTML pages generated by doxygen across all projects.
The HTML_PROJECT_COOKIE tag can be used to store the settings under a project specific
key, such that the user preferences will be stored separately.
- Use session storage for Chromium based browsers when using session cookies for Firefox.
- Store per project cookies (based on PROJECT_NAME + PROJECT_NUMBER setting in the config file)
In the jabref-5.11 package we see a few, less consistent warning messages like:
```
.../jabref-5.11/src/main/java/org/jabref/gui/fieldeditors/URLUtil.java:140: warning: reached end of file while inside a 'code' block!
The command that should end the block seems to be missing!
```
i.e. warning distributed over multiple lines
and
```
.../jabref-5.11/docs/code-howtos/openoffice/code-reorganization.md:20: warning: image file name layers-v1.svg is ambiguous.
Possible candidates:
E:/Fossies/jabref-5.11/docs/code-howtos/openoffice/layers-v1.svg
E:/Fossies/jabref-5.11/docs/images/layers-v1.svg
```
- empty line at the end
- no single quotes around `layers-v1.svg`
- indentation by 3 instead of 2 spaces
In the Ansible package (through Fossies) we get warnings like:
```
.../lib/ansible/module_utils/facts/virtual/base.py:27: warning: Internal inconsistency: scope for class ansible::module_utils::facts::virtual ::base::Virtual not found!
```
Due to the naming of python the classes in doxygen it is possible that those names will contain reserved names as the path is used in the identification of the class (here virtual).
When `::` is directly in front or after of the word it is a class name and no space should be appended.
A first attempt to get was made by means of #10290 though this had problems with the `operator` keyword as noted in #10304 and had to be reverted.
In the Ansible package (through Fossies) we get warnings like:
```
lib/ansible/module_utils/facts/virtual/base.py:27: warning: Internal inconsistency: scope for class ansible::module_utils::facts::virtual ::base::Virtual not found!
```
Due to the naming of python the classes in doxygen it is possible that those names will contain reserved names as the path is used in the identification of the class (here `virtual`).
When a `:` is in front of the word it is a class name and no space should be appended.
Removing shadowed variables as reported by CGAL and GitHub Actions :
```
/home/runner/work/doxygen/doxygen/src/util.cpp: In lambda function:
/home/runner/work/doxygen/doxygen/src/util.cpp:4576:98: warning: declaration of ‘name’ shadows a previous local [-Wshadow]
4576 | static constexpr auto hasRecursion = [](const QCString &name,const QCString &subst) -> bool
| ^~~~
/home/runner/work/doxygen/doxygen/src/util.cpp:4528:15: note: shadowed declaration is here
4528 | std::string name = nm.str();
| ^~~~
/home/runner/work/doxygen/doxygen/src/util.cpp:4578:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
4578 | int i;
| ^
/home/runner/work/doxygen/doxygen/src/util.cpp:4536:12: note: shadowed declaration is here
4536 | size_t i = match.position();
| ^
/home/runner/work/doxygen/doxygen/src/util.cpp:4579:17: warning: declaration of ‘p’ shadows a previous local [-Wshadow]
4579 | int p=0;
| ^
/home/runner/work/doxygen/doxygen/src/util.cpp:4531:10: note: shadowed declaration is here
4531 | size_t p=0;
| ^
```
Removing warnings on Windows of the form:
```
warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
```
(see also the GitHub actions)
In some cases it is very inconvenient to have a comma as argument separator in an alias (e.g. when using function definitions or templates) as all internal commas have to be escaped.
By introducing a separator (like e.g. `;`) this can be made more convenient, easier to maintain and more understandable.
Also placed software for alias handling in a separate file.
A number of warning messages have a double '\n' due to the fact that the message itself contains a '\n' and the warning routine automatically adds a '\n'.
Some messages are lacking a `\n` at the end which should be present.
In #6924 an automatic correction was attempted but a better solution would be that there is a compile time check that detects the missing / superfluous '\n'.
It is hardly possible to find all automatically as one can always trick a bit by means of something like `err("text %s",str) ` where `str` ends with a `\n`.
Some special constructs were necessary to overcome problems with macro substitution
- tagreader.cpp now using `p_warn` for internal / private warn function
- template.h special constructs, disabling `warn` macro with checks (checks done visibly) and directly calling function.
- trace.h, uses spdlog that has an own `warn` function that is temporary disabled.
- vhdlparser.jj has a function `term`, based on the name `term` in the VHDL standard which has nothing to do wit the doxygen `term` function and is renamed.
Check for remaining markers in the used header and footer for HTML and LaTeX.
In case there are none solved parts in the header / footer this might lead to unexpected results and errors.
Implemented that when a file has no extension and the mapping for files without extension is set to C++ such a file is seen as header file (thanks @jwakely )
Based on the doxygen examples another "math shift" warnings was found regarding `$\ast$`.
Creating a larger example revealed some more potential problems:
- math shift for `$\ast$`. $\vert$`, `$\sim$` and `$^\wedge$`
- problems with `~` and `^` in normal text
- some, potential, filename problems