about a patch

Richard richardmg at trolltech.com
Wed Nov 26 09:04:13 CET 2008


Just one minor thing, I would perhaps rephrase:
+         * Creates a MediaSource that empties the current source.
+         * It can be used to reset the MediaObject into the state it  
has before setting the first source.

into something more like this:

+         * Creates an empty MediaSource. An empty MediaSource is  
considered valid, and can be set on a
+         * MediaObject to unload its current media.

since the constructor does not actually empty or modify 'the current'  
source anywhere. But it can be used to empty/unload the current media  
from a particular MediaObject.

(I would also suggest something similar for: + * This MediaSource  
empties the current source.)

-Richard




On Nov 25, 2008, at 4:22 PM, Matthias Kretz wrote:

> On Tuesday 25 November 2008 15:25:07 Richard wrote:
>>>> Then you can:
>>>> mediaObject->setCurrentSource(MediaSource());
>>>
>>> Yes, which should be treated as the application doing something
>>> wrong (not
>>> fatal, though), whether we want to handle it the same as
>>> MediaSource::Empty
>>> I'm not sure about yet.
>>
>> MediaSource source();
>> Q_ASSERT(source.type() == Empty);
>> mediaObject->setCurrentSource(source); // Remove currently loaded  
>> media.
>>
>> ...would make sense to me (then there would be not need for the  
>> static
>> function, alltough I don't think it so bad).
>
> Hmm, so we'd redefine the meaning of MediaSource() from Invalid to  
> Empty.
> Perhaps the most sensible way. Dunno why I rejected that when  
> thinking about
> it...
>
> New patch attached.
>
> -- 
> ________________________________________________________
> Matthias Kretz (Germany)                            <><
> http://Vir.homelinux.org/
>
> <empty- 
> mediasource2.patch>_______________________________________________
> Phonon-backends mailing list
> Phonon-backends at kde.org
> https://mail.kde.org/mailman/listinfo/phonon-backends



More information about the Phonon-backends mailing list