Friday, July 25th 2008, 2:59am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

soul_rebel

Trainee

Posts: 57

Location: Germany

1

Monday, July 25th 2005, 4:16pm

how to delete class?

sounds really simple, should be too, eh?
well i just cant figure out how to delete a class including files, without deleteing in manually and removing all references in makefiles and project files manually...
thanks for help
"As long as there is private property and while money is the standard of all things, I do not think that a nation can be governed either justly or happily..." - Raphael Hythloday in Utopia by Thomas More, 15th Century
  • Go to the top of the page

Latem

Intermediate

Posts: 278

Location: New Brunswick, Canada

Occupation: Student/Programmer

2

Monday, July 25th 2005, 6:37pm

Are you using KDevelop? One sure way of deleting a class is to remove it in the automake manager. So just go to the automake manager on the right, and in the sources delete the .cpp file (check the checkbox to actually delete the file), and same for the header (also check the checkbox). With this method you will not have to mess around with any makefiles, or with the project file. At worst, you may have to do redo automake and configure. However, you will have to manually remove all the #include statements from all other files. This can easily be done with find in files... feature, and also since the compiler will give errors (or warnings?) about non-existant includes. Also I guess find and replace could do the job. Just find in all files #include "myfile.h", and replace it with nothing.

I am not sure if there may be an option in the class browser to delete a class, by right-clicking on the class, and what it could do. I don't usually use the class borswer, so don't know. Can't check now, because im on a windows computer =[.

Hope this answers your question.

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

This post has been edited 1 times, last edit by "Latem" (Jul 25th 2005, 6:39pm)

  • Go to the top of the page

soul_rebel

Trainee

Posts: 57

Location: Germany

3

Monday, July 25th 2005, 6:55pm

thanks A LOT!!!
believe it or not, in my long kdevelop programming history (! :D ) i have never ever popped up one of the views on the right....
thank you!
"As long as there is private property and while money is the standard of all things, I do not think that a nation can be governed either justly or happily..." - Raphael Hythloday in Utopia by Thomas More, 15th Century
  • Go to the top of the page

Latem

Intermediate

Posts: 278

Location: New Brunswick, Canada

Occupation: Student/Programmer

4

Monday, July 25th 2005, 10:49pm

But all the documentation is there as well. :(
So yea, the tabs on the right are important.

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);
  • Go to the top of the page

soul_rebel

Trainee

Posts: 57

Location: Germany

5

Wednesday, July 27th 2005, 3:04pm

i always use online documentation... is faster and doesnt spam my kdevelop with documentation windows. and konquerors "qt <keyword>" and "kde <keyword>" searches are just unbeatable :D
"As long as there is private property and while money is the standard of all things, I do not think that a nation can be governed either justly or happily..." - Raphael Hythloday in Utopia by Thomas More, 15th Century
  • Go to the top of the page

Atil

Beginner

Posts: 36

Location: India

Occupation: R & D

6

Thursday, November 15th 2007, 8:42am

RE: how to delete class?

if you are using Qt only then just do one thing... dont even delete you .cpp/.h file from file browser...


just go to .pro file...

comment (using #)
HEADERS += xyz.h
SOURCES += xyz.cpp which you dont want...

then qmake and make.... Makefile will rebuild using xyz.pro and now there is no reference of xyz.cpp/.h into your Makefile..

comments/queries accepted.

//Atil
  • Go to the top of the page

Rate this thread