From: Flavio Tordini Date: Wed, 1 Jul 2009 15:57:30 +0000 (+0200) Subject: ifs instead of switches X-Git-Tag: 0.4~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0dbdb73afb9de59463fcccd4f6f25aa6b9e0eb9d;p=minitube ifs instead of switches --- diff --git a/src/videoareawidget.cpp b/src/videoareawidget.cpp index 00d1b6f..645fc65 100644 --- a/src/videoareawidget.cpp +++ b/src/videoareawidget.cpp @@ -25,22 +25,11 @@ void VideoAreaWidget::showLoading(Video *video) { } void VideoAreaWidget::mouseDoubleClickEvent(QMouseEvent *event) { - switch(event->button()) { - case Qt::LeftButton: + if (event->button() == Qt::LeftButton) emit doubleClicked(); - break; - case Qt::RightButton: - - break; - } } void VideoAreaWidget::mousePressEvent(QMouseEvent *event) { - switch(event->button()) { - case Qt::LeftButton: - break; - case Qt::RightButton: - emit rightClicked(); - break; - } + switch(event->button() == Qt::RightButton) + emit rightClicked(); }