[Gambas-user] gb.qt4 compilation time

Adrien Prokopowicz adrien.prokopowicz at ...626...
Sun Jun 3 14:25:49 CEST 2012


Le samedi 2 juin 2012 19:31:25 Benoît Minisini a écrit :
> Le 02/06/2012 19:08, Adrien Prokopowicz a écrit :
> > Hi all,
> > 
> > Since a few weeks I found that the gb.qt4 component takes a lot of time to
> > compile. I was wondering why and I found that there were a lot of
> > #includes in CWindow.h (as in many other .h files) :
> > 
> > #include<QMoveEvent>
> > #include<QCloseEvent>
> > #include<QShowEvent>
> > #include<QResizeEvent>
> > #include<QKeyEvent>
> > #include<QMainWindow>
> > #include<QHash>
> > #include<QList>
> > #include<QMenuBar>
> > #include<QEvent>
> > #include<QPushButton>
> > #include<QSizeGrip>
> > #include<QPoint>
> > 
> > ... but in the whole CWindow.h file I haven't found any reference to
> > QMoveEvent, QCloseEvent, QMainWindow, QMenuBar, QPushButton ... and
> > others.
> > 
> > So my question is : why include all these files ? Is there some hidden
> > stuff or other things that I don't know ? :-)
> > 
> > Regards,
> > Adrien.
> 
> You can try to remove some of them and see if it compiles. I never
> checked that.
> 
> Many of these includes were added by the Qt3 -> Qt4 converter when gb.qt
> was transformed into gb.qt4.
> 
> Regards,

Hi Benoît,

I tried to remove all these includes in all .h files (and a few .cpp files), for 
example in CWindow :

//#include <QMoveEvent>
//#include <QCloseEvent>
//#include <QShowEvent>
//#include <QResizeEvent>
//#include <QKeyEvent>
//#include <QMainWindow>
//#include <QList>
//#include <QMenuBar>
//#include <QEvent>
//#include <QPushButton>
//#include <QSizeGrip>
//#include <QPoint>

class QSizeGrip;
class QPushButton;

It works, but the compilation is not very faster (I measured by executing 
"time make" after a "make clean"). 
On my Computer (Intel Atom @1.6Ghz) it takes around 15~20 seconds less than 
before, but it still takes me around 9 minutes. :/




More information about the User mailing list