Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
e1c2c4ce
Commit
e1c2c4ce
authored
13 years ago
by
Emmanuel Lepage
Browse files
Options
Downloads
Patches
Plain Diff
[ #7929 ] Add some client side work around until it is fixed
parent
33b1bf4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kde/src/CallView.cpp
+15
-4
15 additions, 4 deletions
kde/src/CallView.cpp
with
15 additions
and
4 deletions
kde/src/CallView.cpp
+
15
−
4
View file @
e1c2c4ce
...
...
@@ -466,9 +466,12 @@ Call* CallView::getCurrentItem()
///Remove a TreeView item and delete it
bool
CallView
::
removeItem
(
Call
*
item
)
{
if
(
indexOfTopLevelItem
(
SFLPhone
::
model
()
->
getIndex
(
item
))
!=
-
1
)
{
//TODO To remove once safe
removeItemWidget
(
SFLPhone
::
model
()
->
getIndex
(
item
),
0
);
return
true
;
if
(
indexOfTopLevelItem
(
SFLPhone
::
model
()
->
getIndex
(
item
))
!=
-
1
)
{
QTreeWidgetItem
*
parent
=
itemAt
(
indexOfTopLevelItem
(
SFLPhone
::
model
()
->
getIndex
(
item
)),
0
);
removeItemWidget
(
SFLPhone
::
model
()
->
getIndex
(
item
),
0
);
if
(
parent
->
childCount
()
==
0
)
//TODO this have to be done in the daemon, not here, but oops still happen too often to ignore
removeItemWidget
(
parent
,
0
);
return
true
;
}
else
return
false
;
...
...
@@ -550,8 +553,16 @@ void CallView::destroyCall(Call* toDestroy)
kDebug
()
<<
"Call not found"
;
else
if
(
indexOfTopLevelItem
(
SFLPhone
::
model
()
->
getIndex
(
toDestroy
))
!=
-
1
)
takeTopLevelItem
(
indexOfTopLevelItem
(
SFLPhone
::
model
()
->
getIndex
(
toDestroy
)));
else
if
(
SFLPhone
::
model
()
->
getIndex
(
toDestroy
)
->
parent
())
//May crash here
else
if
(
SFLPhone
::
model
()
->
getIndex
(
toDestroy
)
->
parent
())
{
QTreeWidgetItem
*
parent
=
SFLPhone
::
model
()
->
getIndex
(
toDestroy
)
->
parent
();
SFLPhone
::
model
()
->
getIndex
(
toDestroy
)
->
parent
()
->
removeChild
(
SFLPhone
::
model
()
->
getIndex
(
toDestroy
));
if
(
parent
->
childCount
()
==
0
)
/*This should never happen, but it does*/
takeTopLevelItem
(
indexOfTopLevelItem
(
parent
));
else
if
(
parent
->
childCount
()
==
1
)
{
addTopLevelItem
(
extractItem
(
parent
->
child
(
0
)));
takeTopLevelItem
(
indexOfTopLevelItem
(
parent
));
}
//TODO make sure it just never happen and remove this logic code
}
else
kDebug
()
<<
"Call not found"
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment