After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 306076 - examples with "using namespace" not hyperlinked properly
examples with "using namespace" not hyperlinked properly
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2005-05-31 20:16 UTC by J. P. Abelanet
Modified: 2012-11-18 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case that shows failure of examples and namespaces (40.65 KB, application/octet-stream)
2005-05-31 20:17 UTC, J. P. Abelanet
Details
test case that shows failure of examples (40.65 KB, application/x-compressed-tar)
2005-05-31 20:19 UTC, J. P. Abelanet
Details
test case that shows failure (40.65 KB, application/octet-stream)
2005-05-31 20:21 UTC, J. P. Abelanet
Details
sample showing failure of using namespace with examples (47.12 KB, application/octet-stream)
2005-10-31 20:47 UTC, J. P. Abelanet
Details
revised sample that breaks hyperlinking of examples with "using namespace" (36.39 KB, application/x-tar)
2010-07-21 18:39 UTC, J. P. Abelanet
Details
small example for missing links with namespaces (57.89 KB, application/x-zip-compressed)
2010-08-29 19:22 UTC, Thomas Grund
Details
Another example of missing links to namespace members (72.19 KB, application/octet-stream)
2010-11-09 13:28 UTC, Roland Hermans
Details

Description J. P. Abelanet 2005-05-31 20:16:01 UTC
Please describe the problem:
Example code that contains the "using namespace xyz" line do not properly
generated hyperlinks to classes in that namespace.  Also, statements involving
member functions and the pointer operator do not get hyperlinked properly.

Steps to reproduce:
1. Untar doxygen.examples_namespace_bug.tgz
2. run doxygen in the top-level directory
3. look at examples/torus.cpp - the comments in the code point out what does and
does not get linked


Actual results:
Several of the references to member functions in main/torus.cpp do not have
hyperlinks.

Expected results:
All the references to member functions in main/torus.cpp should have hyperlinks.

Does this happen every time?
yes

Other information:
yes
Comment 1 J. P. Abelanet 2005-05-31 20:17:39 UTC
Created attachment 47077 [details]
test case that shows failure of examples and namespaces
Comment 2 J. P. Abelanet 2005-05-31 20:19:23 UTC
Created attachment 47078 [details]
test case that shows failure of examples
Comment 3 J. P. Abelanet 2005-05-31 20:21:17 UTC
Created attachment 47079 [details]
test case that shows failure
Comment 4 J. P. Abelanet 2005-05-31 20:24:41 UTC
When I try to download the attachment, Mozilla insists on calling it
attachment.cgi, but it is in fact a tgz file containing the test case.
Comment 5 Dimitri van Heesch 2005-08-07 17:10:52 UTC
Confirmed (though your example has a typo. The variable name is declared as
bSplineSurface, but bsplineSurface is used. Note the casing!). 

Should be fixed in the next CVS update/release.
Comment 6 J. P. Abelanet 2005-08-09 14:49:39 UTC
Doh - sorry about the misspelled words.  I downloaded doxygen-1.4.4-20050808,
and that did not seem to fix the problem.
Comment 7 Dimitri van Heesch 2005-10-04 18:39:27 UTC
This bug was resolved to status "FIXED" as part of a group change. Please verify
that this bug is indeed fixed in doxygen version 1.4.5 (or later). If not then
please reopen the bug, so it stays on my radar.
Comment 8 J. P. Abelanet 2005-10-13 19:50:40 UTC
Tested in 1.4.5 and verified that it works.
Comment 9 J. P. Abelanet 2005-10-31 20:47:32 UTC
Created attachment 54157 [details]
sample showing failure of using namespace with examples

This is the sample that shows that the fix for this bug was not complete.  The
attachment is a .tgz file.  Run doxygen at the top level directory and look at
the examples/torus.cpp page under Examples.  Here is the problem - methods and
variables that are part of a namespace do not get hyperlinked under the
following conditions:
1>  "using namespace XYZ" is used at the top of the example code
2>  The reference does not use the "XYZ::" prefix
3>  The reference contains an imbedded ::, as in the invocation of a static
method
Comment 10 J. P. Abelanet 2005-10-31 20:49:12 UTC
I am reopening this bug because it was only partially fixed - the comments with
the attachment explain the remaining problem.
Comment 11 J. P. Abelanet 2010-04-24 02:51:42 UTC
I recently tested this with 1.5.3 and 1.6.3 and this still does not work.  I would really like to see this fixed, as this causes many many problems for my generated documentation.
Comment 12 Dimitri van Heesch 2010-04-24 18:46:38 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 13 Dimitri van Heesch 2010-06-15 11:22:30 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.0. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 14 J. P. Abelanet 2010-07-21 18:38:52 UTC
Although it works much better than before, this is still not fixed.

The sample that was originally attached is fixed by 1.7.1, but a slightly modified version of the sample fails.  The difference that causes failure is the addition of a local class declaration and definition, and this breaks the hyperlinking of static methods in combination with "using namespace xxx."
Comment 15 J. P. Abelanet 2010-07-21 18:39:43 UTC
Created attachment 166320 [details]
revised sample that breaks hyperlinking of examples with "using namespace"
Comment 16 J. P. Abelanet 2010-07-21 18:40:27 UTC
1. Untar the latest attachment
2 [details]. run doxygen in the top-level directory
3. look at examples/torus.cpp - the comments in the code point out what does and
does not get linked
Comment 17 Dimitri van Heesch 2010-08-29 14:24:11 UTC
Confirmed. The MyBSplineSurface constructor definition causes the scope to be reset. Should be fixed in the next subversion update.
Comment 18 Thomas Grund 2010-08-29 19:22:08 UTC
Created attachment 169013 [details]
small example for missing links with namespaces
Comment 19 Thomas Grund 2010-08-29 19:25:48 UTC
I have similar problems with creating links. In the attachment: links are fine for the class 'ok' but no links for the class 'not_ok'.
Comment 20 Dimitri van Heesch 2010-10-09 08:20:02 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.2. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 21 Thomas Grund 2010-10-17 19:19:21 UTC
The last attachments still does not work with 1.7.2. It is a case with 'using namespace and \code
Comment 22 Roland Hermans 2010-11-09 13:28:26 UTC
Created attachment 174132 [details]
Another example of missing links to namespace members

The problem described in this bug report is not limited to the "using" keyword. Also when comments are located within the namespace { ... } not always the proper links are being generated. For the attached example with Doxygen 1.7.2:

Member MyGlobalFunc1 (MyGlobalType a,MyGlobalType b)
- In the detailed description Doxygen should create a link for MyGlobalType
  (i.e. the one without double colon prefix).
- In the bug list Doxygen should create a link to MyGlobalType for parameter a.

Member PLAT::MyNSFunc1 (PLAT::MyNSType a, MyNSType b,MyNSType c)
- In the function overview of the namespace page, Doxygen should not create a
  link from the type of parameter c to PLAT::MyNSType.
- In the detailed description of the namespace page, Doxygen should create a
  link to PLAT::MyNSType for parameter b.
- In the function overview of the file reference page, Doxygen should create a
  link to PLAT::MyNSType for parameter b.
- In the bug list, Doxygen should create a link to PLAT::MyNSType for
  parameter b.
Comment 23 Dimitri van Heesch 2010-11-13 19:20:47 UTC
(In reply to comment #21)
> The last attachments still does not work with 1.7.2. It is a case with 'using
> namespace and \code

You are right, there was still an explicit check for an example block in the code. I'll correct this in the next subversion update.

(In reply to comment #22)
This is really a different issue. Doxygen does not autolink normal words (without # or ::) unless they are class names. If you still think there is an issue, please file a new bug report for it.
Comment 24 Thomas Grund 2010-11-21 19:35:26 UTC
using namespace and \code works fine for our examples with 1.7.2-20101118.
Thank you!

There are some other issues regarding non-empty-constructors and member function linking. But they are not releated to this topic and I will check first at the mailing list ...

(In reply to comment #21)
> The last attachments still does not work with 1.7.2. It is a case with 'using
> namespace and \code
Comment 25 Dimitri van Heesch 2011-01-03 19:01:40 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.