Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
4af20ca4
Commit
4af20ca4
authored
Mar 09, 2015
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminated memory cycle
parent
cbbe3b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
sessions.py
blink/sessions.py
+5
-3
No files found.
blink/sessions.py
View file @
4af20ca4
...
...
@@ -15,7 +15,6 @@ import uuid
from
abc
import
ABCMeta
,
abstractproperty
from
collections
import
defaultdict
,
deque
from
datetime
import
datetime
,
timedelta
from
functools
import
partial
from
itertools
import
chain
,
count
from
operator
import
attrgetter
from
threading
import
Event
...
...
@@ -1270,6 +1269,7 @@ class AudioSessionWidget(base_class, ui_class):
self
.
hold_button
.
type
=
MiddleSegment
self
.
record_button
.
type
=
MiddleSegment
self
.
hangup_button
.
type
=
RightSegment
self
.
session
=
session
self
.
selected
=
False
self
.
drop_indicator
=
False
self
.
position_in_conference
=
None
...
...
@@ -1792,7 +1792,7 @@ class AudioSessionDelegate(QStyledItemDelegate):
def
createEditor
(
self
,
parent
,
options
,
index
):
session
=
index
.
data
(
Qt
.
UserRole
)
session
.
widget
=
AudioSessionWidget
(
session
,
parent
)
session
.
widget
.
hold_button
.
clicked
.
connect
(
partial
(
self
.
_SH_HoldButtonClicked
,
session
))
# this partial still creates a memory cycle -Dan
session
.
widget
.
hold_button
.
clicked
.
connect
(
self
.
_SH_HoldButtonClicked
)
return
session
.
widget
def
updateEditorGeometry
(
self
,
editor
,
option
,
index
):
...
...
@@ -1808,7 +1808,9 @@ class AudioSessionDelegate(QStyledItemDelegate):
def
sizeHint
(
self
,
option
,
index
):
return
self
.
size_hint
def
_SH_HoldButtonClicked
(
self
,
session
,
checked
):
def
_SH_HoldButtonClicked
(
self
,
checked
):
session_widget
=
self
.
sender
()
.
parent
()
session
=
session_widget
.
session
if
session
.
client_conference
is
None
and
not
session
.
active
and
not
checked
:
session_list
=
self
.
parent
()
model
=
session_list
.
model
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment