NewClass-Dialog patch (fixes wrong paths)

Stephan Diederich stephan.diederich at googlemail.com
Tue Oct 17 19:10:58 UTC 2006


Hi there,

currently the New-Class dialog keeps messing the paths up, as it
doesn't call "cleanDirPath" after assembling it ( projectDir +
activeDir + Filename. Especially if activeDir is something like
"../../otherDir"). Second, the dialog didn't use the path it generated
in the beginning and instead rebuilt the path at the end.

The attached patch tries to solve that problem through:
-calling QDir::cleanDirPath after assembling the path
-using exactly that assembled path to add the files to the project
(instead of creating a new)

Additionally it moves code for adding the files to the project from
"gen_implementation" to the generate() method. (this is not really
related to the problem and can be removed. It was just a bit strange
to find the code for adding the header to the project in the
gen_implementation method ;)

Patch was tested with current svn, autotools and qmake projects.

HTH,
Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_class_fix_paths.diff.bz2
Type: application/x-bzip2
Size: 619 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20061017/23cc47f8/attachment.bin>


More information about the KDevelop-devel mailing list