Commit e9a0b564 authored by Mladen Milinkovic's avatar Mladen Milinkovic

Replaced assert with Q_ASSERT

parent ce2a1a94
......@@ -144,7 +144,7 @@ VideoPlayer::onMediaLoaded()
audioStreamName += QStringLiteral(": ") + trk[QStringLiteral("title")].toString();
if(trk.contains(QStringLiteral("codec")))
audioStreamName += QStringLiteral(" [") + trk[QStringLiteral("codec")].toString() + QStringLiteral("]");
assert(m_audioStreams.size() == trk["id"]);
Q_ASSERT(m_audioStreams.size() == trk["id"]);
m_audioStreams.append(audioStreamName);
}
emit audioStreamsChanged(m_audioStreams);
......@@ -169,7 +169,7 @@ VideoPlayer::onMediaLoaded()
if(trk.contains(QStringLiteral("title")))
textStreamName += QStringLiteral(": ") + trk[QStringLiteral("title")].toString();
assert(m_textStreams.size() == trk["id"]);
Q_ASSERT(m_textStreams.size() == trk["id"]);
m_textStreams.append(textStreamName);
}
emit textStreamsChanged(m_textStreams);
......@@ -252,7 +252,7 @@ VideoPlayer::onVolumeChange(double volume)
if(m_muted)
return;
assert(volume >= 0. && volume <= 1.);
Q_ASSERT(volume >= 0. && volume <= 1.);
volume *= 100.;
if(m_volume == volume)
......@@ -348,7 +348,7 @@ VideoPlayer::playOnLoad()
bool
VideoPlayer::openFile(const QString &filePath)
{
assert(m_state == Initialized);
Q_ASSERT(m_state == Initialized);
QFileInfo fileInfo(filePath);
if(!fileInfo.exists() || !fileInfo.isFile() || !fileInfo.isReadable()) {
......
......@@ -114,7 +114,7 @@ void
VideoWidget::mouseReleaseEvent(QMouseEvent *e)
{
// FIXME: ignore doubleclicks
assert(e->type() != QEvent::MouseButtonDblClick);
Q_ASSERT(e->type() != QEvent::MouseButtonDblClick);
if(e->button() == Qt::LeftButton) {
e->accept();
emit leftClicked(e->globalPos());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment