about a patch

Thierry Bastian thierry.bastian at trolltech.com
Tue Nov 25 13:47:15 CET 2008


I don't like too much the MediaSource::empty(). It seems to be just there to
replace the constructor which is already there.
Is it really more convenient to write 

MediaSource ms = MediaSource::empty();

Over

MediaSource ms(MediaSource::Empty);

I prefer the latter.

Apart from that I'm also wondering what is the difference then between Empty
and Invalid... Maybe it is the same as what we have for QVariant for example
where we have the concept of isNull and isValid. Maybe Empty should then be
called Null ?

And should the default still be invalid? Actually I think so (like in
QVariant).

Other than that, I'm fine with the patch.

Thierry

-----Original Message-----
From: Matthias Kretz [mailto:kretz at kde.org] 
Sent: mardi 25 novembre 2008 13:40
To: phonon-backends at kde.org
Subject: Re: about a patch

On Monday 24 November 2008 12:10:37 Matthias Kretz wrote:
> As I said, I'm looking into making phonon-xine work without the 
> setNextSource call. I'm confident this is going to work, so we could 
> revert the revert in trunk then.

Phonon-Xine in trunk can now act correctly without the call to
setNextSource(MediaSource()). I'm fine with removing it in trunk now.

> But I also had the idea of introducing Empty or Unset to
MediaSource::Type.
> Then Invalid would keep its meaning of doing something wrong in the 
> application while Empty/Unset would tell Phonon to actually do something:
> unset the current source. What do you think?

I have a patch attached. Please review.

--
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/




More information about the Phonon-backends mailing list