diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2012-02-14 10:56:04 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-14 08:30:40 +0100 |
commit | 4f38f950b0e4b0637a2a267638496a44456ae456 (patch) | |
tree | f95905a15a171843ec36e1f9444d7cd8464219f9 /examples | |
parent | bd9484ddca2780c4b1266849c00b1024e9b1c7cf (diff) |
Fix some compiler warnings.
As it turns out, we had an overloaded virtual from an earlier era,
with the extra parameter never used. So cleaning that up was a
bonus to remove the compiler warning.
Change-Id: I780287f8a5d2b0a1ec84ec62c88ba50e051f372b
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/audiodevices/audiodevices.cpp | 2 | ||||
-rw-r--r-- | examples/spectrum/app/waveform.cpp | 1 | ||||
-rw-r--r-- | examples/spectrum/app/wavfile.h | 1 | ||||
-rw-r--r-- | examples/videowidget/videowidgetsurface.cpp | 5 | ||||
-rw-r--r-- | examples/videowidget/videowidgetsurface.h | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/examples/audiodevices/audiodevices.cpp b/examples/audiodevices/audiodevices.cpp index fb7677632..d8be77f2c 100644 --- a/examples/audiodevices/audiodevices.cpp +++ b/examples/audiodevices/audiodevices.cpp @@ -58,6 +58,8 @@ QString toString(QAudioFormat::SampleType sampleType) case QAudioFormat::Float: result = "Float"; break; + case QAudioFormat::Unknown: + result = "Unknown"; } return result; } diff --git a/examples/spectrum/app/waveform.cpp b/examples/spectrum/app/waveform.cpp index 420a01eb0..744c98063 100644 --- a/examples/spectrum/app/waveform.cpp +++ b/examples/spectrum/app/waveform.cpp @@ -393,6 +393,7 @@ void Waveform::paintTile(int index) const int offset = reinterpret_cast<const char*>(ptr) - m_buffer.constData(); Q_ASSERT(offset >= 0); Q_ASSERT(offset < m_bufferLength); + Q_UNUSED(offset); const qint16 pcmValue = *ptr; const qreal realValue = pcmToReal(pcmValue); diff --git a/examples/spectrum/app/wavfile.h b/examples/spectrum/app/wavfile.h index cd4988d23..eb867241d 100644 --- a/examples/spectrum/app/wavfile.h +++ b/examples/spectrum/app/wavfile.h @@ -51,6 +51,7 @@ class WavFile : public QFile public: WavFile(QObject *parent = 0); + using QFile::open; bool open(const QString &fileName); const QAudioFormat &fileFormat() const; qint64 headerLength() const; diff --git a/examples/videowidget/videowidgetsurface.cpp b/examples/videowidget/videowidgetsurface.cpp index 0aafc1e2b..da94763f7 100644 --- a/examples/videowidget/videowidgetsurface.cpp +++ b/examples/videowidget/videowidgetsurface.cpp @@ -69,11 +69,8 @@ QList<QVideoFrame::PixelFormat> VideoWidgetSurface::supportedPixelFormats( //! [0] //! [1] -bool VideoWidgetSurface::isFormatSupported( - const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const +bool VideoWidgetSurface::isFormatSupported(const QVideoSurfaceFormat &format) const { - Q_UNUSED(similar); - const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); const QSize size = format.frameSize(); diff --git a/examples/videowidget/videowidgetsurface.h b/examples/videowidget/videowidgetsurface.h index d25399e07..ebd46ebf6 100644 --- a/examples/videowidget/videowidgetsurface.h +++ b/examples/videowidget/videowidgetsurface.h @@ -55,7 +55,7 @@ public: QList<QVideoFrame::PixelFormat> supportedPixelFormats( QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; - bool isFormatSupported(const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const; + bool isFormatSupported(const QVideoSurfaceFormat &format) const; bool start(const QVideoSurfaceFormat &format); void stop(); |