[arch-commits] Commit in kdemultimedia/trunk (PKGBUILD fix-memleak-in-kmix.patch)

Andrea Scarpino andrea at archlinux.org
Tue Jul 12 15:23:57 EDT 2011


    Date: Tuesday, July 12, 2011 @ 15:23:57
  Author: andrea
Revision: 131350

Fix memleak in KMix BUG#264089

Added:
  kdemultimedia/trunk/fix-memleak-in-kmix.patch
Modified:
  kdemultimedia/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   11 ++++++--
 fix-memleak-in-kmix.patch |   55 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-07-12 19:22:54 UTC (rev 131349)
+++ PKGBUILD	2011-07-12 19:23:57 UTC (rev 131350)
@@ -11,7 +11,7 @@
          'kdemultimedia-kscd'
          'kdemultimedia-mplayerthumbs')
 pkgver=4.6.5
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url='http://www.kde.org'
 license=('GPL' 'LGPL' 'FDL')
@@ -19,11 +19,16 @@
 makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-runtime' 'tunepimp'
         'ffmpeg' 'mplayer' 'pulseaudio' 'libmusicbrainz3')
 source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
-        'mplayerthumbs.config')
+        'mplayerthumbs.config'
+        'fix-memleak-in-kmix.patch')
 sha1sums=('081bead5ee758d169f3119c138424929b001d04f'
-          'ba016fa2563c14ffcba852c62506b66bfc6ee683')
+          'ba016fa2563c14ffcba852c62506b66bfc6ee683'
+          '80370de30898f1ba1a6db057d34324abdcc57384')
 
 build() {
+    cd "${srcdir}"/${pkgbase}-${pkgver}
+    patch -p1 -i "${srcdir}"/fix-memleak-in-kmix.patch
+
     cd ${srcdir}
 	mkdir build
 	cd build

Added: fix-memleak-in-kmix.patch
===================================================================
--- fix-memleak-in-kmix.patch	                        (rev 0)
+++ fix-memleak-in-kmix.patch	2011-07-12 19:23:57 UTC (rev 131350)
@@ -0,0 +1,55 @@
+Index: kdemultimedia/kmix/backends/mixer_pulse.cpp
+===================================================================
+--- kdemultimedia/kmix/backends/mixer_pulse.cpp	(revision 1241345)
++++ kdemultimedia/kmix/backends/mixer_pulse.cpp	(revision 1241346)
+@@ -754,7 +754,12 @@
+         return;
+     }
+     addDevice((*map)[index]);
+-    emit controlsReconfigured(_mixer->id());
++    // Do not emit directly to ensure all connected slots are executed
++    // in their own event loop.
++    QMetaObject::invokeMethod(this,
++                              "controlsReconfigured",
++                              Qt::QueuedConnection,
++                              Q_ARG(QString, _mixer->id()));
+ }
+ 
+ void Mixer_PULSE::removeWidget(int index)
+@@ -778,7 +783,12 @@
+         {
+             delete *iter;
+             m_mixDevices.erase(iter);
+-            emit controlsReconfigured(_mixer->id());
++            // Do not emit directly to ensure all connected slots are executed
++            // in their own event loop.
++            QMetaObject::invokeMethod(this,
++                                      "controlsReconfigured",
++                                      Qt::QueuedConnection,
++                                      Q_ARG(QString, _mixer->id()));
+             return;
+         }
+     }
+@@ -799,7 +809,12 @@
+         delete *iter;
+         m_mixDevices.erase(iter);
+     }
+-    emit controlsReconfigured(_mixer->id());
++    // Do not emit directly to ensure all connected slots are executed
++    // in their own event loop.
++    QMetaObject::invokeMethod(this,
++                              "controlsReconfigured",
++                              Qt::QueuedConnection,
++                              Q_ARG(QString, _mixer->id()));
+ }
+ 
+ void Mixer_PULSE::addDevice(devinfo& dev)
+@@ -990,7 +1005,7 @@
+         kDebug(67100) <<  "Using PulseAudio for mixer: " << m_mixerName;
+         m_isOpen = true;
+     }
+- 
++
+     return 0;
+ }
+ 



More information about the arch-commits mailing list