const reordering, namespace adding in synchrinizing declarations

Artur Bać artur at ebasoft.com.pl
Sat Feb 9 16:33:14 UTC 2013


Kdevelp has usefull feature of synchronizing arguments of method
declaration with its implementation.
But it dosnt preserve form of notation of const

[...
Why it is important for me, You can skip this:
I in projects I dont use writing const in front of type because in long
type names it is easy to miss it when we read.
Second reason is that we read type declaration from right to left
dbf_column_length_t const & other we will read

other is const reference to type dbf_column_length_t
and we dont read this like that
const dbf_column_length_t & other
other is a reference to type dbf_column_length_t and it is const
...]


Let look at example I start with,
.h
namespace io { namespace dbf {
dbf_column_length_t( dbf_column_length_t const & other );

.cpp
namespace io { namespace dbf {
dbf_column_length_t::dbf_column_length_t( dbf_column_length_t const &
other )

I add to method declaration argument : , size_t const & x

and kdevelop fixes implementation arguments making mess:

dbf_column_length_t::dbf_column_length_t( const
io::dbf::dbf_column_length_t& other, const size_t& x )
- it reorganizes const
- it appends namespace names event for situations when such method is in
that namespace ...

because of thise 2 annoying things I dont use this feature at alll :-(,
but it could be very handy.

Artur



More information about the KDevelop-devel mailing list