Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
d2a1f356
Commit
d2a1f356
authored
May 29, 2012
by
Emmanuel Lepage
Browse files
[ #11435 ] Fix trasfer, it apparently never worked, there was a bug in the state machine path
parent
7870e3eb
Changes
5
Hide whitespace changes
Inline
Side-by-side
kde/src/CallView.cpp
View file @
d2a1f356
...
...
@@ -89,7 +89,6 @@ CallView::CallView(QWidget* parent) : QTreeWidget(parent),m_pActiveOverlay(0),m_
addConference
(
active
);
}
qDebug
()
<<
"
\n\n\n
HERE"
;
//User Interface even
// SENDER SIGNAL RECEIVER SLOT /
/**/
connect
(
this
,
SIGNAL
(
itemDoubleClicked
(
QTreeWidgetItem
*
,
int
)
)
,
this
,
SLOT
(
itemDoubleClicked
(
QTreeWidgetItem
*
,
int
))
);
...
...
@@ -180,7 +179,7 @@ bool CallView::callToCall(QTreeWidgetItem *parent, int index, const QMimeData *d
else
if
((
parent
->
parent
())
||
(
parent
->
childCount
()))
{
kDebug
()
<<
"Call dropped on a conference"
;
if
((
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
->
childCount
())
&&
(
!
parent
->
childCount
()))
{
if
(
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
->
childCount
()
&&
(
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
->
childCount
())
&&
(
!
parent
->
childCount
()))
{
kDebug
()
<<
"Conference dropped on a call (doing nothing)"
;
return
true
;
}
...
...
@@ -215,7 +214,7 @@ bool CallView::callToCall(QTreeWidgetItem *parent, int index, const QMimeData *d
SFLPhone
::
model
()
->
addParticipant
(
SFLPhone
::
model
()
->
getCall
(
call1
),
SFLPhone
::
model
()
->
getCall
(
call2
));
return
true
;
}
else
if
((
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
->
childCount
())
&&
(
!
parent
->
childCount
()))
{
else
if
(
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
&&
(
SFLPhone
::
model
()
->
getIndex
(
encodedCallId
)
->
childCount
())
&&
(
!
parent
->
childCount
()))
{
kDebug
()
<<
"Call dropped on it's own conference (doing nothing)"
;
return
true
;
}
...
...
@@ -383,6 +382,7 @@ void CallView::transfer()
m_pCallPendingTransfer
=
0
;
m_pTransferLE
->
clear
();
m_pTransferOverlay
->
setVisible
(
false
);
}
...
...
@@ -414,14 +414,13 @@ bool CallView::haveOverlay()
///Remove the active overlay
void
CallView
::
hideOverlay
()
{
if
(
m_pActiveOverlay
)
if
(
m_pActiveOverlay
){
disconnect
(
m_pCallPendingTransfer
,
SIGNAL
(
changed
()),
this
,
SLOT
(
hideOverlay
()));
m_pActiveOverlay
->
setVisible
(
false
);
m_pActiveOverlay
=
0
;
if
(
m_pCallPendingTransfer
&&
m_pCallPendingTransfer
->
getState
()
==
CALL_STATE_TRANSFER
)
{
m_pCallPendingTransfer
->
actionPerformed
(
CALL_ACTION_TRANSFER
);
}
m_pActiveOverlay
=
0
;
m_pCallPendingTransfer
=
0
;
}
//hideOverlay
...
...
@@ -489,6 +488,8 @@ QTreeWidgetItem* CallView::extractItem(const QString& callId)
///Extract an item from the TreeView and return it, the item is -not- deleted
QTreeWidgetItem
*
CallView
::
extractItem
(
QTreeWidgetItem
*
item
)
{
if
(
!
item
)
return
nullptr
;
QTreeWidgetItem
*
parentItem
=
item
->
parent
();
if
(
parentItem
)
{
...
...
@@ -514,7 +515,7 @@ CallTreeItem* CallView::insertItem(QTreeWidgetItem* item, Call* parent)
///Insert a TreeView item in the TreeView as child of parent or as a top level item, also restore the item Widget
CallTreeItem
*
CallView
::
insertItem
(
QTreeWidgetItem
*
item
,
QTreeWidgetItem
*
parent
)
{
if
(
!
dynamic_cast
<
QTreeWidgetItem
*>
(
item
)
&&
!
dynamic_cast
<
QTreeWidgetItem
*>
(
parent
))
if
(
!
dynamic_cast
<
QTreeWidgetItem
*>
(
item
)
&&
SFLPhone
::
model
()
->
getCall
(
item
)
&&
!
dynamic_cast
<
QTreeWidgetItem
*>
(
parent
))
return
nullptr
;
if
(
!
item
)
{
...
...
@@ -620,8 +621,8 @@ void CallView::itemClicked(QTreeWidgetItem* item, int column) {
///Add a new conference, get the call list and update the interface as needed
Call
*
CallView
::
addConference
(
Call
*
conf
)
{
kDebug
()
<<
"
\n\n\n
Conference created"
;
Call
*
newConf
=
conf
;
//SFLPhone::model()->addConference(confID);//TODO ELV?
kDebug
()
<<
"Conference created"
;
Call
*
newConf
=
conf
;
QTreeWidgetItem
*
confItem
=
new
QTreeWidgetItem
();
SFLPhone
::
model
()
->
updateIndex
(
conf
,
confItem
);
...
...
kde/src/lib/Call.cpp
View file @
d2a1f356
...
...
@@ -56,8 +56,8 @@ const function Call::actionPerformedFunctionMap[11][5] =
/*HOLD */
{
&
Call
::
nothing
,
&
Call
::
hangUp
,
&
Call
::
nothing
,
&
Call
::
unhold
,
&
Call
::
setRecord
},
/**/
/*FAILURE */
{
&
Call
::
nothing
,
&
Call
::
hangUp
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
},
/**/
/*BUSY */
{
&
Call
::
nothing
,
&
Call
::
hangUp
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
},
/**/
/*TRANSFERT */
{
&
Call
::
transfer
,
&
Call
::
hangUp
,
&
Call
::
nothing
,
&
Call
::
hold
,
&
Call
::
setRecord
},
/**/
/*TRANSFERT_HOLD */
{
&
Call
::
transfer
,
&
Call
::
hangUp
,
&
Call
::
nothing
,
&
Call
::
unhold
,
&
Call
::
setRecord
},
/**/
/*TRANSFERT */
{
&
Call
::
transfer
,
&
Call
::
hangUp
,
&
Call
::
transfer
,
&
Call
::
hold
,
&
Call
::
setRecord
},
/**/
/*TRANSFERT_HOLD */
{
&
Call
::
transfer
,
&
Call
::
hangUp
,
&
Call
::
transfer
,
&
Call
::
unhold
,
&
Call
::
setRecord
},
/**/
/*OVER */
{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
},
/**/
/*ERROR */
{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
nothing
}
/**/
};
//
...
...
@@ -712,7 +712,7 @@ void Call::call()
void
Call
::
transfer
()
{
CallManagerInterface
&
callManager
=
CallManagerInterfaceSingleton
::
getInstance
();
qDebug
()
<<
"Transferring call to number : "
<<
m_TransferNumber
<<
". callId : "
<<
m_CallId
;
qDebug
()
<<
"
\n\n\n
Transferring call to number : "
<<
m_TransferNumber
<<
". callId : "
<<
m_CallId
<<
"
\n\n\n
"
;
callManager
.
transfer
(
m_CallId
,
m_TransferNumber
);
this
->
m_pStopTime
=
new
QDateTime
(
QDateTime
::
currentDateTime
());
}
...
...
kde/src/lib/CallModel.cpp
View file @
d2a1f356
...
...
@@ -136,7 +136,6 @@ Call* CallModelBase::addCall(Call* call, Call* parent)
Call
*
CallModelBase
::
addConferenceS
(
Call
*
conf
)
{
qDebug
()
<<
"-----Emitting conference"
<<
conf
->
getConfId
();
emit
conferenceCreated
(
conf
);
return
conf
;
}
...
...
kde/src/lib/CallModel.hpp
View file @
d2a1f356
...
...
@@ -322,8 +322,7 @@ CALLMODEL_TEMPLATE void CALLMODEL_T::transfer(Call* toTransfer, QString target)
{
qDebug
()
<<
"Transferring call "
<<
toTransfer
->
getCallId
()
<<
"to"
<<
target
;
toTransfer
->
setTransferNumber
(
target
);
toTransfer
->
changeCurrentState
(
CALL_STATE_TRANSFER
);
toTransfer
->
actionPerformed
(
CALL_ACTION_ACCEPT
);
toTransfer
->
actionPerformed
(
CALL_ACTION_TRANSFER
);
toTransfer
->
changeCurrentState
(
CALL_STATE_OVER
);
}
//transfer
...
...
@@ -345,7 +344,7 @@ CALLMODEL_TEMPLATE Call* CALLMODEL_T::addConference(const QString & confID)
qDebug
()
<<
"This conference ("
+
confID
+
") contain no call"
;
return
0
;
}
if
(
!
m_sPrivateCallList_callId
[
callList
[
0
]])
{
qDebug
()
<<
"Invalid call"
;
return
0
;
...
...
kde/src/widgets/CallTreeItem.cpp
View file @
d2a1f356
...
...
@@ -228,7 +228,7 @@ void CallTreeItem::updated()
else
{
//kDebug() << "Updating item of call of state OVER. Doing nothing.";
}
if
(
state
==
CALL_STATE_TRANSFER
)
{
if
(
state
==
CALL_STATE_TRANSFER
||
state
==
CALL_STATE_TRANSF_HOLD
)
{
kDebug
()
<<
"emmiting tranfer signal"
;
emit
askTransfer
(
m_pItemCall
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment