• Bug#266164: qt-embedded-free: FTBFS with gcc-3.4: there are no argument

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

    Package: qt-embedded-free
    Severity: normal
    Tags: patch

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

    g++ -O2 -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -c -pipe -DQWS -fno-exceptions -fno-rtti -fno-exceptions -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/postgresql/server -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_NO_DEBUG -
    DQT_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_CUPS -DQT_NO_NIS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_MAC -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_CDE -DQT_NO_STYLE_MOTIFPLUS -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_
    PLATINUM -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_SGI -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_WINDOWS -DQT_NO_QWS_VNC -DQT_NO_QWS_VGA16 -DQT_NO_QWS_TRANSFORMED -DQT_NO_QWS_MACH64 -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MATROX -DQT_NO_QWS_SHADOWFB -DQT_NO_QWS_REPEATER -
    DQT_NO_QWS_KBDUSB -DQT_NO_QWS_MOUSE_BUS -I/qt-embedded-free-3.1.2/mkspecs/qws/linux-generic-g++ -I. -I3rdparty/freetype/src -I3rdparty/freetype/include -I3rdparty/freetype/builds/unix -I3rdparty/freetype2/include -I../include -I.moc/
    release-shared-mt-emb-generic/ -o .obj/release-shared-mt-emb-generic/allmoc.o .moc/release-shared-mt-emb-generic/allmoc.cpp
    cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC/Pascal but not for C++
    In file included from /qt-embedded-free-3.1.2/include/qt.h:199,
    from .moc/release-shared-mt-emb-generic/allmoc.cpp:12: ../include/qsortedlist.h: In destructor `QSortedList<type>::~QSortedList()': ../include/qsortedlist.h:52: error: there are no arguments to `clear' that depend on a template parameter, so a declaration of `clear' must be available
    ../include/qsortedlist.h:52: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
    make[2]: *** [.obj/release-shared-mt-emb-generic/allmoc.o] Error 1
    make[2]: Leaving directory `/qt-embedded-free-3.1.2/src'

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

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/qt-embedded-free-3.1.2/src/tools/qsortedlist.h ./src/tools/qsortedlist.h
    --- ../tmp-orig/qt-embedded-free-3.1.2/src/tools/qsortedlist.h 2003-02-24 09:29:51.000000000 +0100
    +++ ./src/tools/qsortedlist.h 2004-08-16 21:33:09.379370281 +0200
    @@ -49,7 +49,7 @@
    public:
    QSortedList() {}
    QSortedList( const QSortedList<type> &l ) : QPtrList<type>(l) {}
    - ~QSortedList() { clear(); }
    + ~QSortedList() { this->clear(); }
    QSortedList<type> &operator=(const QSortedList<type> &l)
    { return (QSortedList<type>&)QPtrList<type>::operator=(l); }

    diff -urN ../tmp-orig/qt-embedded-free-3.1.2/src/embedded/qgfxtransformed_qws.cpp ./src/embedded/qgfxtransformed_qws.cpp
    --- ../tmp-orig/qt-embedded-free-3.1.2/src/embedded/qgfxtransformed_qws.cpp 2003-02-24 09:29:57.000000000 +0100
    +++ ./src/embedded/qgfxtransformed_qws.cpp 2004-08-16 21:32:22.081560641 +0200
    @@ -584,11 +584,11 @@
    inline int tx( int x, int y ) {
    switch ( qt_trans_screen->transformation() ) {
    case QTransformedScreen::Rot90:
    - return y - xoffs + yoffs;
    + return y - this->xoffs + thi