[umbrello] [Bug 442134] New: "const" correctness in Umbrello sources

"Robert Hairgrove" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=442134

            Bug ID: 442134
           Summary: "const" correctness in Umbrello sources
           Product: umbrello
           Version: unspecified
          Platform: unspecified
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 141364
  --> https://bugs.kde.org/attachment.cgi?id=141364&action=edit
Umbrello C++ const bugs

From the Umbrello CODING-STYLE document at item 43 (line 245 in the one I have,
may not be up-to-date):

" 43.) "const correctness" should be preserved as much as possible.
      Make all getters const."

Question: Has anyone actually tried to do this with the existing Umbrello
sources?

I did, and I had to change about 400 lines of code in just about every file in
the source tree before it was again usable. The problem with const
(in-)correctness is that it is somewhat like cancer: Once it has started in
some code somewhere, it propagates until the entire code base is unusable if
one insists on subsequent code being const-correct.

But I get the impression that for some of the Umbrello code, which has
obviously been around since the very beginning of the app, this was never an
issue. At some point, a well-meaning maintainer decided "Oh yes ... we should
require const-correctness in our coding standards".

I am a great believer in const correctness. So I have another question:

How can we do this? I am posting the document I created with descriptions of
all the function signatures in all the files so that people can try to follow
up on it. But since I am not a regular contributor to the Umbrello project, and
still have issues with Git, etc., I will leave it up to those who can actually
navigate "invent.kde.org" and do something useful here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.