So even with all those errors, a third to a half of the code seems to have compiled fine. Sure, it was the easiest third – by definition – but it's a start.

What to do about it

So, you look at the first error, or you run make with -k and find one of the most numerous errors.

Could that error be fixed using a simple search and replace on the source code?

If so, you need to work out how to express that replacement in Perl, and add it to the end of convert.pl, before the last print line. Make sure you also read the introductory comments for that file, and add a little comment saying what you're doing.

(If it can't be fixed using an automated search and replace, don't even try to fix it now. Don't start editing the source code itself, unless you really know what you're doing and have a cunning plan in mind.)

Test your change by running convert.pl on just the one file you changed, for example

$ perl ./convert.pl ./src/gui/editors/eventlist/EventView.cpp

and scanning the results to see if they seem more or less right. If it looks OK, re-run

How can I tell whether it's easily fixable or not?

What about Qt3/KDE3 compatibility code?

Ideally, we'd be able to make do without using the Qt3 compatibility stuff found in Qt4, or the KDE3 compatibility stuff found in KDE4.

But what we really want to do, more than anything, is to get something working.

So if you can see a simple search-and-replace change that involves a Q3 header and class, or a k3 header and class, go ahead and make it. At least at this stage we'll be able to easily see all such changes in the convert script, and maybe think again about them later.

What if I'm not sure about it?

Do it anyway! Put the replacement in convert.pl, with a comment saying you don't really know what you're doing. Commit it and tell the -devel list. We can sort it out later.

What to ignore

You almost certainly will want to run with -k and ignore some of the errors, for example by dumping to a file:

$ make -k -f qt4-makefile 2>&1 | tee make.log

and then reading the file. Errors worth ignoring at this stage include:

Anything to do with DCOP

Anything with QCanvas in it

Anything in the src/gui/kdeext directory

src/gui/widgets/Rotary.cpp and .h – this has already been ported in SV and should be ported back from there

Anything that turns out to need some actual code, not just simple search and replace. (Though if you get as far as finding out that it needs real code, it might be worth adding a comment in convert.pl to say that you at least looked into it.)

What to commit

At this stage, try to avoid committing your actual code changes. It's simpler just to commit convert.pl with your new scripted change in it.

$ svn commit convert.pl

(If you think it would be better to commit all the code as we go along, say so. I've changed my mind about this more than once already.) (Michael says: “No. Just commit to convert.pl. It's the way to go. Since we have some considerable amount of active work in trunk/ to merge in, what I'm aiming to try to do is use this branch in its current states as a testbed for convert.pl, and then try running it on an updated/merged branch that pulls in all the changes from trunk/ one last time before we finally have to do a hard fork. After that hard fork, porting in people's ongoing work on the old QT3 code will become increasingly tedious and undesirable to deal with.”)

And finally, tell the rosegarden-devel list all about what you've done, no matter how trivial. Let's keep the noise up!