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

@@ -41,7 +41,7 @@
#include <qaudio.h>
#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -98,6 +98,48 @@ public:
\value AudioInput audio input device
*/
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QAudio::Error error)
{
switch (error) {
case QAudio::NoError:
return dbg.nospace() << "NoError";
case QAudio::OpenError:
return dbg.nospace() << "OpenError";
case QAudio::IOError:
return dbg.nospace() << "IOError";
case QAudio::UnderrunError:
return dbg.nospace() << "UnderrunError";
case QAudio::FatalError:
return dbg.nospace() << "FatalError";
}
}
QDebug operator<<(QDebug dbg, QAudio::State state)
{
switch (state) {
case QAudio::ActiveState:
return dbg.nospace() << "ActiveState";
case QAudio::SuspendedState:
return dbg.nospace() << "SuspendedState";
case QAudio::StoppedState:
return dbg.nospace() << "StoppedState";
case QAudio::IdleState:
return dbg.nospace() << "IdleState";
}
}
QDebug operator<<(QDebug dbg, QAudio::Mode mode)
{
switch (mode) {
case QAudio::AudioInput:
return dbg.nospace() << "AudioInput";
case QAudio::AudioOutput:
return dbg.nospace() << "AudioOutput";
}
}
#endif
QT_END_NAMESPACE