This file describes the changes between the QtTestRunner code distributed with CppUnit and this package.

The QtTestRunner distributed with CppUnit uses the Qt2 library. Making it work with Qt4 involved two basic steps:

1. Replacing the API that was considered deprecated in Qt3 by the new equivalents.
2. Running the automatic Qt3 to Qt4 conversion tools available at Trolltech's website.

--------------------------------------

1. Replacing the API that was considered deprecated in Qt3 by the new equivalents.

The method QThread::postEvent was considered obsolescent in Qt3; its use was substituted by calls to Qt3's equivalent QApplication::postEvent method. The changes affected files TestRunnerThread.cpp and TestRunnerModel.cpp.

The type QList<> was replaced by Qt3's equivalent QPtrList<> type that has the same API. The changes affected files MostRecentTests.h e TestRunnerModel.h.

--------------------------------------

2. Running the automatic Qt3 to Qt4 conversion tools available at Trolltech's website.

In file qttestrunnerlib.pro it was added a line QT += qt3support.

The uic3 tool was used to generate the sources from the .ui files:

uic3 testbrowserdlg.ui > testbrowserdlg.h
uic3 -impl testbrowserdlg.h testbrowserdlg.ui > testbrowserdlg.cpp
uic3 testrunnerdlg.ui > testrunnerdlg.h
(issues as warning: uic3: property 'autoResize' for widget ' of type 'QComboBox' is not supported)
uic3 -impl testrunnerdlg.h testrunnerdlg.ui > testrunnerdlg.cpp

Note: the .ui files have not been converted to Qt4's format as it would not create some constructors in the sources. The drawback of using Qt3's format is that it will not be possible to edit the .ui files using Qt4's QtDesigner.

The qt3to4 tool was used to automatically convert the sources to Qt4:

qt3to4 qttestrunnerlib.pro

Finally, the moc tool was run in all headers that contain the Q_OBJECT macro:

moc MostRecentTests.h > moc_MostRecentTests.cpp
moc testbrowserdlg.h > moc_testbrowserdlg.cpp
moc TestBrowserDlgImpl.h > moc_TestBrowserDlgImpl.cpp
moc testrunnerdlg.h > moc_testrunnerdlg.cpp
moc TestRunnerDlgImpl.h > moc_TestRunnerDlgImpl.cpp
moc TestRunnerModel.h > moc_TestRunnerModel.cpp
