some patches

Alexander Dymo cloudtemple at mksat.net
Fri Apr 4 16:00:08 UTC 2003


On Friday 04 April 2003 07:53, Jens Weggemann wrote:
> The first one fixes the following bug: in a qmake project,
> after using the new class dialog, the new header and source files
> are opened, but they are both empty - they are opened with urls
> like '/foo.cpp'.
> the cause is the check for the active dir in the cppsupport code -
> apparently the trollproject's activeDirectory() method returns an
> empty (but non-null) string when there is no active dir, while e.g.
> the auto(make)project returns a null string in that case.
> the code expected a null string, the activeDirectory() documentation
> isn't clear onthat point, so the code should be more careful - obvious
> patch follows:

Applied with minor modifications, thanks.



> The next two implement the usual parents-open/close-on-double-click
> (and returnpressed) behaviour of the listviews in the class tree and
> the file groups tree, respectively.
<skip>
> (this is more a matter of taste: ->)
> The file groups view takes too much precious horizontal space imho,
> so here's a patch that makes it display the file name (without path)
> in the first column and only the path without the file name
> in the second column. I removed the extraction method rather than
> adding a second one for the path extraction, because that would
> create two QFileInfo objects for no good reason and it was called
> by the class in one place only anyway.

I like it. Does anybody have objections against that? If no, I will commit.



> Next one is a little cleaning up and fixing in the qmake project manager.
> I don't see a reason why QFileInfo wasn't used to split filename,
> path, and extension. old version is commented out.
> the way the file group was determined from the extension didn't
> work properly ("cpp c".find(ext)>=0  <- a "*.p" file would be
> considered a source file) - however, it should probably be settable
> somewhere (either take the filegroupview's settings or both
> should inherit a project setting), so i abstracted that into
> a static method for now with an unelegant, but working check

Applied. (I've also added more file extensions)

-- 
Alexander Dymo
Ukrainian State Maritime Technical University, IT Department





More information about the KDevelop-devel mailing list