Bug#43169: Automatically generated setter methods are not declared 'const'

andreas at flying-snail.de andreas at flying-snail.de
Tue May 28 15:34:02 UTC 2002


Package: kdevelop
Version: 2.1.1 (using KDE 2.2.2 )
Severity: wishlist
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:                Linux (i686) release 2.4.17
OS/Compiler notes: 

When you add a member variable using the context menu in KDevelop's class browser, there's an option to automatically generate the according getter and setter methods. However, the declaration of the getter methods are missing the 'const' modifier, making it impossible to call getters on const objects. Like:

class gwonz {
  std::string foo;
  const std::strint getFoo() const;
  //                 missing ^^^^^
}

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)





More information about the KDevelop-devel mailing list