Phonon 4.2 and integration for Qt 4.5

Matthias Kretz kretz at
Mon Jun 16 17:02:53 BST 2008

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
> > 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

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)                            <><
MatthiasKretz at, kretz at,
Matthias.Kretz at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at

More information about the kde-multimedia mailing list