Converting qt3 forms to qt4 format

Started by Corfiot, August 24, 2009, 10:24:05 PM

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

Corfiot

Ah thanks, I see now. If you don't touch the events they are fine though. You can add and edit components as normal. You can also edit the XML of the ui file manually if you really get stuck :-p

I think I can do this conversion and we can decide on doing it 100% properly on a per form basis. I think we need to do this conversion so the UI can be more easily worked on.

If I do this first step for all forms, will you consider merging it into main? After testing of course.

In the meantime I'll investigate how hard it is to put the CONNECT statements into the CPP. I suspect it's a cut and paste deal.

--G

Liviu Lalescu

#16
OK, so you really want this conversion done :-)

I have to tell you that I am a bit afraid to let others do this job, because of possible bugs. I will think about it and maybe I'll do that myself in the near future. Maybe you'll offer to test all the functions of the new version.

I prefer to do that myself, to avoid any possible problems (like the problem you didn't notice, with the custom slots).

Yes, it is a problem of cut+paste, but there are 300 files to modify :-)

I'll start now to look over the code.

Corfiot

Well I don't NEED this as a user. I want to improve my Qt skills and help you out. Not to make you do more work. I just find it interesting :-)


Liviu Lalescu

#18
OK, I see, but it is a very high responsibility and I have to supervise :-)

It is a bit of work, maybe a few days, but more people asked me about Qt 3 for Windows (not free), and also I know that someday Qt 3 might disappear from the usual tools, so this is a must-do, indeed.

Maybe you'll want to check my changes, it is similar to changing the code. Do you know the tool kdiff3? Also, running and checking all the buttons (which I hate :-) ).

There is also another aspect: I'll keep Qt 3 classes (like Q3ListBox and Q3Table and Q3GroupBox). This is not very nice, but too many changes are needed to correct that. And I see that Qt Designer 4 has these classes available.

Corfiot

If you want to supervise I can send you patches and you can use any tool you wish to compare. I know kdiff, it's like any diff tool, I sent you a patch using the svn version of diff already :-p

I can commit to converting all forms (the first step).

I cannot fully commit to doing the "proper" conversion yet, I need to research this more. I'll tell you about this later.

I cannot fully commit to pressing ALL the buttons but I can use my builds for my department schedule for october, beginning next week or so. So I will do everything in my dev builds. This should cover at least the basic forms (activities,rooms,most time/space constraints). I can also fiddle a bit with each form I convert to see if the buttons work etc.

So, think on it and tell me what you want done or not.


Liviu Lalescu

I found one important thing: in tmp/addactivityform_template.h, there are all 41 needed connections, written exactly as they should be added in the C++ form addactivityform.cpp. So, indeed a matter of copy/paste. I just need to remove the custom connections in the Designer 4 code.

I intend to keep the same name for the forms, so addactivityform_template.ui for designer 4 form. I am not sure, should I rename it addactivityform.ui?

Liviu Lalescu

QuoteIf you want to supervise I can send you patches and you can use any tool you wish to compare. I know kdiff, it's like any diff tool, I sent you a patch using the svn version of diff already :-p

I can commit to converting all forms (the first step).

I cannot fully commit to doing the "proper" conversion yet, I need to research this more. I'll tell you about this later.

I cannot fully commit to pressing ALL the buttons but I can use my builds for my department schedule for october, beginning next week or so. So I will do everything in my dev builds. This should cover at least the basic forms (activities,rooms,most time/space constraints). I can also fiddle a bit with each form I convert to see if the buttons work etc.

So, think on it and tell me what you want done or not.


Yes, but comparing the code is easy, while comparing the designer files by content is difficult. There might be hidden errors.

Let me see a bit how the conversion works. I'll let you know. It may be only a matter of 2 days, I am not sure.

Thinking about it, it is maybe better to use shorter names for the forms, like addactivityform.ui. This way, we know that it is a Qt 4 form.

Let me try a bit and I'll let you know. If I can check your changes one by one, I'll think about letting you do some changes. But as I told you, to compare the old ui file with the new one is very difficult with a text comparing tool.

Liviu Lalescu

I am sorry if I were too negative to you, Corfiot :-(

I attach the first converted files (you need to rename t.tar.gz, the forum makes them t_tar.gz, incorrectly, then unpack). I'll think about making the whole process. But I am very afraid of introducing new bugs. Everything must be tested. And the current period is very important, because now the schools are making their timetables.

Corfiot

You're not negative. You are cautious and it is good. I have always been the person who is the bravest with changes in all dev teams I have worked in. I get away with it because any bugs I cause, I fix :-p. It scares the hell out of everyone else, though.

There is no point comparing the old .ui files to the new ones as they are totally different. We just have to trust uic3 to do the conversion properly. And test.

As for the names, YES!, make them shorter like I did for the addactivityform. So we get three files with the same name and 3 extensions (.h .cpp .ui). We should update the .pro as well. I attach your files with the names changed and the new .pro so you can check. This builds and the forms seem to work. I see you cleaned up some text, too :-D

Finally, making changes does not mean we have to merge them into the main dev code right away. I would suggest we wait until the critical period has passed, if you are worried about bugs. Besides, there are SO MANY forms it will take us time. I am keeping track of the code changes on a repository so we can do it gradually and in parallel with other things.

I am not going to be working full time on this like I am now, especially after the semester starts. So we should lay back and take it easy. I know you prefer working on the algorithm :) Get some sponsored work done and let me worry about this grunt work, after we agree on the method and test one or two forms to be sure.

Maybe we should test an add, a delete and a modify, too.

Liviu Lalescu

I want to keep old name, activitiesform_template.ui, because the name of the class is ActivitiesForm_template.

I have a good news: after a few hours of hard work, I am maybe done with about 1/4 or 1/5 of the work. I think that in at most 2 days I will be ready. I'll give you exact advice on how to test me. There will be source code testing and practical testing.

Corfiot


Liviu Lalescu

:-) No, I won't let you do nothing. I'll put you to do many tests. And testing means verifying slots and connections from old code to new code, and playing with the interface (each function must be tested).

You'll browse the sources, don't worry :-)

Liviu Lalescu

#27
I did the change. Everything must be tested. See global announcement for details: --missing link--