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
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
QDebug operator<<(QDebug dbg, QAudio::Error error)
|
QDebug operator<<(QDebug dbg, QAudio::Error error)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case QAudio::NoError:
|
case QAudio::NoError:
|
||||||
return dbg.nospace() << "NoError";
|
nospace << "NoError";
|
||||||
|
break;
|
||||||
case QAudio::OpenError:
|
case QAudio::OpenError:
|
||||||
return dbg.nospace() << "OpenError";
|
nospace << "OpenError";
|
||||||
|
break;
|
||||||
case QAudio::IOError:
|
case QAudio::IOError:
|
||||||
return dbg.nospace() << "IOError";
|
nospace << "IOError";
|
||||||
|
break;
|
||||||
case QAudio::UnderrunError:
|
case QAudio::UnderrunError:
|
||||||
return dbg.nospace() << "UnderrunError";
|
nospace << "UnderrunError";
|
||||||
|
break;
|
||||||
case QAudio::FatalError:
|
case QAudio::FatalError:
|
||||||
return dbg.nospace() << "FatalError";
|
nospace << "FatalError";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, QAudio::State state)
|
QDebug operator<<(QDebug dbg, QAudio::State state)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case QAudio::ActiveState:
|
case QAudio::ActiveState:
|
||||||
return dbg.nospace() << "ActiveState";
|
nospace << "ActiveState";
|
||||||
|
break;
|
||||||
case QAudio::SuspendedState:
|
case QAudio::SuspendedState:
|
||||||
return dbg.nospace() << "SuspendedState";
|
nospace << "SuspendedState";
|
||||||
|
break;
|
||||||
case QAudio::StoppedState:
|
case QAudio::StoppedState:
|
||||||
return dbg.nospace() << "StoppedState";
|
nospace << "StoppedState";
|
||||||
|
break;
|
||||||
case QAudio::IdleState:
|
case QAudio::IdleState:
|
||||||
return dbg.nospace() << "IdleState";
|
nospace << "IdleState";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, QAudio::Mode mode)
|
QDebug operator<<(QDebug dbg, QAudio::Mode mode)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case QAudio::AudioInput:
|
case QAudio::AudioInput:
|
||||||
return dbg.nospace() << "AudioInput";
|
nospace << "AudioInput";
|
||||||
|
break;
|
||||||
case QAudio::AudioOutput:
|
case QAudio::AudioOutput:
|
||||||
return dbg.nospace() << "AudioOutput";
|
nospace << "AudioOutput";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -420,26 +420,36 @@ QAudioFormat::SampleType QAudioFormat::sampleType() const
|
|||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian)
|
QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (endian) {
|
switch (endian) {
|
||||||
case QAudioFormat::BigEndian:
|
case QAudioFormat::BigEndian:
|
||||||
return dbg.nospace() << "BigEndian";
|
nospace << "BigEndian";
|
||||||
|
break;
|
||||||
case QAudioFormat::LittleEndian:
|
case QAudioFormat::LittleEndian:
|
||||||
return dbg.nospace() << "LittleEndian";
|
nospace << "LittleEndian";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type)
|
QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QAudioFormat::SignedInt:
|
case QAudioFormat::SignedInt:
|
||||||
return dbg.nospace() << "SignedInt";
|
nospace << "SignedInt";
|
||||||
|
break;
|
||||||
case QAudioFormat::UnSignedInt:
|
case QAudioFormat::UnSignedInt:
|
||||||
return dbg.nospace() << "UnSignedInt";
|
nospace << "UnSignedInt";
|
||||||
|
break;
|
||||||
case QAudioFormat::Float:
|
case QAudioFormat::Float:
|
||||||
return dbg.nospace() << "Float";
|
nospace << "Float";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return dbg.nospace() << "Unknown";
|
nospace << "Unknown";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, const QAudioFormat &f)
|
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
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::YCbCrColorSpace cs)
|
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::YCbCrColorSpace cs)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (cs) {
|
switch (cs) {
|
||||||
case QVideoSurfaceFormat::YCbCr_BT601:
|
case QVideoSurfaceFormat::YCbCr_BT601:
|
||||||
return dbg.nospace() << "YCbCr_BT601";
|
nospace << "YCbCr_BT601";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::YCbCr_BT709:
|
case QVideoSurfaceFormat::YCbCr_BT709:
|
||||||
return dbg.nospace() << "YCbCr_BT709";
|
nospace << "YCbCr_BT709";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::YCbCr_JPEG:
|
case QVideoSurfaceFormat::YCbCr_JPEG:
|
||||||
return dbg.nospace() << "YCbCr_JPEG";
|
nospace << "YCbCr_JPEG";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::YCbCr_xvYCC601:
|
case QVideoSurfaceFormat::YCbCr_xvYCC601:
|
||||||
return dbg.nospace() << "YCbCr_xvYCC601";
|
nospace << "YCbCr_xvYCC601";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::YCbCr_xvYCC709:
|
case QVideoSurfaceFormat::YCbCr_xvYCC709:
|
||||||
return dbg.nospace() << "YCbCr_xvYCC709";
|
nospace << "YCbCr_xvYCC709";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::YCbCr_CustomMatrix:
|
case QVideoSurfaceFormat::YCbCr_CustomMatrix:
|
||||||
return dbg.nospace() << "YCbCr_CustomMatrix";
|
nospace << "YCbCr_CustomMatrix";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return dbg.nospace() << "YCbCr_Undefined";
|
nospace << "YCbCr_Undefined";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::Direction dir)
|
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::Direction dir)
|
||||||
{
|
{
|
||||||
|
QDebug nospace = dbg.nospace();
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case QVideoSurfaceFormat::BottomToTop:
|
case QVideoSurfaceFormat::BottomToTop:
|
||||||
return dbg.nospace() << "BottomToTop";
|
nospace << "BottomToTop";
|
||||||
|
break;
|
||||||
case QVideoSurfaceFormat::TopToBottom:
|
case QVideoSurfaceFormat::TopToBottom:
|
||||||
return dbg.nospace() << "TopToBottom";
|
nospace << "TopToBottom";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
return nospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
|
QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
|
||||||
|
|||||||
Reference in New Issue
Block a user