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

List:       kde-multimedia
Subject:    Re: Phonon 4.2 and integration for Qt 4.5
From:       Matthias Kretz <kretz () kde ! org>
Date:       2008-06-16 16:02:53
Message-ID: 200806161802.57096.kretz () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 16 June 2008, Arnold Krille wrote:
> Am Montag, 16. Juni 2008 schrieb Matthias Kretz:
> > Attached is a patch that will keep SC for backends. If a backend wants to
> > implement the new interface it needs to either
> > add -DPHONON_BACKEND_VERSION_4_2
> > or inherit AudioOutputInterface42 and implement
> > Q_INTERFACES(Phonon::AudioOutputInterface42).
>
> I see AudioServer, AudioServerV1, AudioServerV2 and co. return. Do you
> really want to dive into that versioning hell?

It's the only way to add virtual functions without breaking BC. What I'm 
trying to do though, is to hide all the uglyness for outsiders. I.e. a 
backend now does:

#include <Phonon/AudioOutputInterface>

class AudioOutput : public QObject, public Phonon::AudioOutputInterface
{
  Q_OBJECT
  Q_INTERFACES(Phonon::AudioOutputInterface)
  ...
}

To get implement the new functions from 4.2 all it needs to do is add 
add_definitions(-DPHONON_BACKEND_VERSION_4_2) to the CMakeLists.txt. (Adding 
it to the header file, before including the interface header, should also 
work, but I don't trust moc too much wrt. preprocessor stuff.)

> Maybe its better to just use defines and maybe even make the *42 defines
> default in 4.3 ?

Like Thiago said, changing defaults can't be done as that also means breaking 
compatibility. So the default needs to be the 4.0/4.1 interface and using 
newer interfaces must be explicit.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de

["signature.asc" (application/pgp-signature)]

_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


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

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