Declare more metatypes and debug operators.

Nearly all of the multimedia metatypes used in the auto tests are
now declared properly, and a large number of the types have debug
operators as well.

Removed the superfluous decls as well.

Change-Id: I42cfe37562db0c71d9811b4577fc326a3326ccc9
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Michael Goddard
2011-11-01 12:46:48 +10:00
committed by Qt by Nokia
parent 6a3a442ea6
commit 7dfb883df6
30 changed files with 720 additions and 168 deletions

View File

@@ -46,12 +46,10 @@
#include "qvideosurfaceformat.h"
#include <QtCore/qvariant.h>
#include <QDebug>
QT_BEGIN_NAMESPACE
Q_DECLARE_METATYPE(QVideoSurfaceFormat)
Q_DECLARE_METATYPE(QAbstractVideoSurface::Error)
class QAbstractVideoSurfacePrivate {
@@ -340,6 +338,25 @@ void QAbstractVideoSurface::setNativeResolution(const QSize &resolution)
\since 1.1
*/
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QAbstractVideoSurface::Error& error)
{
switch (error) {
case QAbstractVideoSurface::UnsupportedFormatError:
return dbg.nospace() << "UnsupportedFormatError";
case QAbstractVideoSurface::IncorrectFormatError:
return dbg.nospace() << "IncorrectFormatError";
case QAbstractVideoSurface::StoppedError:
return dbg.nospace() << "StoppedError";
case QAbstractVideoSurface::ResourceError:
return dbg.nospace() << "ResourceError";
default:
return dbg.nospace() << "NoError";
}
}
#endif
QT_END_NAMESPACE
#include "moc_qabstractvideosurface.cpp"