From kde-commits Wed Aug 17 20:46:06 2011 From: Christian Esken Date: Wed, 17 Aug 2011 20:46:06 +0000 To: kde-commits Subject: KDE/kdemultimedia/kmix Message-Id: <20110817204606.98BFFAC873 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=131361398315727 SVN commit 1247881 by esken: Cleanups M +2 -1 backends/mixer_backend.h U backends/mixer_oss4.cpp M +1 -15 core/volume.cpp M +0 -4 gui/mdwslider.cpp --- trunk/KDE/kdemultimedia/kmix/backends/mixer_backend.h #1247880:1247881 @@ -22,11 +22,12 @@ #ifndef MIXER_BACKEND_H #define MIXER_BACKEND_H +#include #include //#include "core/mixer.h" #include "core/mixdevice.h" #include "core/mixset.h" -class Mixer; +#include "core/mixer.h" class Mixer_Backend : public QObject { --- trunk/KDE/kdemultimedia/kmix/core/volume.cpp #1247880:1247881 @@ -94,19 +94,8 @@ _volumesL.insert(ch.chid, ch); } -//// copy constructor -//Volume::Volume( const Volume &v ) -//{ -// _chmask = v._chmask; -// _maxVolume = v._maxVolume; -// _minVolume = v._minVolume; -// _hasSwitch = v._hasSwitch; -// _switchActivated = v._switchActivated; -// _isCapture = v._isCapture; -// setVolume(v, (ChannelMask)v._chmask); -// // kDebug(67100) << "Volume::copy-constructor initialized " << v << "\n"; -//} + void Volume::init( ChannelMask chmask, long maxVolume, long minVolume, bool hasSwitch, bool isCapture ) { _chmask = chmask; @@ -175,10 +164,7 @@ foreach (VolumeChannel vc, _volumesL ) { ChannelID chid = vc.chid; -/* if ( v.getVolumes().contains(chid) && (Volume::_channelMaskEnum[chid] & chmask) ) - {*/ v.getVolumes()[chid].volume = vc.volume; -// } // TODO Check whether this is OK. If yes, then _chmask can be removed } } --- trunk/KDE/kdemultimedia/kmix/gui/mdwslider.cpp #1247880:1247881 @@ -170,10 +170,6 @@ connect( b, SIGNAL(triggered(bool)), SLOT(toggleMuted()) ); } - // @todo: The following has been added for an unknown reason. Have to check this. - cesken - // Is there a reason why it is only done for Mute and not Volume Up/down? - // 2010-08-20: I found it out: It's a bug ( Bug 209901 - Volume Up and Volume Down buttons mapped to wrong audio channel) - //if (view) view->actionCollection()->addAction( QString("Toggle mute %1").arg( actionSuffix ), b ); }