C++ issue on 4.11: kpopupmenu.h [Please review]

Volker Stolz vs at FreeBSD.org
Thu Mar 10 04:01:42 PST 2005


/bin/sh ../../libtool --silent --mode=compile --tag=CXX c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include   -I/usr/local/include -I/usr/X11R6/include  -I/usr/local/include  -D_THREAD_SAFE -pthread -DQT_THREAD_SUPPORT   -I/usr/local/include -I/usr/local/include  -I/usr/X11R6/include -D_GETOPT_H -D_THREAD_SAFE   -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 -O2 -pipe -g -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o acquireimagedialog.lo acquireimagedialog.cpp
In file included from /usr/include/stdio.h:43,
                 from /usr/local/include/tiffio.h:259,
                 from acquireimagedialog.cpp:27:
/usr/include/sys/cdefs.h:273: warning: `_POSIX_C_SOURCE' is not defined
/usr/include/sys/cdefs.h:279: warning: `_POSIX_C_SOURCE' is not defined
In file included from acquireimagedialog.cpp:80:
/usr/local/include/kpopupmenu.h:67: invalid type `void *' for default argument to `const QPixmap *'
gmake[3]: *** [acquireimagedialog.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/graphics/kipi-plugins/work/kipi-plugins-0.1.0-beta2/kipi-plugins/acquireimages'

This seems to be a limitation of the older GCC. However, an easy fix
(which I seem to observe in other Qt/KDE-header files) seems to be to
replace the offending

  void setTitle(const QString &text, const QPixmap *icon=NULL);

with

  void setTitle(const QString &text, const QPixmap *icon=0L);

Could some C++-savant please review this and could KDElers please consider
including the relevant patch?

As far as I know, all systems with NULL != 0L have either been molten down
or are otherwise not in a position to run KDE :)
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME


More information about the freebsd-ports mailing list