KDE/kdevelop [POSSIBLY UNSAFE]
David Nolden
david.nolden at art-master.de
Tue Apr 24 22:29:07 UTC 2007
On Tuesday 24 April 2007 20:33:20 Andreas Pakulat wrote:
> On 24.04.07 00:50:33, David Nolden wrote:
> :( Unfortunately that library also uses autotools, which is a PITA to
>
> get to work on windows - AFAIK. Unfortunately the am2cmake script from
> kdesdk doesn't work with that project either. I guess we have to convert
> to Qt at least those parts.
>
> David: Can you do us a favor (if you don't have the time to do it), can
> you point us at the files that use commonc++?
>
> Andreas
It's windows, isn't there a precompiled library available somewhere? I'm quite
sure it is.. surely at least for dev-c++(mingw).
I've looked through the code, did some cleanup, and here's all places where
commonc++ is used:
plugins/teamwork/lib/network/pointer.h:
Here common-c++'s AtomicCounter is used. AtomicCounter is a thread-safe
counter, qt4 provides something similar(the reason why qstring is thread-safe
now)
lib/network/basicsession.h/cpp:
TCPSession(which is based on a thread as well as on a socket) is used as base
for BasicTCPSession. This would probably be the biggest part of work: A
version of BasicTCPSession would have to be implemented that would be based
on qthread and used a qt-socket instead of the commonc++-stuff. The good
thing is that the inheritance from TCPSession is protected, so only a few
functions would have to be resembled, and there's probably not much
difference between qt's networking-architecture and commonc++'s. Except
isPending(..), there are only few calls to commonc++-functions.
lib/network/helpers.h:
There's an implementation of a simple thread-safe list that uses a
commonc++-mutex, here porting would be a simple string-replacement.
lib/network/basicserver.h/cpp:
TCPSocket and Thread is used for opening the server, probably this too isn't
too hard to replace by qt, it's not much code.
lib/network/teamworksession.h:
TCPSocket is passed through into the parent in the constructor, trivial to
change. :)
I think that's about it.
greetings, David
More information about the KDevelop-devel
mailing list