Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
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
Administrator
linphone-desktop
Commits
32e737fc
Commit
32e737fc
authored
May 15, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src/components/call/CallModel): use auto-answer only if one call exists
parent
a0e92aff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+14
-5
CallModel.hpp
linphone-desktop/src/components/call/CallModel.hpp
+3
-1
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
32e737fc
...
...
@@ -51,7 +51,7 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
timer
->
setSingleShot
(
true
);
timer
->
setObjectName
(
AUTO_ANSWER_OBJECT_NAME
);
QObject
::
connect
(
timer
,
&
QTimer
::
timeout
,
this
,
&
CallModel
::
accept
);
QObject
::
connect
(
timer
,
&
QTimer
::
timeout
,
this
,
&
CallModel
::
accept
WithAutoAnswerDelay
);
timer
->
start
();
}
}
...
...
@@ -298,6 +298,19 @@ CallModel::CallStatus CallModel::getStatus () const {
// -----------------------------------------------------------------------------
void
CallModel
::
acceptWithAutoAnswerDelay
()
{
// Use auto-answer if activated and it's the only call.
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
if
(
coreManager
->
getSettingsModel
()
->
getAutoAnswerStatus
()
&&
coreManager
->
getCore
()
->
getCallsNb
()
==
1
)
accept
();
}
// -----------------------------------------------------------------------------
QString
CallModel
::
getCallError
()
const
{
return
mCallError
;
}
void
CallModel
::
setCallErrorFromReason
(
linphone
::
Reason
reason
)
{
switch
(
reason
)
{
case
linphone
:
:
ReasonDeclined
:
...
...
@@ -322,10 +335,6 @@ void CallModel::setCallErrorFromReason (linphone::Reason reason) {
emit
callErrorChanged
(
mCallError
);
}
QString
CallModel
::
getCallError
()
const
{
return
mCallError
;
}
// -----------------------------------------------------------------------------
int
CallModel
::
getDuration
()
const
{
...
...
linphone-desktop/src/components/call/CallModel.hpp
View file @
32e737fc
...
...
@@ -110,8 +110,10 @@ private:
return
mCall
->
getDir
()
==
linphone
::
CallDirOutgoing
;
}
void
setCallErrorFromReason
(
linphone
::
Reason
reason
);
void
acceptWithAutoAnswerDelay
();
QString
getCallError
()
const
;
void
setCallErrorFromReason
(
linphone
::
Reason
reason
);
int
getDuration
()
const
;
float
getQuality
()
const
;
...
...
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