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
d862ff12
Commit
d862ff12
authored
Sep 07, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): deal with sip address like: sip:toto
parent
12c06a03
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
11 deletions
+11
-11
Cli.cpp
src/app/cli/Cli.cpp
+1
-1
CallsListModel.cpp
src/components/calls/CallsListModel.cpp
+2
-2
ConferenceAddModel.cpp
src/components/conference/ConferenceAddModel.cpp
+1
-1
VcardModel.cpp
src/components/contact/VcardModel.cpp
+1
-1
SipAddressesModel.cpp
src/components/sip-addresses/SipAddressesModel.cpp
+2
-2
SipAddressesModel.hpp
src/components/sip-addresses/SipAddressesModel.hpp
+1
-1
linphone
submodules/linphone
+1
-1
SipAddressesView.qml
ui/modules/Linphone/View/SipAddressesView.qml
+1
-1
linphone-utils.js
ui/scripts/LinphoneUtils/linphone-utils.js
+1
-1
No files found.
src/app/cli/Cli.cpp
View file @
d862ff12
...
...
@@ -348,7 +348,7 @@ void Cli::executeCommand (const QString &command, CommandFormat *format) {
qInfo
()
<<
QStringLiteral
(
"Execute uri command: `%1`."
).
arg
(
command
);
string
scheme
=
address
->
getScheme
();
if
(
address
->
getUsername
().
empty
()
||
(
scheme
!=
"sip"
&&
scheme
!=
"sip-linphone"
)
)
{
if
(
scheme
!=
"sip"
&&
scheme
!=
"sip-linphone"
)
{
qWarning
()
<<
QStringLiteral
(
"Not a valid uri: `%1`."
).
arg
(
command
);
return
;
}
...
...
src/components/calls/CallsListModel.cpp
View file @
d862ff12
...
...
@@ -95,7 +95,7 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QHash<QSt
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
));
if
(
!
address
||
address
->
getUsername
().
empty
()
)
if
(
!
address
)
return
;
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
nullptr
);
...
...
@@ -120,7 +120,7 @@ void CallsListModel::launchVideoCall (const QString &sipAddress) const {
}
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
));
if
(
!
address
||
address
->
getUsername
().
empty
()
)
if
(
!
address
)
return
;
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
nullptr
);
...
...
src/components/conference/ConferenceAddModel.cpp
View file @
d862ff12
...
...
@@ -93,7 +93,7 @@ bool ConferenceHelperModel::ConferenceAddModel::addToConference (const QString &
shared_ptr
<
linphone
::
Address
>
address
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
if
(
!
address
||
address
->
getUsername
().
empty
()
)
if
(
!
address
)
return
false
;
int
row
=
rowCount
();
...
...
src/components/contact/VcardModel.cpp
View file @
d862ff12
...
...
@@ -139,7 +139,7 @@ bool VcardModel::setAvatar (const QString &path) {
QFile
file
;
// 1. Try to copy photo in avatars folder if it's a right path file and
// not a application path like `image:`.
// not a
n
application path like `image:`.
if
(
!
path
.
isEmpty
())
{
if
(
path
.
startsWith
(
"image:"
))
fileId
=
::
getFileIdFromAppPath
(
path
);
...
...
src/components/sip-addresses/SipAddressesModel.cpp
View file @
d862ff12
...
...
@@ -164,12 +164,12 @@ QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress,
// -----------------------------------------------------------------------------
QString
SipAddressesModel
::
interpretSipAddress
(
const
QString
&
sipAddress
)
{
QString
SipAddressesModel
::
interpretSipAddress
(
const
QString
&
sipAddress
,
bool
checkUsername
)
{
shared_ptr
<
linphone
::
Address
>
lAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
if
(
lAddress
&&
!
lAddress
->
getUsername
().
empty
(
))
if
(
lAddress
&&
(
!
checkUsername
||
!
lAddress
->
getUsername
().
empty
()
))
return
::
Utils
::
coreStringToAppString
(
lAddress
->
asStringUriOnly
());
return
QString
(
""
);
}
...
...
src/components/sip-addresses/SipAddressesModel.hpp
View file @
d862ff12
...
...
@@ -56,7 +56,7 @@ public:
Q_INVOKABLE
QString
getTransportFromSipAddress
(
const
QString
&
sipAddress
)
const
;
Q_INVOKABLE
QString
addTransportToSipAddress
(
const
QString
&
sipAddress
,
const
QString
&
transport
)
const
;
Q_INVOKABLE
static
QString
interpretSipAddress
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
QString
interpretSipAddress
(
const
QString
&
sipAddress
,
bool
checkUsername
=
true
);
Q_INVOKABLE
static
QString
interpretSipAddress
(
const
QUrl
&
sipAddress
);
Q_INVOKABLE
static
bool
addressIsValid
(
const
QString
&
address
);
...
...
linphone
@
daa9ed3f
Subproject commit
3d283b295309fa8e8877f6ad0fc062c341db7e9
e
Subproject commit
daa9ed3fa2d52827228d0ed9ff49c79f7f61a78
e
ui/modules/Linphone/View/SipAddressesView.qml
View file @
d862ff12
...
...
@@ -26,7 +26,7 @@ ScrollableListView {
property
var
headerButtonAction
readonly
property
string
interpretableSipAddress
:
SipAddressesModel
.
interpretSipAddress
(
genSipAddress
genSipAddress
,
false
)
// ---------------------------------------------------------------------------
...
...
ui/scripts/LinphoneUtils/linphone-utils.js
View file @
d862ff12
...
...
@@ -51,7 +51,7 @@ function _getUsername (str) {
var
end
=
str
.
indexOf
(
'
@
'
,
start
+
1
)
if
(
end
===
-
1
)
{
return
return
str
.
substring
(
start
)
}
return
str
.
substring
(
start
,
end
)
...
...
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