QtMultiMedia: Fix warnings about missing return values.
In QDebug operator<< for enumerations. Change-Id: I52309356f05a9520b7472a673450a224d7fa71d3 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
a5d2b2ed60
commit
090e3efaeb
@@ -101,42 +101,59 @@ public:
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug dbg, QAudio::Error error)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (error) {
|
||||
case QAudio::NoError:
|
||||
return dbg.nospace() << "NoError";
|
||||
nospace << "NoError";
|
||||
break;
|
||||
case QAudio::OpenError:
|
||||
return dbg.nospace() << "OpenError";
|
||||
nospace << "OpenError";
|
||||
break;
|
||||
case QAudio::IOError:
|
||||
return dbg.nospace() << "IOError";
|
||||
nospace << "IOError";
|
||||
break;
|
||||
case QAudio::UnderrunError:
|
||||
return dbg.nospace() << "UnderrunError";
|
||||
nospace << "UnderrunError";
|
||||
break;
|
||||
case QAudio::FatalError:
|
||||
return dbg.nospace() << "FatalError";
|
||||
nospace << "FatalError";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, QAudio::State state)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (state) {
|
||||
case QAudio::ActiveState:
|
||||
return dbg.nospace() << "ActiveState";
|
||||
nospace << "ActiveState";
|
||||
break;
|
||||
case QAudio::SuspendedState:
|
||||
return dbg.nospace() << "SuspendedState";
|
||||
nospace << "SuspendedState";
|
||||
break;
|
||||
case QAudio::StoppedState:
|
||||
return dbg.nospace() << "StoppedState";
|
||||
nospace << "StoppedState";
|
||||
break;
|
||||
case QAudio::IdleState:
|
||||
return dbg.nospace() << "IdleState";
|
||||
nospace << "IdleState";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, QAudio::Mode mode)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (mode) {
|
||||
case QAudio::AudioInput:
|
||||
return dbg.nospace() << "AudioInput";
|
||||
nospace << "AudioInput";
|
||||
break;
|
||||
case QAudio::AudioOutput:
|
||||
return dbg.nospace() << "AudioOutput";
|
||||
nospace << "AudioOutput";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -420,26 +420,36 @@ QAudioFormat::SampleType QAudioFormat::sampleType() const
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (endian) {
|
||||
case QAudioFormat::BigEndian:
|
||||
return dbg.nospace() << "BigEndian";
|
||||
nospace << "BigEndian";
|
||||
break;
|
||||
case QAudioFormat::LittleEndian:
|
||||
return dbg.nospace() << "LittleEndian";
|
||||
nospace << "LittleEndian";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (type) {
|
||||
case QAudioFormat::SignedInt:
|
||||
return dbg.nospace() << "SignedInt";
|
||||
nospace << "SignedInt";
|
||||
break;
|
||||
case QAudioFormat::UnSignedInt:
|
||||
return dbg.nospace() << "UnSignedInt";
|
||||
nospace << "UnSignedInt";
|
||||
break;
|
||||
case QAudioFormat::Float:
|
||||
return dbg.nospace() << "Float";
|
||||
default:
|
||||
return dbg.nospace() << "Unknown";
|
||||
nospace << "Float";
|
||||
break;
|
||||
default:
|
||||
nospace << "Unknown";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, const QAudioFormat &f)
|
||||
|
||||
@@ -608,32 +608,45 @@ void QVideoSurfaceFormat::setProperty(const char *name, const QVariant &value)
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::YCbCrColorSpace cs)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (cs) {
|
||||
case QVideoSurfaceFormat::YCbCr_BT601:
|
||||
return dbg.nospace() << "YCbCr_BT601";
|
||||
nospace << "YCbCr_BT601";
|
||||
break;
|
||||
case QVideoSurfaceFormat::YCbCr_BT709:
|
||||
return dbg.nospace() << "YCbCr_BT709";
|
||||
nospace << "YCbCr_BT709";
|
||||
break;
|
||||
case QVideoSurfaceFormat::YCbCr_JPEG:
|
||||
return dbg.nospace() << "YCbCr_JPEG";
|
||||
nospace << "YCbCr_JPEG";
|
||||
break;
|
||||
case QVideoSurfaceFormat::YCbCr_xvYCC601:
|
||||
return dbg.nospace() << "YCbCr_xvYCC601";
|
||||
nospace << "YCbCr_xvYCC601";
|
||||
break;
|
||||
case QVideoSurfaceFormat::YCbCr_xvYCC709:
|
||||
return dbg.nospace() << "YCbCr_xvYCC709";
|
||||
nospace << "YCbCr_xvYCC709";
|
||||
break;
|
||||
case QVideoSurfaceFormat::YCbCr_CustomMatrix:
|
||||
return dbg.nospace() << "YCbCr_CustomMatrix";
|
||||
nospace << "YCbCr_CustomMatrix";
|
||||
break;
|
||||
default:
|
||||
return dbg.nospace() << "YCbCr_Undefined";
|
||||
nospace << "YCbCr_Undefined";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::Direction dir)
|
||||
{
|
||||
QDebug nospace = dbg.nospace();
|
||||
switch (dir) {
|
||||
case QVideoSurfaceFormat::BottomToTop:
|
||||
return dbg.nospace() << "BottomToTop";
|
||||
nospace << "BottomToTop";
|
||||
break;
|
||||
case QVideoSurfaceFormat::TopToBottom:
|
||||
return dbg.nospace() << "TopToBottom";
|
||||
nospace << "TopToBottom";
|
||||
break;
|
||||
}
|
||||
return nospace;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
|
||||
|
||||
Reference in New Issue
Block a user