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
dd09e6d3
Commit
dd09e6d3
authored
Mar 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(app): coding style
parent
0310ccb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
ContactModel.cpp
linphone-desktop/src/components/contact/ContactModel.cpp
+7
-2
ContactModel.hpp
linphone-desktop/src/components/contact/ContactModel.hpp
+1
-1
CoreHandlers.cpp
linphone-desktop/src/components/core/CoreHandlers.cpp
+2
-3
No files found.
linphone-desktop/src/components/contact/ContactModel.cpp
View file @
dd09e6d3
...
...
@@ -39,6 +39,8 @@ ContactModel::ContactModel (shared_ptr<linphone::Friend> linphone_friend) {
}
ContactModel
::
ContactModel
(
VcardModel
*
vcard
)
{
Q_ASSERT
(
vcard
!=
nullptr
);
QQmlEngine
*
engine
=
App
::
getInstance
()
->
getEngine
();
if
(
engine
->
objectOwnership
(
vcard
)
==
QQmlEngine
::
CppOwnership
)
throw
invalid_argument
(
"A contact is already linked to this vcard."
);
...
...
@@ -49,8 +51,11 @@ ContactModel::ContactModel (VcardModel *vcard) {
engine
->
setObjectOwnership
(
vcard
,
QQmlEngine
::
CppOwnership
);
}
void
ContactModel
::
presenceReceived
()
{
Presence
::
PresenceStatus
status
=
static_cast
<
Presence
::
PresenceStatus
>
(
m_linphone_friend
->
getConsolidatedPresence
());
void
ContactModel
::
refreshPresence
()
{
Presence
::
PresenceStatus
status
=
static_cast
<
Presence
::
PresenceStatus
>
(
m_linphone_friend
->
getConsolidatedPresence
()
);
emit
presenceStatusChanged
(
status
);
emit
presenceLevelChanged
(
Presence
::
getPresenceLevel
(
status
));
}
...
...
linphone-desktop/src/components/contact/ContactModel.hpp
View file @
dd09e6d3
...
...
@@ -48,7 +48,7 @@ public:
return
m_vcard
;
}
void
presenceReceived
();
void
refreshPresence
();
Q_INVOKABLE
void
startEdit
();
Q_INVOKABLE
void
endEdit
();
...
...
linphone-desktop/src/components/core/CoreHandlers.cpp
View file @
dd09e6d3
...
...
@@ -69,12 +69,11 @@ void CoreHandlers::onMessageReceived (
void
CoreHandlers
::
onNotifyPresenceReceivedForUriOrTel
(
const
shared_ptr
<
linphone
::
Core
>
&
,
const
shared_ptr
<
linphone
::
Friend
>
&
l
f
,
const
shared_ptr
<
linphone
::
Friend
>
&
l
inphone_friend
,
const
string
&
,
const
shared_ptr
<
linphone
::
PresenceModel
>
&
)
{
ContactModel
*
contact_model
=
&
lf
->
getData
<
ContactModel
>
(
"contact-model"
);
contact_model
->
presenceReceived
();
linphone_friend
->
getData
<
ContactModel
>
(
"contact-model"
).
refreshPresence
();
}
void
CoreHandlers
::
onRegistrationStateChanged
(
...
...
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