Bug 56501

Summary: Can't add a method/attribute to a class within a namespace (and also nested namespace)
Product: [Applications] kdevelop Reporter: Benjamin Piwowarski <bpiwowar>
Component: Language Support: CPP (old)Assignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch rmb menu to work correctly

Description Benjamin Piwowarski 2003-03-27 17:30:22 UTC
Version:           CVS (using KDE KDE 3.1.1)
Installed from:    Debian testing/unstable Packages
Compiler:          N/A N/A
OS:          Linux

It is impossible to add a new method or attribute in a class within a namespace.
Comment 1 Caleb Tennis 2003-04-01 21:52:58 UTC
works in cvs (adymo) 
Comment 2 Benjamin Piwowarski 2003-06-16 17:48:45 UTC
It doesn't work (says "Please select a class").  
Comment 3 Simo 2003-07-27 00:02:03 UTC
Created attachment 2077 [details]
patch rmb menu to work correctly

hopefully the patch is correct this time ;)
made with:
'env LC_ALL=C TZ=UTC0 diff -Naurb --from-file kdevelop/parts/classview/
kdevelop_changed/parts/classview/{classtooldlg.cpp,classtreebase.cpp}'
Comment 4 Simo 2003-07-27 00:08:19 UTC
uh oh ... ok the comment should be before the patch xD (the website is somewhat 
illogical for a first-timer). 
the combobox works fine, but the rmb menu of the treeview in the classview 
doesn't work. the previous patch fixs that and the problem with classtool (the 
correct class is not selected when choosing "Parent classes..." etc. from the 
rmb-menu). 
Comment 5 Amilcar do Carmo Lucas 2003-07-28 18:25:32 UTC
Subject: kdevelop/parts/classview

CVS commit by aclu: 

The rmb menu of the treeview in the classview doesn't work.
This patch fixes that and the problem with classtool (the correct class is not selected when choosing "Parent classes..." etc. from the rmb-menu).

CCMAIL: 56501-done@bugs.kde.org


  M +2 -0      classtooldlg.cpp   1.14
  M +2 -4      classtreebase.cpp   1.47


--- kdevelop/parts/classview/classtooldlg.cpp  #1.13:1.14
@@ -147,4 +147,6 @@ void ClassToolDialog::setLanguageSupport
 void ClassToolDialog::setClassName(const QString &name)
 {
+    if ( class_combo->count() == 0 ) refresh();
+
     QListBox *lb = class_combo->listBox();
 

--- kdevelop/parts/classview/classtreebase.cpp  #1.46:1.47
@@ -93,10 +93,8 @@ KPopupMenu *ClassTreeItem::createPopup()
 QString ClassTreeItem::scopedText() const
 {
-    QString str;
-    
     if (m_item)
-        str = m_item->path();
+        return m_item->path();
 
-    return str.replace(QRegExp("\\."), "::");
+    return QString::null;
 }