Converting ui files

asoliverez's picture

Laurent has been converting the ui files. I had previously ran the uic3 command to convert them to Qt4 format. There were only a bunch of warning regarding some style or another, but we will see what happens when we run the application.

By the way, Laurent thinks it would have been best to use the ui files in Qt3 format. Now it's late, but it's good to know. I only followed the porting guide, which stated that. I didn't know the ui3 files could be used until later.

So, the main issue is getting the constructors corrected. We go from this in KDE3:

#include "../dialogs/kexportdlgdecl.h"

class KExportDlg : public KExportDlgDecl
{
  Q_OBJECT
 

To this in KDE4:

#include "ui_kexportdlgdecl.h"

class KExportDlgDecl : public QDialog, public Ui::KExportDlgDecl
{
public:
  KExportDlgDecl( QWidget *parent ) : QDialog( parent ) {
    setupUi( this );
  }
};

class KExportDlg : public KExportDlgDecl
{
  Q_OBJECT
 

There is an extra constructot, but I somehow feel this could be managed differently, working out the inheritance. I will go again over this when the rest of the work is done, to understand better how this works. For now, we are only focused on making this huge pile of code compile.