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
3ddcdd22
Commit
3ddcdd22
authored
Aug 09, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(VcardModel): remove `interpretSipAddress` function, use the `SipAddressesModel` class instead
parent
cc456daf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
17 deletions
+2
-17
VcardModel.cpp
src/components/contact/VcardModel.cpp
+2
-17
No files found.
src/components/contact/VcardModel.cpp
View file @
3ddcdd22
...
...
@@ -93,21 +93,6 @@ static void removeBelcardPhoto (const shared_ptr<belcard::BelCard> &belcard, boo
}
}
static
string
interpretSipAddress
(
const
QString
&
sipAddress
)
{
string
out
;
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
if
(
!
linphoneAddress
)
{
qWarning
()
<<
QStringLiteral
(
"Unable to interpret invalid sip address: `%1`."
).
arg
(
sipAddress
);
return
out
;
}
return
linphoneAddress
->
asStringUriOnly
();
}
// -----------------------------------------------------------------------------
VcardModel
::
VcardModel
(
shared_ptr
<
linphone
::
Vcard
>
vcard
,
bool
isReadOnly
)
{
...
...
@@ -302,7 +287,7 @@ QVariantList VcardModel::getSipAddresses () const {
bool
VcardModel
::
addSipAddress
(
const
QString
&
sipAddress
)
{
CHECK_VCARD_IS_WRITABLE
(
this
);
string
interpretedSipAddress
=
::
interpretSipAddress
(
sipAddress
);
string
interpretedSipAddress
=
::
Utils
::
appStringToCoreString
(
SipAddressesModel
::
interpretSipAddress
(
sipAddress
)
);
if
(
interpretedSipAddress
.
empty
())
return
false
;
...
...
@@ -331,7 +316,7 @@ void VcardModel::removeSipAddress (const QString &sipAddress) {
shared_ptr
<
belcard
::
BelCard
>
belcard
=
mVcard
->
getVcard
();
list
<
shared_ptr
<
belcard
::
BelCardImpp
>
>
addresses
=
belcard
->
getImpp
();
shared_ptr
<
belcard
::
BelCardImpp
>
value
=
::
findBelCardValue
(
addresses
,
::
Utils
::
coreStringToAppString
(
::
interpretSipAddress
(
sipAddress
))
addresses
,
::
Utils
::
appStringToCoreString
(
SipAddressesModel
::
interpretSipAddress
(
sipAddress
))
);
if
(
!
value
)
{
...
...
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