I noticed a few other things while building kdelibs4 (I don't really know how
to report upstream).
In kmessagebox.h, 3 lines look like:
Options options=Option(a|b);
while all others use Options (with an 's') for the cast. The version with an
's' looks better, and without the 's' I hit a bug in studio (that is if there
is a need for a cast at all).
In Qt's qglobal.h, the definition of Q_FUNC_INFO does not look so good. There
is a special case for solaris which only shows the name of the file. And using
sunpro on linux, we end up with a better definition (has the line of the
function) but it is broken by the #undef QT_STRINGIFY that follows.
In kopenssl.cpp, there are plenty of casts that forget about linkage of
functions (extern "C" vs extern "C++"). Now it looks like:
extern "C" {
static void (*f)(something)=0L;
}
...
f=(void(*)(something))g;
I believe it should be:
extern "C" {
typedef void (*f_type)(something);
static f_type f=0L;
}
...
f=(f_type)g;
Which would be more readable using macros since this would be repeated for tens
of variables.
kioslave/http/kcookiejar/CMakeLists.txt uses -include of /FI to include a file,
when there is no reason not to use the standard #include technique (maybe
protected with a macro if it is not always wanted).
threadweaver/Weaver/DebuggingAids.h there should *not* be extern "C" around the
#include of standard headers like stdlib.h. Is is a very bad idea.
khtml/misc/loader.h scaled_pixmap should return a reference.
--
This message posted from opensolaris.org