Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
6fecef23
Commit
6fecef23
authored
Oct 10, 2013
by
Emmanuel Lepage Vallee
Browse files
Options
Downloads
Patches
Plain Diff
[ #30839 ] Cleanup, documentation
parent
269faa56
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/call.cpp
+1
-1
1 addition, 1 deletion
src/call.cpp
src/call.h
+1
-1
1 addition, 1 deletion
src/call.h
src/callmodel.cpp
+10
-5
10 additions, 5 deletions
src/callmodel.cpp
src/numbercompletionmodel.cpp
+7
-4
7 additions, 4 deletions
src/numbercompletionmodel.cpp
with
19 additions
and
11 deletions
src/call.cpp
+
1
−
1
View file @
6fecef23
...
@@ -792,7 +792,7 @@ Call::State Call::stateChanged(const QString& newStateName)
...
@@ -792,7 +792,7 @@ Call::State Call::stateChanged(const QString& newStateName)
}
//stateChanged
}
//stateChanged
///An account have been performed
///An account have been performed
Call
::
State
Call
::
actionPerformed
(
Call
::
Action
action
)
Call
::
State
Call
::
performAction
(
Call
::
Action
action
)
{
{
const
Call
::
State
previousState
=
m_CurrentState
;
const
Call
::
State
previousState
=
m_CurrentState
;
//update the state
//update the state
...
...
This diff is collapsed.
Click to expand it.
src/call.h
+
1
−
1
View file @
6fecef23
...
@@ -264,7 +264,7 @@ public:
...
@@ -264,7 +264,7 @@ public:
//Automated function
//Automated function
Call
::
State
stateChanged
(
const
QString
&
newState
);
Call
::
State
stateChanged
(
const
QString
&
newState
);
Call
::
State
actionPerformed
(
Call
::
Action
action
);
Call
::
State
performAction
(
Call
::
Action
action
);
//Setters
//Setters
void
setConference
(
bool
value
);
void
setConference
(
bool
value
);
...
...
This diff is collapsed.
Click to expand it.
src/callmodel.cpp
+
10
−
5
View file @
6fecef23
...
@@ -290,7 +290,7 @@ Call* CallModel::addIncomingCall(const QString& callId)
...
@@ -290,7 +290,7 @@ Call* CallModel::addIncomingCall(const QString& callId)
//Call without account is not possible
//Call without account is not possible
if
(
dynamic_cast
<
Account
*>
(
call
->
account
()))
{
if
(
dynamic_cast
<
Account
*>
(
call
->
account
()))
{
if
(
call
->
account
()
->
isAutoAnswer
())
{
if
(
call
->
account
()
->
isAutoAnswer
())
{
call
->
actionPerformed
(
Call
::
Action
::
ACCEPT
);
call
->
performAction
(
Call
::
Action
::
ACCEPT
);
}
}
}
}
else
{
else
{
...
@@ -378,7 +378,7 @@ void CallModel::transfer(Call* toTransfer, QString target)
...
@@ -378,7 +378,7 @@ void CallModel::transfer(Call* toTransfer, QString target)
qDebug
()
<<
"Transferring call "
<<
toTransfer
->
id
()
<<
"to"
<<
target
;
qDebug
()
<<
"Transferring call "
<<
toTransfer
->
id
()
<<
"to"
<<
target
;
toTransfer
->
setTransferNumber
(
target
);
toTransfer
->
setTransferNumber
(
target
);
toTransfer
->
changeCurrentState
(
Call
::
State
::
TRANSFERRED
);
toTransfer
->
changeCurrentState
(
Call
::
State
::
TRANSFERRED
);
toTransfer
->
actionPerformed
(
Call
::
Action
::
TRANSFER
);
toTransfer
->
performAction
(
Call
::
Action
::
TRANSFER
);
toTransfer
->
changeCurrentState
(
Call
::
State
::
OVER
);
toTransfer
->
changeCurrentState
(
Call
::
State
::
OVER
);
}
//transfer
}
//transfer
...
@@ -761,7 +761,7 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
...
@@ -761,7 +761,7 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
qDebug
()
<<
"Phone number"
<<
encodedPhoneNumber
<<
"on call"
<<
target
;
qDebug
()
<<
"Phone number"
<<
encodedPhoneNumber
<<
"on call"
<<
target
;
Call
*
newCall
=
addDialingCall
(
QString
(),
target
->
account
());
Call
*
newCall
=
addDialingCall
(
QString
(),
target
->
account
());
newCall
->
setDialNumber
(
encodedPhoneNumber
);
newCall
->
setDialNumber
(
encodedPhoneNumber
);
newCall
->
actionPerformed
(
Call
::
Action
::
ACCEPT
);
newCall
->
performAction
(
Call
::
Action
::
ACCEPT
);
createConferenceFromCall
(
newCall
,
target
);
createConferenceFromCall
(
newCall
,
target
);
}
}
else
if
(
mimedata
->
hasFormat
(
MIME_CONTACT
))
{
else
if
(
mimedata
->
hasFormat
(
MIME_CONTACT
))
{
...
@@ -773,7 +773,7 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
...
@@ -773,7 +773,7 @@ bool CallModel::dropMimeData(const QMimeData* mimedata, Qt::DropAction action, i
if
(
!
number
->
uri
().
isEmpty
())
{
if
(
!
number
->
uri
().
isEmpty
())
{
Call
*
newCall
=
addDialingCall
();
Call
*
newCall
=
addDialingCall
();
newCall
->
setDialNumber
(
number
);
newCall
->
setDialNumber
(
number
);
newCall
->
actionPerformed
(
Call
::
Action
::
ACCEPT
);
newCall
->
performAction
(
Call
::
Action
::
ACCEPT
);
createConferenceFromCall
(
newCall
,
target
);
createConferenceFromCall
(
newCall
,
target
);
}
}
else
{
else
{
...
@@ -947,6 +947,11 @@ void CallModel::slotStoppedDecoding(const QString& callId, const QString& shmKey
...
@@ -947,6 +947,11 @@ void CallModel::slotStoppedDecoding(const QString& callId, const QString& shmKey
///Update model if the data change
///Update model if the data change
void
CallModel
::
slotCallChanged
(
Call
*
call
)
void
CallModel
::
slotCallChanged
(
Call
*
call
)
{
{
//Transfer is "local" state, it doesn't require the daemon, so it need to be
//handled "manually" instead of relying on the backend signals
if
(
call
->
state
()
==
Call
::
State
::
TRANSFERRED
)
{
emit
callStateChanged
(
call
,
Call
::
State
::
TRANSFERRED
);
}
InternalStruct
*
callInt
=
m_sPrivateCallList_call
[
call
];
InternalStruct
*
callInt
=
m_sPrivateCallList_call
[
call
];
if
(
callInt
)
{
if
(
callInt
)
{
const
int
idxOf
=
m_lInternalModel
.
indexOf
(
callInt
);
const
int
idxOf
=
m_lInternalModel
.
indexOf
(
callInt
);
...
...
This diff is collapsed.
Click to expand it.
src/numbercompletionmodel.cpp
+
7
−
4
View file @
6fecef23
...
@@ -60,10 +60,13 @@ QVariant NumberCompletionModel::data(const QModelIndex& index, int role ) const
...
@@ -60,10 +60,13 @@ QVariant NumberCompletionModel::data(const QModelIndex& index, int role ) const
case
Qt
::
ToolTipRole
:
case
Qt
::
ToolTipRole
:
return
QString
(
"<table><tr><td>%1</td></tr><tr><td>%2</td></tr></table>"
).
arg
(
n
->
primaryName
()).
arg
(
n
->
type
());
return
QString
(
"<table><tr><td>%1</td></tr><tr><td>%2</td></tr></table>"
).
arg
(
n
->
primaryName
()).
arg
(
n
->
type
());
break
;
break
;
case
Qt
::
DecorationRole
:
case
Qt
::
DecorationRole
:
{
if
(
NumberCategoryModel
::
instance
()
->
visitor
())
if
(
NumberCategoryModel
::
instance
()
->
visitor
())
{
return
NumberCategoryModel
::
instance
()
->
nameToIndex
(
n
->
type
()).
data
(
Qt
::
DecorationRole
);
const
QModelIndex
idx2
=
NumberCategoryModel
::
instance
()
->
nameToIndex
(
n
->
type
());
break
;
if
(
idx2
.
isValid
())
return
idx2
.
data
(
Qt
::
DecorationRole
);
}
}
break
;
case
NumberCompletionModel
::
Role
::
ALTERNATE_ACCOUNT
:
case
NumberCompletionModel
::
Role
::
ALTERNATE_ACCOUNT
:
if
(
needAcc
)
if
(
needAcc
)
return
n
->
account
()
->
alias
();
return
n
->
account
()
->
alias
();
...
...
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