diff options
author | albert-github <albert.tests@gmail.com> | 2019-11-04 11:52:39 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-11-04 11:52:39 (GMT) |
commit | 7e99e9b66c48da2dfeea29f14b207a30aae62a1e (patch) | |
tree | 9a6c7492a7e33953d8854f741aa03010803f0a9d | |
parent | cc4675afcc5f6825b9302fd0915c0c4148f555ab (diff) | |
download | Doxygen-7e99e9b66c48da2dfeea29f14b207a30aae62a1e.zip Doxygen-7e99e9b66c48da2dfeea29f14b207a30aae62a1e.tar.gz Doxygen-7e99e9b66c48da2dfeea29f14b207a30aae62a1e.tar.bz2 |
QGDict::hashAsciiKey: Invalid null key due to empty procedure name
When having a problem like:
```
namespace eval ::tk::dialog {}
namespace eval ::tk::dialog::file {}
namespace eval ::tk::dialog::file::chooseDir {
namespace import -force ::tk::msgcat::*
}
proc ::tk::dialog::file::chooseDir:: {args} {
}
```
This will lead to the following warnings:
```
QGDict::hashAsciiKey: Invalid null key
.../aa.tcl:9: warning: Illegal member name found.
```
this is due to the fact that the procedure name definition ends with `::` and thus actually has an empty procedure name (this is legal in TCL).
(see also: https://stackoverflow.com/questions/58683103/meaning-of-a-proc-name-ending-with).
In case of an empty name the last component is taken for the name too.
-rw-r--r-- | src/tclscanner.l | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tclscanner.l b/src/tclscanner.l index 4a262bc..45ad9c0 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -535,6 +535,13 @@ static void tcl_name(const QCString &ns0, const QCString &name0, QCString &ns, Q ns = ""; name = myNm; } + else if (myNm.length()-myStart == 2) + { + // ending with :: so get name equal to last component + ns = myNm.mid(0,myStart); + myStart = ns.findRev("::"); + name = myNm.mid(myStart+2); + } else { ns = myNm.mid(0,myStart); |