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