RiverWare Qt4 Port Completion
Removing certain Q3 widgets from C++ source files in the Q3GUI library
January 15, 2010 -- Phil

After removing Qt3-compatability widgets from two Q3GUI modules "by hand", I confirmed that the following class substitutions can substantially be made by automated substitution. Any relevant exceptions will be caught during compilation (e.g. C++ methods missing from the Qt4 widgets). A particular issue is that there are no "orphaned" virtual methods in the new Qt classes. Basically, these substitutions should have been made by Trolltech's "qt3to4" porting tool which we used in the preparation of RiverWare 5.0 (Qt 4.3 using the Qt3 compatibility layer).

    Qt3 Compatibility Widget Class   Qt4 Widget Class    
  Q3MainWindow   >>   QMainWindow  
  Q3Frame   >>   QFrame  
  Q3PopupMenu   >>   QMenu  
  Q3VBoxLayout   >>   QVBoxLayout  
  Q3HBoxLayout   >>   QHBoxLayout  

The following sequence of scripts (and intermediate generated files) were used to make these substitions. This was applied to the C++ modules in only the Q3GUI library (and not the other, smaller RiverWare Qt libraries: DbDmi, QtAccounting, QtDmi, QtRpl, QtRun, QtSCT and QtUtils). This resulted in the modification of 128 source files (.hpp, .cpp, plus a few .inc files modified manually).

      Scripts / Files   Links   Description  
  1   q3sFiles-Make1.cmd   Text   Find source files having the relevant Qt3 widgets  
  2   q3sFiles-Make1.tmp   Text   ... list of 246 source files, with redundancies  
  3   q3sFiles-Make1.out   Text   ... list of 123 source files, sorted and unique  
  4   q3sFiles-Make2.cmd   Text   Generate q3sFiles-Make3.cmd from q3sFiles-Make1.out  
  5   q3sFiles-Make3.cmd   Text   Use sed to create modified source files in new/  
  6   q3sFiles.sedScript   Text   ... sed script for class name substitutions  
  7   HeaderSub.cmd   Text   Use sed to replace old-style Qt includes with new-style  
  8   HeaderSub.sedScript   Text   ... sed script for Qt include style substitution  
  9   ModifiedFiles.txt   Text   List of 128 modified files, after hand-fixing compilation problems  

--- (end) ---