Namespace support buggy in Beta4.1
Eric OURSEL
eric.oursel at dorotech.fr
Wed Nov 3 09:30:07 GMT 1999
I found bugs inside the classparser for namespaces in Beta4.1. It was
impossible to access the definition of a method defined in a class
inside a namespace.
You will find here a patch which seems to solve the problem for me.
I would appreciate that the namespace support should be extended in
future versions.
Best regards.
--
Eric OURSEL - Software Architect
-------------- next part --------------
>From - Wed Nov 3 09:24:16 1999
Received: from mail.dorotech.fr (zip [172.29.1.1])
by solo.dorotech.fr (8.8.6/8.8.6) with ESMTP id BAA13733
for <eric.oursel at solo>; Wed, 3 Nov 1999 01:36:06 +0100 (MET)
Received: (from uucp at localhost)
by mail.dorotech.fr (8.8.6/8.8.6) id BAA27229
for <eric.oursel at dorotech.fr>; Wed, 3 Nov 1999 01:44:42 +0100 (MET)
Received: from bftoemail26.bigfoot.com(208.156.39.126) by mail via smap (V2.0)
id xma027227; Wed, 3 Nov 99 01:44:37 +0100
Received: from mailhub2.isdnet.net ([195.154.209.22])
by bftoemail12.bigfoot.com (Bigfoot Toe Mail v1.0
with message handle 991102_191146_1_bftoemail12_smtp;
Tue, 02 Nov 1999 19:11:46 -0500
for eric_oursel at bigfoot.com
Received: from localhost (localhost)
by mailhub2.isdnet.net (8.9.3/8.9.3) with internal id XAA08187;
Tue, 2 Nov 1999 23:12:38 +0100 (CET)
Date: Tue, 2 Nov 1999 23:12:38 +0100 (CET)
From: Mail Delivery Subsystem <MAILER-DAEMON at mailhub2.isdnet.net>
Message-Id: <199911022212.XAA08187 at mailhub2.isdnet.net>
To: <eric_oursel at bigfoot.com>
MIME-Version: 1.0
Subject: Returned mail: Host unknown (Name server: fara3.cs.uni-postdam.de: host not found)
Auto-Submitted: auto-generated (failure)
Content-Type: multipart/report; report-type=delivery-status;
boundary="XAA08187.941580758/mailhub2.isdnet.net"
Status: U
X-Mozilla-Status: 8001
X-Mozilla-Status2: 00000000
X-UIDL: ba30018cf7ddc80279d5057b5066f0d2
This is a MIME-encapsulated message
--XAA08187.941580758/mailhub2.isdnet.net
The original message was received at Tue, 2 Nov 1999 23:12:36 +0100 (CET)
from ppp28-stquentin.isdnet.net [194.149.176.155]
----- The following addresses had permanent fatal errors -----
<kdevelop-devel at fara3.cs.uni-postdam.de>
----- Transcript of session follows -----
550 <kdevelop-devel at fara3.cs.uni-postdam.de>... Host unknown (Name server: fara3.cs.uni-postdam.de: host not found)
--XAA08187.941580758/mailhub2.isdnet.net
Content-Type: message/delivery-status
Reporting-MTA: dns; mailhub2.isdnet.net
Received-From-MTA: DNS; ppp28-stquentin.isdnet.net
Arrival-Date: Tue, 2 Nov 1999 23:12:36 +0100 (CET)
Final-Recipient: RFC822; kdevelop-devel at fara3.cs.uni-postdam.de
Action: failed
Status: 5.1.2
Remote-MTA: DNS; fara3.cs.uni-postdam.de
Last-Attempt-Date: Tue, 2 Nov 1999 23:12:38 +0100 (CET)
--XAA08187.941580758/mailhub2.isdnet.net
Content-Type: message/rfc822
Return-Path: <eric_oursel at bigfoot.com>
Received: from bigfoot.com (ppp28-stquentin.isdnet.net [194.149.176.155])
by mailhub2.isdnet.net (8.9.3/8.9.3) with ESMTP id XAA08178
for <kdevelop-devel at fara3.cs.uni-postdam.de>; Tue, 2 Nov 1999 23:12:36 +0100 (CET)
Sender: eoursel
Message-ID: <381F6358.DC9172B0 at bigfoot.com>
Date: Tue, 02 Nov 1999 22:19:04 +0000
From: Eric OURSEL <eric_oursel at bigfoot.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-7mdk i586)
X-Accept-Language: en
MIME-Version: 1.0
To: kdevelop-devel at fara3.cs.uni-postdam.de
Subject: Namespace support buggy in Beta4.1
Content-Type: multipart/mixed;
boundary="------------0757DD8E02BB97892C3CD144"
This is a multi-part message in MIME format.
--------------0757DD8E02BB97892C3CD144
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I found bugs inside the classparser for namespaces in Beta4.1. It was
impossible to access the definition of a method inside a namespace.
You will find here a patch which seems to solve the problem for me.
--------------0757DD8E02BB97892C3CD144
Content-Type: text/plain; charset=us-ascii;
name="ClassParser.cc_patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ClassParser.cc_patch"
--- kdevelop-1.0beta4.1/kdevelop/classparser/ClassParser.cc Sun Oct 24 17:46:46 1999
+++ ../kdevelop-1.0beta4.1/kdevelop/classparser/ClassParser.cc Tue Nov 2 23:03:13 1999
@@ -277,7 +277,6 @@
getNextLexem();
}
-
void CClassParser::parseNamespace()
{
getNextLexem();
@@ -312,13 +311,18 @@
getNextLexem();
while(lexem != 0 && lexem != '}') {
- parseTopLevelLexem();
+ if( isGenericLexem() )
+ parseGenericLexem( &store.globalContainer );
+ else
+ parseTopLevelLexem();
+ getNextLexem();
}
namespace_stack.pop_back();
}
+
/*---------------------------------------- CClassParser::parseUnion()
* parseUnion()
* Parse an union.
@@ -1044,8 +1048,20 @@
// Skip forward declarations.
if( lexem != ';' )
{
+ // patch E.OURSEL
+ QString fully_qualified_name;
+
+ for( list<QString>::const_iterator i = namespace_stack.begin();
+ i != namespace_stack.end();
+ ++i
+ ) {
+ fully_qualified_name += *i;
+ fully_qualified_name += QString("::");
+ }
+ fully_qualified_name += className;
+ // patch E.OURSEL
// Try to move the values to the declared method.
- aClass = store.getClassByName( className );
+ aClass = store.getClassByName( fully_qualified_name );
if( aClass != NULL)
{
pm = aClass->getMethod( aMethod );
--------------0757DD8E02BB97892C3CD144--
--XAA08187.941580758/mailhub2.isdnet.net--
More information about the KDevelop
mailing list