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
53a8b2f4
Commit
53a8b2f4
authored
Dec 15, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/MainWindow/ContactEdit): name must be given & interpretUrl is used
parent
b13763e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
linphone
submodules/linphone
+1
-1
VcardModel.cpp
tests/src/components/contact/VcardModel.cpp
+20
-3
ContactEdit.qml
tests/ui/views/App/MainWindow/ContactEdit.qml
+1
-1
No files found.
linphone
@
7650064a
Subproject commit
e816a335cd1693cdbbde27a69143e1570058ed5f
Subproject commit
7650064a1cb5b914b157c788e4ff8fa22d971f78
tests/src/components/contact/VcardModel.cpp
View file @
53a8b2f4
...
...
@@ -159,18 +159,35 @@ bool VcardModel::setAddress (const QVariantMap &address) {
}
QVariantList
VcardModel
::
getSipAddresses
()
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
QVariantList
list
;
for
(
const
auto
&
address
:
m_vcard
->
getBelcard
()
->
getImpp
())
list
.
append
(
::
Utils
::
linphoneStringToQString
(
address
->
getValue
()));
for
(
const
auto
&
address
:
m_vcard
->
getBelcard
()
->
getImpp
())
{
string
value
=
address
->
getValue
();
shared_ptr
<
linphone
::
Address
>
l_address
=
core
->
createAddress
(
value
);
if
(
l_address
)
list
.
append
(
::
Utils
::
linphoneStringToQString
(
l_address
->
asStringUriOnly
()));
}
return
list
;
}
bool
VcardModel
::
addSipAddress
(
const
QString
&
sip_address
)
{
// Check sip address format.
shared_ptr
<
linphone
::
Address
>
l_address
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpretUrl
(
::
Utils
::
qStringToLinphoneString
(
sip_address
)
);
if
(
!
l_address
)
{
qWarning
()
<<
QStringLiteral
(
"Unable to add invalid sip address: `%1`."
).
arg
(
sip_address
);
return
false
;
}
// Add sip address in belcard.
shared_ptr
<
belcard
::
BelCard
>
belcard
=
m_vcard
->
getBelcard
();
shared_ptr
<
belcard
::
BelCardImpp
>
value
=
belcard
::
BelCardGeneric
::
create
<
belcard
::
BelCardImpp
>
();
value
->
setValue
(
::
Utils
::
qStringToLinphoneString
(
sip_address
));
value
->
setValue
(
l_address
->
asStringUriOnly
(
));
qInfo
()
<<
QStringLiteral
(
"Add new sip address: `%1`."
).
arg
(
sip_address
);
...
...
tests/ui/views/App/MainWindow/ContactEdit.qml
View file @
53a8b2f4
...
...
@@ -340,7 +340,7 @@ ColumnLayout {
visible
:
_edition
TextButtonB
{
enabled
:
_vcard
.
sipAddresses
.
length
>
0
enabled
:
usernameInput
.
text
.
length
>
0
&&
_vcard
.
sipAddresses
.
length
>
0
text
:
qsTr
(
'
save
'
)
onClicked
:
_save
()
}
...
...
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