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
a0e49580
Commit
a0e49580
authored
May 12, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src/components/call/CallModel): coding style
parent
40a929a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
24 deletions
+27
-24
en.ts
linphone-desktop/assets/languages/en.ts
+4
-4
fr.ts
linphone-desktop/assets/languages/fr.ts
+4
-4
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+10
-9
CallModel.hpp
linphone-desktop/src/components/call/CallModel.hpp
+8
-6
EndedCall.qml
linphone-desktop/ui/views/App/Calls/EndedCall.qml
+1
-1
No files found.
linphone-desktop/assets/languages/en.ts
View file @
a0e49580
...
...
@@ -253,19 +253,19 @@
<
translation
>
Invalid
<
/translation
>
<
/message
>
<
message
>
<
source
>
User
declined
the
call
<
/source
>
<
source
>
callErrorDeclined
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
not
f
ound
<
/source
>
<
source
>
callErrorNotF
ound
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
is
b
usy
<
/source
>
<
source
>
callErrorB
usy
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Incompatible
media
params
<
/source
>
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
a0e49580
...
...
@@ -253,19 +253,19 @@
<
translation
>
Invalide
<
/translation
>
<
/message
>
<
message
>
<
source
>
User
declined
the
call
<
/source
>
<
source
>
callErrorDeclined
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
not
f
ound
<
/source
>
<
source
>
callErrorNotF
ound
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
is
b
usy
<
/source
>
<
source
>
callErrorB
usy
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Incompatible
media
params
<
/source
>
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
...
...
linphone-desktop/src/components/call/CallModel.cpp
View file @
a0e49580
...
...
@@ -40,7 +40,6 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
Q_ASSERT
(
call
!=
nullptr
);
mCall
=
call
;
mCall
->
setData
(
"call-model"
,
*
this
);
mReason
=
""
;
// Deal with auto-answer.
{
...
...
@@ -194,7 +193,7 @@ void CallModel::handleCallStateChanged (const std::shared_ptr<linphone::Call> &c
switch
(
state
)
{
case
linphone
:
:
CallStateError
:
setReason
(
call
->
getReason
());
set
CallErrorFrom
Reason
(
call
->
getReason
());
case
linphone
:
:
CallStateEnd
:
stopAutoAnswerTimer
();
mPausedByRemote
=
false
;
...
...
@@ -290,27 +289,29 @@ CallModel::CallStatus CallModel::getStatus () const {
// -----------------------------------------------------------------------------
void
CallModel
::
setReason
(
linphone
::
Reason
reason
)
{
void
CallModel
::
set
CallErrorFrom
Reason
(
linphone
::
Reason
reason
)
{
switch
(
reason
)
{
case
linphone
:
:
ReasonDeclined
:
m
Reason
=
tr
(
"User declined the call
"
);
m
CallError
=
tr
(
"callErrorDeclined
"
);
break
;
case
linphone
:
:
ReasonNotFound
:
m
Reason
=
tr
(
"User not f
ound"
);
m
CallError
=
tr
(
"callErrorNotF
ound"
);
break
;
case
linphone
:
:
ReasonBusy
:
m
Reason
=
tr
(
"User is b
usy"
);
m
CallError
=
tr
(
"callErrorB
usy"
);
break
;
case
linphone
:
:
ReasonNotAcceptable
:
m
Reason
=
tr
(
"Incompatible media params
"
);
m
CallError
=
tr
(
"callErrorNotAcceptable
"
);
break
;
default:
break
;
}
emit
callErrorChanged
(
mCallError
);
}
QString
CallModel
::
get
Reason
()
const
{
return
m
Reason
;
QString
CallModel
::
get
CallError
()
const
{
return
m
CallError
;
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/components/call/CallModel.hpp
View file @
a0e49580
...
...
@@ -33,7 +33,7 @@ class CallModel : public QObject {
Q_PROPERTY
(
QString
sipAddress
READ
getSipAddress
CONSTANT
);
Q_PROPERTY
(
CallStatus
status
READ
getStatus
NOTIFY
statusChanged
);
Q_PROPERTY
(
QString
reason
READ
getReason
NOTIFY
status
Changed
);
Q_PROPERTY
(
QString
callError
READ
getCallError
NOTIFY
callError
Changed
);
Q_PROPERTY
(
bool
isOutgoing
READ
isOutgoing
CONSTANT
);
...
...
@@ -91,11 +91,12 @@ public:
Q_INVOKABLE
void
sendDtmf
(
const
QString
&
dtmf
);
signals:
void
statusChanged
(
CallStatus
status
);
void
callErrorChanged
(
const
QString
&
callError
);
void
microMutedChanged
(
bool
status
);
void
videoRequested
();
void
recordingChanged
(
bool
status
);
void
statsUpdated
();
void
statusChanged
(
CallStatus
status
);
void
videoRequested
();
private:
void
handleCallStateChanged
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
,
linphone
::
CallState
state
);
...
...
@@ -109,9 +110,8 @@ private:
return
mCall
->
getDir
()
==
linphone
::
CallDirOutgoing
;
}
QString
mReason
;
void
setReason
(
linphone
::
Reason
reason
);
QString
getReason
()
const
;
void
setCallErrorFromReason
(
linphone
::
Reason
reason
);
QString
getCallError
()
const
;
int
getDuration
()
const
;
float
getQuality
()
const
;
...
...
@@ -141,6 +141,8 @@ private:
bool
mPausedByUser
=
false
;
bool
mRecording
=
false
;
QString
mCallError
;
QVariantList
mAudioStats
;
QVariantList
mVideoStats
;
...
...
linphone-desktop/ui/views/App/Calls/EndedCall.qml
View file @
a0e49580
...
...
@@ -84,7 +84,7 @@ Rectangle {
text
:
{
var
call
=
endedCall
.
call
return
call
?
call
.
reason
:
''
return
call
?
call
.
callError
:
''
}
}
}
...
...
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