Bug 237535

Summary: make it possible to create new target in "create class" wizard
Product: [Applications] kdevelop Reporter: Milian Wolff <mail>
Component: Build tools: CMakeAssignee: kdevelop-bugs-null
Status: CONFIRMED ---    
Severity: wishlist CC: niko.sams
Priority: VLO    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Milian Wolff 2010-05-13 19:46:33 UTC
Version:            (using Devel)
Installed from:    Compiled sources

When one uses the "new class" wizard it's easy to add to an existing target but I'd really like to see the possibility to add to an existing target.

It would probably require an extensible list of "target-templates", e.g.: for

kde4 executable, plain executable, library, kde4 unit-test, etc. pp. E.g. for kde4 executable:

set(${targetName}_SRCS ${implementationFilename})
kde4_add_executable(${targetName} ${targetName}_SRC)
target_link_libraries(${targetName} \${QTTESTLIB})

well you get the idea. I'd esp. like to have it for unit tests
Comment 1 Andreas Pakulat 2010-05-13 19:57:05 UTC
Last I checked you can edit in the dialog so doing it is already possible. So this boils down to having a wizard for this kind of thing and I'm not in favour of that.
Comment 2 Niko Sams 2010-05-13 21:12:34 UTC
Wouldn't a new unit test wizard fit your needs better?
Comment 3 Milian Wolff 2010-05-13 22:45:45 UTC
@Andreas: This is very counter-intuitive. You'd have to select an _existing_ (what if none exists?) target to add the new class to (which is _not_ what you actually want to achieve), and afterwards you'll have to insert all the code. Which helps you not at all, I could open the cmakelists.txt and add it myself there.

I really think this is in the same line the current wizards are, it takes a mundane boring tasks and tries to take some burden of the developer...

@Niko: While this would fix my use-case it would still suck for everything else. If I want to create a new unit test, I probably create a new class (or maybe only a main.cpp file - showing the "add to target" there would be cool as well).

Anyways, I still think this is a valid wish for a useful feature. Looks like I have to implement it myself ;-)
Comment 4 Milian Wolff 2010-05-13 22:46:40 UTC
correction: "If I want to create a new _executable or library_"...