Bug#2971: marked as done (KDevelop discards references to a class in a source file when the header is edited)

Stephan Kulow owner at bugs.kde.org
Sat Apr 8 23:03:01 UTC 2000

Your message dated Sun, 9 Apr 2000 10:55:52 +1200
with message-id <00040910561200.10079 at winter.localdomain>
and subject line Bug#2971: KDevelop discards references to a class in a source file when the header is edited
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Stephan Kulow
(administrator, KDE bugs database)

Received: (at submit) by bugs.kde.org; 8 Apr 2100 11:08:45 +0000
>From Richard_Dale at tipitina.demon.co.uk Sat Apr  8 13:08:45 2000
Received: from anchor-post-34.mail.demon.net ([]:19974 "EHLO
        anchor-post-34.mail.demon.net") by max.tat.physik.uni-tuebingen.de
        with ESMTP id <S741425AbQDHLIj>; Sat, 8 Apr 2000 13:08:39 +0200
Received: from tipitina.demon.co.uk ([] helo=tipitina)
        by anchor-post-34.mail.demon.net with smtp (Exim 2.12 #1)
        id 12dt6U-000Knz-0Y
        for submit at bugs.kde.org; Sat, 8 Apr 2000 12:08:38 +0100
From:   Richard Dale <Richard_Dale at tipitina.demon.co.uk>
Organization: Lost Highway
To:     submit at bugs.kde.org
Subject: KDevelop discards references to a class in a source file when the header is edited
Date:   Sat, 8 Apr 2000 12:00:32 -0400
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00040812041601.01191 at tipitina>
Content-Transfer-Encoding: 8bit
Return-Path: <Richard_Dale at tipitina.demon.co.uk>
X-Orcpt: rfc822;submit at bugs.kde.org

Package: kdevelop
Version: 1.1
Severity: normal

Bugreport ID : 12:16,07.04.00

Originator       : Richard Dale
E-Mail           : Richard_Dale at tipitina.demon.co.uk

Subject : KDevelop discards references to a class in a source file when
the header is edited

Error Class      : software bug
Error Location   : class tree
Priority         : medium
Bug Description ---------------------------

KDevelop garbage collects references to a class when the header is
changed, even if it has a source file (.cpp) which still has references
to the class. Then the 'Go To Definition' menu options for the methods no
longer work.

How to repeat the error -------------------

1) Edit a C++ header (.h), which has a corresponding source file (.cpp) in
a project sub-directory.
2) Select 'File->Save All'.
3) Try to go to the definition of one of the methods for the class

Bugfix or Workaround ----------------------

In ClassStore.cc, the method CClassStore::removeWithReferences should
be changed as follows:
diff -Naur -X /home/duke/bin/patcher.exclude
kdevelop-1.1objc/kdevelop/classparser/ClassStore.cc ---
kdevelop-1.1/kdevelop/classparser/ClassStore.cc      Fri Feb 25 05:36:54 2000
+++ kdevelop-1.1objc/kdevelop/classparser/ClassStore.cc  Fri Apr  7 11:53:38
2000 @@ -106,7 +106,8 @@ aClass = globalContainer.classIterator.current();

// Remove the class if any of the files are the supplied one.
-    if( aClass->declaredInFile == aFile)
+    if( aClass->declaredInFile == aFile
+                && (aClass->definedInFile == (const char *) NULL || 
aClass->declaredInFile == aClass->definedInFile) ) removeClass( aClass->name
); }

System Information ------------------------

KDevelop version         : 1.1
KDE version              : 1.1.2
QT version               : 1.44
OS/Distribution          : LinuxPPC
Compiler                 : gcc

misc :
spelt 'Miscellaneous'! 

I've already tried to send this bug report, but it
bounced (possibly because it had 'Loses' in the subject, I'm not sure). 
So apologies if it arrives twice.

More information about the KDevelop-devel mailing list