diff options
author | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2010-06-04 16:38:00 -0300 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2010-06-04 16:39:11 -0300 |
commit | 6bec0699b3c14f510051c8f1c91e66fc7aedd525 (patch) | |
tree | a651158e4349f8a8ebb4e4237b01b8fb7a6e33ba /examples | |
parent | 7c9dca4d9d4dc2ed804e9768b123902634ad0b8a (diff) |
call-widget example: Make coverity happy replacing assert with return.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/call/call-widget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/call/call-widget.cpp b/examples/call/call-widget.cpp index e247bef7..ec7643bc 100644 --- a/examples/call/call-widget.cpp +++ b/examples/call/call-widget.cpp @@ -237,7 +237,7 @@ void CallWidget::onStreamCreated(PendingOperation *op) qWarning() << "CallWidget::onStreamCreated: unable to create stream:" << op->errorName() << "-" << op->errorMessage(); - QPushButton *btn = 0; + QPushButton *btn; // we cannot create the stream for some reason, update buttons if (!streamForType(Tp::MediaStreamTypeAudio)) { @@ -245,7 +245,8 @@ void CallWidget::onStreamCreated(PendingOperation *op) } else if (!streamForType(Tp::MediaStreamTypeVideo)) { btn = mBtnSendVideo; } else { - Q_ASSERT(false); + // we only handle audio and video, so ignore here + return; } btn->blockSignals(true); @@ -344,7 +345,8 @@ void CallWidget::onStreamStateChanged(const MediaStreamPtr &stream, } else if (stream->type() == Tp::MediaStreamTypeVideo) { lbl = mLblVideoState; } else { - Q_ASSERT(false); + // ignore unknown streams + return; } if (state == Tp::MediaStreamStateDisconnected) { lbl->setText(QLatin1String("State: Disconnected")); |