• Bug#266152: qt-embedded: FTBFS with gcc-3.4: there are no arguments to

    From Andreas Jochens@1:229/2 to All on Tue Aug 17 00:10:05 2004
    From: [email protected]

    Package: qt-embedded
    Severity: normal
    Tags: patch

    When building 'qt-embedded' with gcc-3.4 I get the following error:

    g++ -c -I/qt-embedded-2.3.7/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -O2 -pipe -fno-exceptions -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -fPIC -DQT_NO_IMAGEIO_MNG -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MACH64 -DQT_NO_
    QWS_MATROX -DQT_NO_QWS_VGA_16 -DQT_NO_QWS_DEPTH_4 -DQT_BUILTIN_GIF_READER=1 -DQT_NO_SM_SUPPORT -I3rdparty/kernel -I3rdparty/tools -o allmoc.o allmoc.cpp
    cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC/Pascal but not for C++
    In file included from kernel/qt.h:62,
    from allmoc.cpp:16:
    /qt-embedded-2.3.7/include/qsortedlist.h: In destructor `QSortedList<type>::~QSortedList()':
    /qt-embedded-2.3.7/include/qsortedlist.h:51: error: there are no arguments to `clear' that depend on a template parameter, so a declaration of `clear' must be available
    /qt-embedded-2.3.7/include/qsortedlist.h:51: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
    make[2]: *** [allmoc.o] Error 1
    make[2]: Leaving directory `/qt-embedded-2.3.7/src'

    With the attached patch 'qt-embedded' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/qt-embedded-2.3.7/src/tools/qsortedlist.h ./src/tools/qsortedlist.h
    --- ../tmp-orig/qt-embedded-2.3.7/src/tools/qsortedlist.h 2003-07-17 03:20:26.000000000 +0200
    +++ ./src/tools/qsortedlist.h 2004-08-16 21:02:46.928424937 +0200
    @@ -48,7 +48,7 @@
    public:
    QSortedList() {}
    QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
    - ~QSortedList() { clear(); }
    + ~QSortedList() { this->clear(); }
    QSortedList<type> &operator=(const QSortedList<type> &l)
    { return (QSortedList<type>&)QList<type>::operator=(l); }

    diff -urN ../tmp-orig/qt-embedded-2.3.7/src/kernel/qgfxtransformed_qws.cpp ./src/kernel/qgfxtransformed_qws.cpp
    --- ../tmp-orig/qt-embedded-2.3.7/src/kernel/qgfxtransformed_qws.cpp 2003-07-17 03:20:25.000000000 +0200
    +++ ./src/kernel/qgfxtransformed_qws.cpp 2004-08-16 21:03:49.027984369 +0200
    @@ -671,11 +671,11 @@
    inline int tx( int x, int y ) {
    switch ( qt_trans_screen->transformation() ) {
    case QTransformedScreen::Rot90:
    - return y - xoffs + yoffs;
    + return y - this->xoffs + this->yoffs;
    case QTransf