apply patch

Lorenzo Delana ldelana at libero.it
Sun Jul 8 23:42:48 UTC 2001


>
> first at all don't change this to a static method unless there is no
> reason for it...
> as far as I can see canonicalDirName() is only used inside CProject
> methods, right?
>
> So don't compromise the OOP...
> use static only if another method outside an CProject object would use
> it...
The fact is that canonicalDirName() doesn't make side effect on its argument, 
so nowarry...

>
> I think a better name would be also canonicalLibName or sth. similar,
> but this is no functional objection....
Accord to you:
canonicalDirName() --renamed--> canonicalizeDirName()

>
> IMHO the function should also pass a const QString & instead of a new
> QString copy...
> result:
> QString CProject::canonicalLibName(const QString &)
>
Accord, excuse for my piggy coding: const QString &, assure that passed 
object isn't modified (read-only) and reference operator assure fast as 
possible function argument passing.

>
> sorry, another thing I cannot agree.
> Don't do this only at this point.
> As far as I can see from the sources the canonical name should only
> apply for macro labels containing the name,  like in
>
> lib<canonical_name>_la_LIBADD=
> lib<canonical_name>_la_SOURCES=
>
...
> correct me if I'm wrong!!
>
wrong, I have explicitly check for that in fact for me file:cproject.cpp 894 
of current CVS is a row after this code

QString type=getProjectType();
if( (type == "kio_slave") )
  stream << "kde_module_LTLIBRARIES = kio_" << libRootName << ".la\n\n";
    else if( (type == "kc_module") )
  stream << "kde_module_LTLIBRARIES = libkcm_" << libRootName << ".la\n\n";
    else
  stream << "lib_LTLIBRARIES = lib" << libRootName << ".la\n\n";
 
  // canonicalize libRootName <------- file:cproject.cpp 894
  libRootName = canonicalDirName(libRootName);

Clearly, after [// canonicalize libRootName row] libRootName is 
canonicalized, and developers may consider this comment.

In next message the patch including your observation.

bye
Lore



-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list