summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-06-04 16:38:00 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-06-04 16:39:11 -0300
commit6bec0699b3c14f510051c8f1c91e66fc7aedd525 (patch)
treea651158e4349f8a8ebb4e4237b01b8fb7a6e33ba /examples
parent7c9dca4d9d4dc2ed804e9768b123902634ad0b8a (diff)
call-widget example: Make coverity happy replacing assert with return.
Diffstat (limited to 'examples')
-rw-r--r--examples/call/call-widget.cpp8
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"));