From 76cb00ab3563a929e790aa761fe88f8005a1db64 Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 23 May 2013 15:06:48 +0000 Subject: Use bool conversion operator to check for defined. More compatible version of the original nullptr fix. --- multimedia/kmix/distinfo | 8 +++++++- multimedia/kmix/patches/patch-apps_kmixd.cpp | 13 +++++++++++++ .../kmix/patches/patch-backends_mixer__backend.cpp | 13 +++++++++++++ .../kmix/patches/patch-backends_mixer__mpris2.cpp | 13 +++++++++++++ .../kmix/patches/patch-core_mixertoolbox.cpp | 20 ++++++++++++++++++++ .../kmix/patches/patch-gui_kmixdockwidget.cpp | 22 ++++++++++++++++++++++ .../kmix/patches/patch-gui_viewdockareapopup.cpp | 19 +++++++++++++++++++ 7 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 multimedia/kmix/patches/patch-apps_kmixd.cpp create mode 100644 multimedia/kmix/patches/patch-backends_mixer__backend.cpp create mode 100644 multimedia/kmix/patches/patch-backends_mixer__mpris2.cpp create mode 100644 multimedia/kmix/patches/patch-core_mixertoolbox.cpp create mode 100644 multimedia/kmix/patches/patch-gui_kmixdockwidget.cpp create mode 100644 multimedia/kmix/patches/patch-gui_viewdockareapopup.cpp (limited to 'multimedia') diff --git a/multimedia/kmix/distinfo b/multimedia/kmix/distinfo index 2a2f18fe2e4..3f554716a65 100644 --- a/multimedia/kmix/distinfo +++ b/multimedia/kmix/distinfo @@ -1,10 +1,16 @@ -$NetBSD: distinfo,v 1.4 2013/05/21 12:49:36 markd Exp $ +$NetBSD: distinfo,v 1.5 2013/05/23 15:06:48 joerg Exp $ SHA1 (kmix-4.10.3.tar.xz) = 09289c9bb6bd5e592d214f3f665078010e9a7dd2 RMD160 (kmix-4.10.3.tar.xz) = d77b9dad15c7a9efbaab611c5c6e380c3fa1db07 Size (kmix-4.10.3.tar.xz) = 385988 bytes SHA1 (patch-CMakeLists.txt) = be774815cf3c8ae99f6bae31d5de010f37a6ef29 +SHA1 (patch-apps_kmixd.cpp) = 6a8876778b5b6d3844fcb0c874845eb0b955840b +SHA1 (patch-backends_mixer__backend.cpp) = 6dea8709aeb26abc8914e35fa5ce05f4296c4b80 +SHA1 (patch-backends_mixer__mpris2.cpp) = ec687666b5e62f5bb41a9308d17a0a62f87dae4a SHA1 (patch-core_ControlPool.h) = fba837f300478e015941fa5aa7355372b294bb38 SHA1 (patch-core_MasterControl.h) = ab348a5ffc440650c9f1fd529335f87e5c81ed12 SHA1 (patch-core_mixdevice.h) = 75dd0c84517ec0e8fe647a2b8e84370b1e8afea9 +SHA1 (patch-core_mixertoolbox.cpp) = fc3d99aa5b9236c7c4abd7fefa0fcdf0a344829a +SHA1 (patch-gui_kmixdockwidget.cpp) = 6dfdb8eba6c6682c7678fe936cbb067335908769 +SHA1 (patch-gui_viewdockareapopup.cpp) = 9db09bb68d5aeb2e38e2792264278da0acf4ebff SHA1 (patch-tests_CMakeLists.txt) = 4c39d6268e6c690099d06a8ba6946cb90242791e diff --git a/multimedia/kmix/patches/patch-apps_kmixd.cpp b/multimedia/kmix/patches/patch-apps_kmixd.cpp new file mode 100644 index 00000000000..e4b1f25d8ea --- /dev/null +++ b/multimedia/kmix/patches/patch-apps_kmixd.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-apps_kmixd.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- apps/kmixd.cpp.orig 2013-05-04 01:50:10.000000000 +0000 ++++ apps/kmixd.cpp +@@ -156,7 +156,7 @@ void KMixD::saveBaseConfig() + config.writeEntry( "MasterMixer", mixerMasterCard->id() ); + } + shared_ptr mdMaster = Mixer::getGlobalMasterMD(); +- if ( mdMaster != 0 ) { ++ if ( mdMaster ) { + config.writeEntry( "MasterMixerDevice", mdMaster->id() ); + } + QString mixerIgnoreExpression = MixerToolBox::instance()->mixerIgnoreExpression(); diff --git a/multimedia/kmix/patches/patch-backends_mixer__backend.cpp b/multimedia/kmix/patches/patch-backends_mixer__backend.cpp new file mode 100644 index 00000000000..80d1ed7f686 --- /dev/null +++ b/multimedia/kmix/patches/patch-backends_mixer__backend.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-backends_mixer__backend.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- backends/mixer_backend.cpp.orig 2013-05-04 01:47:44.000000000 +0000 ++++ backends/mixer_backend.cpp +@@ -237,7 +237,7 @@ void Mixer_Backend::readSetFromHW() + */ + shared_ptr Mixer_Backend::recommendedMaster() + { +- if ( m_recommendedMaster != 0 ) ++ if ( m_recommendedMaster ) + { + // Backend has set a recommended master. Thats fine. Using it. + return m_recommendedMaster; diff --git a/multimedia/kmix/patches/patch-backends_mixer__mpris2.cpp b/multimedia/kmix/patches/patch-backends_mixer__mpris2.cpp new file mode 100644 index 00000000000..f13b590f275 --- /dev/null +++ b/multimedia/kmix/patches/patch-backends_mixer__mpris2.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-backends_mixer__mpris2.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- backends/mixer_mpris2.cpp.orig 2013-05-04 01:48:09.000000000 +0000 ++++ backends/mixer_mpris2.cpp +@@ -394,7 +394,7 @@ void Mixer_MPRIS2::newMediaPlayer(QStrin + QString id = ( lastDot == -1 ) ? name : name.mid(lastDot+1); + apps.remove(id); + shared_ptr md = m_mixDevices.get(id); +- if (md != 0) ++ if (md) + { + // We know about the player that is unregistering => remove internally + md->close(); diff --git a/multimedia/kmix/patches/patch-core_mixertoolbox.cpp b/multimedia/kmix/patches/patch-core_mixertoolbox.cpp new file mode 100644 index 00000000000..f4858ebffd9 --- /dev/null +++ b/multimedia/kmix/patches/patch-core_mixertoolbox.cpp @@ -0,0 +1,20 @@ +$NetBSD: patch-core_mixertoolbox.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- core/mixertoolbox.cpp.orig 2013-05-04 01:52:48.000000000 +0000 ++++ core/mixertoolbox.cpp +@@ -249,13 +249,13 @@ void MixerToolBox::initMixerInternal(Mul + + + // Add a master device (if we haven't defined one yet) +- if ( Mixer::getGlobalMasterMD(false) == 0 ) { ++ if ( !Mixer::getGlobalMasterMD(false) ) { + // We have no master card yet. This actually only happens when there was + // not one defined in the kmixrc. + // So lets just set the first card as master card. + if ( Mixer::mixers().count() > 0 ) { + shared_ptr master = Mixer::mixers().first()->getLocalMasterMD(); +- if ( master != 0 ) { ++ if ( master ) { + QString controlId = master->id(); + Mixer::setGlobalMaster( Mixer::mixers().first()->id(), controlId, true); + } diff --git a/multimedia/kmix/patches/patch-gui_kmixdockwidget.cpp b/multimedia/kmix/patches/patch-gui_kmixdockwidget.cpp new file mode 100644 index 00000000000..0ad9891a766 --- /dev/null +++ b/multimedia/kmix/patches/patch-gui_kmixdockwidget.cpp @@ -0,0 +1,22 @@ +$NetBSD: patch-gui_kmixdockwidget.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- gui/kmixdockwidget.cpp.orig 2013-05-04 01:54:44.000000000 +0000 ++++ gui/kmixdockwidget.cpp +@@ -217,7 +217,7 @@ void KMixDockWidget::updatePixmap() + shared_ptr md = Mixer::getGlobalMasterMD(); + + char newPixmapType; +- if ( md == 0 ) ++ if ( !md ) + { + newPixmapType = 'e'; + } +@@ -407,7 +407,7 @@ void KMixDockWidget::contextMenuAboutToS + void KMixDockWidget::updateDockMuteAction ( KToggleAction* dockMuteAction ) + { + shared_ptr md = Mixer::getGlobalMasterMD(); +- if ( md != 0 && dockMuteAction != 0 ) ++ if ( md && dockMuteAction != 0 ) + { + Volume& vol = md->playbackVolume().hasVolume() ? md->playbackVolume() : md->captureVolume(); + bool isInactive = vol.isCapture() ? !md->isRecSource() : md->isMuted(); diff --git a/multimedia/kmix/patches/patch-gui_viewdockareapopup.cpp b/multimedia/kmix/patches/patch-gui_viewdockareapopup.cpp new file mode 100644 index 00000000000..f3446716f20 --- /dev/null +++ b/multimedia/kmix/patches/patch-gui_viewdockareapopup.cpp @@ -0,0 +1,19 @@ +$NetBSD: patch-gui_viewdockareapopup.cpp,v 1.3 2013/05/23 15:06:48 joerg Exp $ + +--- gui/viewdockareapopup.cpp.orig 2013-05-04 01:56:15.000000000 +0000 ++++ gui/viewdockareapopup.cpp +@@ -244,12 +244,12 @@ Application: KMix (kmix), signal: Segmen + { + kDebug() << "ADD? mixerId=" << mixer->id(); + shared_ptrdockMD = mixer->getLocalMasterMD(); +- if ( dockMD == 0 && mixer->size() > 0 ) ++ if ( !dockMD && mixer->size() > 0 ) + { + // If we have no dock device yet, we will take the first available mixer device. + dockMD = (*mixer)[0]; + } +- if ( dockMD != 0 ) ++ if ( dockMD ) + { + kDebug() << "ADD? mixerId=" << mixer->id() << ", md=" << dockMD->id(); + if ( !dockMD->isApplicationStream() && dockMD->playbackVolume().hasVolume()) -- cgit v1.2.3