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
1a31ab06
Commit
1a31ab06
authored
Jul 19, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(SettingsSipAccountsEdit): detect correctly sip addresses
parent
ff985c09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
SipAddressesModel.cpp
src/components/sip-addresses/SipAddressesModel.cpp
+9
-2
SipAddressesModel.hpp
src/components/sip-addresses/SipAddressesModel.hpp
+1
-0
SettingsSipAccountsEdit.js
ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js
+1
-1
No files found.
src/components/sip-addresses/SipAddressesModel.cpp
View file @
1a31ab06
...
@@ -175,12 +175,19 @@ QString SipAddressesModel::interpretUrl (const QUrl &sipAddress) {
...
@@ -175,12 +175,19 @@ QString SipAddressesModel::interpretUrl (const QUrl &sipAddress) {
return
sipAddress
.
toString
();
return
sipAddress
.
toString
();
}
}
bool
SipAddressesModel
::
sipAddressIsValid
(
const
QString
&
sipA
ddress
)
{
bool
SipAddressesModel
::
addressIsValid
(
const
QString
&
a
ddress
)
{
return
!!
linphone
::
Factory
::
get
()
->
createAddress
(
return
!!
linphone
::
Factory
::
get
()
->
createAddress
(
::
Utils
::
appStringToCoreString
(
sipA
ddress
)
::
Utils
::
appStringToCoreString
(
a
ddress
)
);
);
}
}
bool
SipAddressesModel
::
sipAddressIsValid
(
const
QString
&
sipAddress
)
{
shared_ptr
<
linphone
::
Address
>
address
=
linphone
::
Factory
::
get
()
->
createAddress
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
return
address
&&
!
address
->
getUsername
().
empty
();
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
bool
SipAddressesModel
::
removeRow
(
int
row
,
const
QModelIndex
&
parent
)
{
bool
SipAddressesModel
::
removeRow
(
int
row
,
const
QModelIndex
&
parent
)
{
...
...
src/components/sip-addresses/SipAddressesModel.hpp
View file @
1a31ab06
...
@@ -59,6 +59,7 @@ public:
...
@@ -59,6 +59,7 @@ public:
Q_INVOKABLE
static
QString
interpretUrl
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
QString
interpretUrl
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
QString
interpretUrl
(
const
QUrl
&
sipAddress
);
Q_INVOKABLE
static
QString
interpretUrl
(
const
QUrl
&
sipAddress
);
Q_INVOKABLE
static
bool
addressIsValid
(
const
QString
&
address
);
Q_INVOKABLE
static
bool
sipAddressIsValid
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
bool
sipAddressIsValid
(
const
QString
&
sipAddress
);
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
ui/views/App/Settings/Dialogs/SettingsSipAccountsEdit.js
View file @
1a31ab06
...
@@ -73,7 +73,7 @@ function validProxyConfig () {
...
@@ -73,7 +73,7 @@ function validProxyConfig () {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
function
handleRouteChanged
(
route
)
{
function
handleRouteChanged
(
route
)
{
dialog
.
_routeOk
=
route
.
length
===
0
||
Linphone
.
SipAddressesModel
.
sipA
ddressIsValid
(
route
)
dialog
.
_routeOk
=
route
.
length
===
0
||
Linphone
.
SipAddressesModel
.
a
ddressIsValid
(
route
)
}
}
function
handleServerAddressChanged
(
address
)
{
function
handleServerAddressChanged
(
address
)
{
...
...
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