Contents of /trunk/kdemultimedia4/patches/kdemultimedia4-4.6.5-memleak.patch
Parent Directory | Revision Log
Revision 1436 -
(show annotations)
(download)
Fri Jul 22 13:28:41 2011 UTC (13 years, 2 months ago) by niro
File size: 1931 byte(s)
Fri Jul 22 13:28:41 2011 UTC (13 years, 2 months ago) by niro
File size: 1931 byte(s)
fixed a memleak
1 | Index: kdemultimedia/kmix/backends/mixer_pulse.cpp |
2 | =================================================================== |
3 | --- kdemultimedia/kmix/backends/mixer_pulse.cpp (revision 1241345) |
4 | +++ kdemultimedia/kmix/backends/mixer_pulse.cpp (revision 1241346) |
5 | @@ -754,7 +754,12 @@ |
6 | return; |
7 | } |
8 | addDevice((*map)[index]); |
9 | - emit controlsReconfigured(_mixer->id()); |
10 | + // Do not emit directly to ensure all connected slots are executed |
11 | + // in their own event loop. |
12 | + QMetaObject::invokeMethod(this, |
13 | + "controlsReconfigured", |
14 | + Qt::QueuedConnection, |
15 | + Q_ARG(QString, _mixer->id())); |
16 | } |
17 | |
18 | void Mixer_PULSE::removeWidget(int index) |
19 | @@ -778,7 +783,12 @@ |
20 | { |
21 | delete *iter; |
22 | m_mixDevices.erase(iter); |
23 | - emit controlsReconfigured(_mixer->id()); |
24 | + // Do not emit directly to ensure all connected slots are executed |
25 | + // in their own event loop. |
26 | + QMetaObject::invokeMethod(this, |
27 | + "controlsReconfigured", |
28 | + Qt::QueuedConnection, |
29 | + Q_ARG(QString, _mixer->id())); |
30 | return; |
31 | } |
32 | } |
33 | @@ -799,7 +809,12 @@ |
34 | delete *iter; |
35 | m_mixDevices.erase(iter); |
36 | } |
37 | - emit controlsReconfigured(_mixer->id()); |
38 | + // Do not emit directly to ensure all connected slots are executed |
39 | + // in their own event loop. |
40 | + QMetaObject::invokeMethod(this, |
41 | + "controlsReconfigured", |
42 | + Qt::QueuedConnection, |
43 | + Q_ARG(QString, _mixer->id())); |
44 | } |
45 | |
46 | void Mixer_PULSE::addDevice(devinfo& dev) |
47 | @@ -990,7 +1005,7 @@ |
48 | kDebug(67100) << "Using PulseAudio for mixer: " << m_mixerName; |
49 | m_isOpen = true; |
50 | } |
51 | - |
52 | + |
53 | return 0; |
54 | } |
55 |