about a patch
Richard
richardmg at trolltech.com
Tue Nov 25 15:25:07 CET 2008
>>
>> 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).
-Richard
>
>
>> or
>>
>> mediaObject->setCurrentSource(MediaSource::Empty);
>
> There's no MediaObject::setCurrentSource(MediaSource::Type) function
> and no
> MediaSource(MediaSource::Type) ctor atm.
>
>> I still don't see the need for
>>
>> mediaObject->setCurrentSource(MediaSource::empty());
>
> We need to either add
> MediaSource::MediaSource(Type)
> or
> static MediaSource MediaSource::empty()
>
> I'd rather add the latter than the former because e.g.
> mediaObject->setCurrentSource(MediaSource::Disc);
> would then be possible but doesn't make any sense. I do agree that
> mediaObject->setCurrentSource(MediaSource::Empty);
> is more intuitive than
> mediaObject->setCurrentSource(MediaSource::empty());
>
> So it's a trade-off between making the API foolproof and making it
> intuitive.
> :(
>
> --
> ________________________________________________________
> Matthias Kretz (Germany) <><
> http://Vir.homelinux.org/
>
> _______________________________________________
> 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