bug in the class browser

Stephen Gallimore sg at lincolnsoftware.com
Wed Jun 16 09:49:08 BST 1999


On Wed, 16 Jun 1999, Jonas Nordin wrote:
> Den Wed, 16 Jun 1999 skrev du:
> > Hi,
> > 
> > I´m writing Qt-based cross-platform stuff also for dynamic link
> > libraries (.so and .dll).
> > That´s why I have to use a macro EXPORT in my class declarations (right
> > after the keyword "class") to enable import and export also for MSWin32
> > Dlls. On Unix this macro does nothing.
> > Well, the problem is that the class browser cannot detect such a marked
> > class. The class is simply skipped, means it is not shown by the class
> > view.
> > Maybe someone can fix that (?!).
> 
> Currently(and for several more versions) we will not do macro expansion. The
> ugly solution is to rename your exports to Q_EXPORT since this is skipped by
> the lexer. Not pretty but it works.
While in the one sense you are correct in saying this is a MACRO related issue,
it is also a quite specific style of using MACROs for which, as you state, there
is already a special case in the parser code for one such name. Although my
grammar/parser knowledge is a bit rusty I am sure that parsing:

class +<identifier>  ( : <base_class_specs> {  | {  )

doesn't break LR(1) and that yacc can be made to only retain the last
identifier as the class name (apologies for the BNF, thats a bit rusty too).

This would at least make two people happy, the original poster and me :)

Best regards,
Stephen Gallimore

*******************************************************************************
Lincoln Software Limited
-- Winners of the "e-commerce" category - UK Software Technology Awards - 1999 

Tel:    +44 (0)1625 616722 
Fax:    +44 (0)1625 616780 
E-mail: stephen.gallimore at lincolnsoftware.com 
Web:    http://www.lincolnsoftware.com 
            "Never trust a crown green bowler under 30" - HMHB
*******************************************************************************



More information about the KDevelop mailing list