Bug 98603 - import: skips classes with comment in class decl
Summary: import: skips classes with comment in class decl
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-05 12:24 UTC by Enrico Ros
Modified: 2005-02-19 14:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico Ros 2005-02-05 12:24:26 UTC
Version:           1.3.92 (using KDE 3.3.92 (beta2), compiled sources)
Compiler:          gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.10-gentoo-r6

Umbrello doesn't import classes declared like this:

class MyClass : public ParentClass   // comment that blocks importing
{
    ...
};

Removing the comment makes the class importable.
(Noticed on kdegraphics/kpdf/core/document.h class KPDFDocument - I now removed the comment that blocked import of KPDFDocument).

Thanks for the great umbrello!
Comment 1 Oliver Kellogg 2005-02-19 14:47:50 UTC
CVS commit by okellogg: 

BUG:98603 - parseClassSpecifier(): Skip Token_comment before '{'


  M +2 -1      ChangeLog   1.67
  M +5 -0      umbrello/classparser/parser.cpp   1.11


--- kdesdk/umbrello/ChangeLog  #1.66:1.67
@@ -28,5 +28,6 @@
 92781 92995 93122 93219 93297 93298 93501 93535 93696 94173
 94728 94795 94883 95082 95247 95252 95722 95924 95951 95954
-96216 96221 96964 97155 97182 97697 97887 97984 98899 99697
+96216 96221 96964 97155 97182 97697 97887 97984 98603 98899
+99697
 
 Version 1.3

--- kdesdk/umbrello/umbrello/classparser/parser.cpp  #1.10:1.11
@@ -1876,4 +1876,9 @@ bool Parser::parseClassSpecifier( TypeSp
     }
 
+    QString comment;
+    while (lex->lookAhead(0) == Token_comment) {
+        comment += lex->lookAhead(0).text();
+        lex->nextToken();
+    }
     if( lex->lookAhead(0) != '{' ){
         lex->setIndex( start );