[Qt-interest] Many API flaws in QtMultiMedia
Richard Moore
rich at kde.org
Thu Sep 3 18:12:24 CEST 2009
I've just had a quick look over the docs for the new QtMultimedia
module that appeared, and the API seems to violate a bunch of the
normal design principles used in Qt. Even on the basic of a quick read
I've found numerous issues:
* setCodec ( QString codec )
http://doc.trolltech.com/4.6-snapshot/qaudioformat.html#setCodec
Should const QString &.
* Many missing Q_PROPERTIES
* http://doc.trolltech.com/4.6-snapshot/qaudiooutput.html#QAudioOutput
Overloading the constructor exactly as we're told not to in the design guide.
* virtual QVariant handle () const
http://doc.trolltech.com/4.6-snapshot/qabstractvideobuffer.html#handle
Everywhere else in Qt handle() methods are for opaque platform
dependent types. Not here though.
* http://doc.trolltech.com/4.6-snapshot/qaudioinput.html#start
Who owns the QIODevice here? It seems to vary - sometimes the class
creates its own, sometimes it doesn't. This is a bug waiting to
happen.
I've only had a quick look (about 5 minutes) and I've spotted all
these issues. Normally, your APIs are very well thought out and
consistent but these don't even seem to have had a basic review. We
were also told that things were frozen, so I assumed that we couldn't
submit new features. This seems like a large code drop for a frozen
tree and appears to have been rushed in. Surely a change like this
should be done in a more controlled way.
Regards
Rich.
More information about the Qt-interest-old
mailing list