[Kde-games-devel] Legacy code problem in libkdegames/kgame
Kleag
kleag at free.fr
Thu Dec 29 10:21:14 UTC 2011
Hello Ian,
Ksirk uses kgame too. I should check if this has an impact on it but I will
not have time in a short future, being very occupied by my recently born baby
and her two older sisters.
Regards,
Gaël
Le jeudi 29 décembre 2011 17:17:05 Ian Wadham a écrit :
> On 29/12/2011, at 1:13 PM, Ian Wadham wrote:
> > In libkdegames/kgame there is a header file kgamepropertyarray.h which
> > contains a definition for class KGamePropertyArray. In this class there
> > is
> >
> > a method declaration and definition as follows:
> > void sort()
> > {
> >
> > QByteArray b;
> > QDataStream s(b, QIODevice::WriteOnly);
> > ….
> >
> > }
> >
> > <snip>In Qt 4.7, QDataStream can have a constructor with a const
> > QByteArray & and no second parameter, so the QByteArray must have
> > read-only mode. Or it can be constructed with a QByteArray * and a
> > second parameter for the mode, which can then be ReadOnly, WriteOnly,
> > etc.
> >
> > Neither constructor matches the existing code, so whatever compiler
> > Macports is using is quite right to flag an error, but why don't other
> > compilers, especially the ones KDE releases use?
>
> The compiler being used is "clang". I think KDE usually uses one of the GCC
> compilers.
>
> I worked around the problem by commenting out the whole sort() method, i.e.
> /* void sort()
> {
> …
> } */
> Apparently KFourInLIne does not reference it. Do any other games use the
> KGame class, or is KFourInLine the only one? I think it might be.
>
> FWIW there was another problem in KPat, file kpat/patsolve/memory.cpp,
> caused by free(void *) not being declared early enough in
> kpat/patsolve/memory.h, where it is used. My workaround was to move
> #include "memory.h" (line 19) to line 28, after the standard library
> includes.
>
> Now my build is messed up anyway: nothing runs (some dependency is missing
> at run time), so back to square 1 … :-)
>
> Cheers, Ian W.
>
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
More information about the kde-games-devel
mailing list