]> git.sur5r.net Git - minitube/commitdiff
ifs instead of switches
authorFlavio Tordini <flavio.tordini@gmail.com>
Wed, 1 Jul 2009 15:57:30 +0000 (17:57 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Wed, 1 Jul 2009 15:57:30 +0000 (17:57 +0200)
src/videoareawidget.cpp

index 00d1b6f5f9634808a8114965858a08425915e567..645fc65cde405f77e6bc6ac4930714d2c55f0d71 100644 (file)
@@ -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();
 }