[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Legacy code problem in libkdegames/kgame
From:       Ian Wadham <iandw.au () gmail ! com>
Date:       2011-12-29 6:17:05
Message-ID: 5EBB9F45-2E5D-42E0-899F-16DE3244ABB8 () gmail ! com
[Download RAW message or body]

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);
>    =85.
>  }
> =

> <snip>In Qt 4.7, QDataStream can have a constructor with a const QByteArr=
ay & and
> no second parameter, so the QByteArray must have read-only mode.  Or it c=
an
> 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 Macpo=
rts
> 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 GC=
C compilers.

I worked around the problem by commenting out the whole sort() method, i.e.
   /* void sort()
       {
          =85
       } */
Apparently KFourInLIne does not reference it.  Do any other games use the K=
Game
class, or is KFourInLine the only one?  I think it might be.

FWIW there was another problem in KPat, file kpat/patsolve/memory.cpp, caus=
ed by
free(void *) not being declared early enough in kpat/patsolve/memory.h, whe=
re it is used.
My workaround was to move #include "memory.h" (line 19) to line 28, after t=
he standard
library includes.

Now my build is messed up anyway: nothing runs (some dependency is missing =
at run
time), so back to square 1 =85 :-)

Cheers, Ian W.

_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic