[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [dragon] src/app: switch-case kthxbai
From: Harald Sitter <sitter () kde ! org>
Date: 2012-06-01 7:13:16
Message-ID: 20120601071316.5AC26A60BB () git ! kde ! org
[Download RAW message or body]
Git commit b80ffe6bf0c1adb71123eb82e9ec080e4a06f190 by Harald Sitter.
Committed on 01/06/2012 at 09:13.
Pushed by sitter into branch 'master'.
switch-case kthxbai
M +11 -5 src/app/videoWindow.cpp
http://commits.kde.org/dragon/b80ffe6bf0c1adb71123eb82e9ec080e4a06f190
diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp
index 7b400a2..e94eca6 100644
--- a/src/app/videoWindow.cpp
+++ b/src/app/videoWindow.cpp
@@ -265,14 +265,20 @@ VideoWindow::playDisc(const Solid::Device& device )
Phonon::DiscType phononType = Phonon::NoDisc;
{
Solid::OpticalDisc::ContentTypes solidType = disc->availableContent();
- if( solidType & Solid::OpticalDisc::VideoDvd )
+ switch( solidType ) {
+ case Solid::OpticalDisc::VideoDvd:
phononType = Phonon::Dvd;
- else if( solidType & ( Solid::OpticalDisc::VideoCd | Solid::OpticalDisc::SuperVideoCd ) )
+ break;
+ case Solid::OpticalDisc::VideoCd:
+ case Solid::OpticalDisc::SuperVideoCd:
phononType = Phonon::Vcd;
- else if( solidType & Solid::OpticalDisc::Audio )
+ break;
+ case Solid::OpticalDisc::Audio:
phononType = Phonon::Cd;
- else
- {
+ break;
+ }
+
+ if( phononType == Phonon::NoDisc ){
kDebug() << "not a playable disc type: " << disc->availableContent() << " type";
return false;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic