[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Review Request: Constifying two methods in KCoreConfigSkeleton
From:       "Parker Coates" <parker.coates () gmail ! com>
Date:       2009-08-05 21:00:18
Message-ID: 20090805210018.4518.26105 () localhost
[Download RAW message or body]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1233/
-----------------------------------------------------------

Review request for kdelibs.


Summary
-------

KCoreConfigSkeleton::isImmuttable and KCoreConfigSkeleton::findItem are non-const \
methods, even though neither of them touch the internal state of the object. This \
patch adds const overloads for those two methods.

For binary compatibility reasons, the existing methods can't be removed. I've added \
"KDE5 TODO" comments indicating that the non-const versions should be removed in the \
future. Should they also be marked depreciated? That would seem a bit silly as the \
compiler automatically selects which of the two versions to call. Should I add a note \
to the API documentation, or is that really necessary? Is the use of const_cast in \
the non const versions a safe way to keep only a single implementation? Is there \
anything else I'm missing?


Diffs
-----

  trunk/KDE/kdelibs/kdecore/config/kcoreconfigskeleton.h 1007370 
  trunk/KDE/kdelibs/kdecore/config/kcoreconfigskeleton.cpp 1007370 

Diff: http://reviewboard.kde.org/r/1233/diff


Testing
-------


Thanks,

Parker


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic