bug: add new file to an existing project
G. Jungman (Fearless Leader)
jungman at lanl.gov
Sun Sep 19 06:07:47 BST 1999
I see the same bug. I looked at the loop in cproject.cpp.
The problem appears to occur when slash_pos=0. When slash_pos=0, the
call
slash2_pos = makefile_name.findRev('/',slash_pos-1);
resolves to
slash2_pos = makefile_name.findRev('/',-1);
but -1 has a special meaning for findRev(); a negative index means
search from the back.
So it finds the same "/" over and over again ==> infinite loop. Frankly
I think this
'-1' business is a bad design element of QString since it leads to
mixups like this
when you try to do index arithmetic. Oh well.
I don't know how to fix the loop since I can't tell what it is trying to
do.
By the way, the reason I am so interested in 'add file to project' is
that I'm trying
to develop a library and since there is no support yet for library
development I was
trying to follow the directions in the manual about "when Kdevelop finds
files in
subdirectories, it builds static libraries". It is not clear what this
means since I don't
know how it "finds" files. So I am trying to use 'add file' to help it.
This all seems very
obscure to me. I hope there will be support for library development
soon, or that at least
in the interim somebody could spell out a clear recipe for library
development.
Thanks.
--
G. Jungman
More information about the KDevelop
mailing list