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
091227e8
Commit
091227e8
authored
Aug 09, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(SipAddressesView): do not display wrong default sip address
parent
dcfecffe
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
17 deletions
+19
-17
Cli.cpp
src/app/cli/Cli.cpp
+1
-1
CallsListModel.cpp
src/components/calls/CallsListModel.cpp
+5
-5
CallsListModel.hpp
src/components/calls/CallsListModel.hpp
+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
+5
-3
SipAddressesModel.hpp
src/components/sip-addresses/SipAddressesModel.hpp
+2
-2
UrlHandlers.cpp
src/components/url-handlers/UrlHandlers.cpp
+1
-1
SipAddressesView.qml
ui/modules/Linphone/View/SipAddressesView.qml
+1
-1
No files found.
src/app/cli/Cli.cpp
View file @
091227e8
...
...
@@ -52,7 +52,7 @@ static void cliInitiateConference (QHash<QString, QString> &args) {
// Check identity.
{
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
Url
(
::
Utils
::
appStringToCoreString
(
args
[
"sip-address"
]));
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
SipAddress
(
::
Utils
::
appStringToCoreString
(
args
[
"sip-address"
]));
address
->
clean
();
const
string
sipAddress
=
address
->
asString
();
...
...
src/components/calls/CallsListModel.cpp
View file @
091227e8
...
...
@@ -91,10 +91,10 @@ void CallsListModel::askForTransfer (CallModel *callModel) {
// -----------------------------------------------------------------------------
void
CallsListModel
::
launchAudioCall
(
const
QString
&
sip
Uri
,
const
QHash
<
QString
,
QString
>
&
headers
)
const
{
void
CallsListModel
::
launchAudioCall
(
const
QString
&
sip
Address
,
const
QHash
<
QString
,
QString
>
&
headers
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
Url
(
::
Utils
::
appStringToCoreString
(
sipUri
));
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
SipAddress
(
::
Utils
::
appStringToCoreString
(
sipAddress
));
if
(
!
address
)
return
;
...
...
@@ -111,15 +111,15 @@ void CallsListModel::launchAudioCall (const QString &sipUri, const QHash<QString
core
->
inviteAddressWithParams
(
address
,
params
);
}
void
CallsListModel
::
launchVideoCall
(
const
QString
&
sip
Uri
)
const
{
void
CallsListModel
::
launchVideoCall
(
const
QString
&
sip
Address
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
if
(
!
core
->
videoSupported
())
{
qWarning
()
<<
QStringLiteral
(
"Unable to launch video call. (Video not supported.) Launching audio call..."
);
launchAudioCall
(
sip
Uri
);
launchAudioCall
(
sip
Address
);
return
;
}
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
Url
(
::
Utils
::
appStringToCoreString
(
sipUri
));
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpret
SipAddress
(
::
Utils
::
appStringToCoreString
(
sipAddress
));
if
(
!
address
)
return
;
...
...
src/components/calls/CallsListModel.hpp
View file @
091227e8
...
...
@@ -45,8 +45,8 @@ public:
void
askForTransfer
(
CallModel
*
callModel
);
Q_INVOKABLE
void
launchAudioCall
(
const
QString
&
sip
Uri
,
const
QHash
<
QString
,
QString
>
&
headers
=
{})
const
;
Q_INVOKABLE
void
launchVideoCall
(
const
QString
&
sip
Uri
)
const
;
Q_INVOKABLE
void
launchAudioCall
(
const
QString
&
sip
Address
,
const
QHash
<
QString
,
QString
>
&
headers
=
{})
const
;
Q_INVOKABLE
void
launchVideoCall
(
const
QString
&
sip
Address
)
const
;
Q_INVOKABLE
int
getRunningCallsNumber
()
const
;
...
...
src/components/conference/ConferenceAddModel.cpp
View file @
091227e8
...
...
@@ -95,7 +95,7 @@ bool ConferenceHelperModel::ConferenceAddModel::addToConference (const QString &
beginInsertRows
(
QModelIndex
(),
row
,
row
);
qInfo
()
<<
QStringLiteral
(
"Add sip address to conference: `%1`."
).
arg
(
sipAddress
);
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpret
Url
(
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpret
SipAddress
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
addToConferencePrivate
(
linphoneAddress
);
...
...
src/components/contact/VcardModel.cpp
View file @
091227e8
...
...
@@ -96,7 +96,7 @@ 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
()
->
interpret
Url
(
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpret
SipAddress
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
...
...
src/components/sip-addresses/SipAddressesModel.cpp
View file @
091227e8
...
...
@@ -163,15 +163,17 @@ QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress,
// -----------------------------------------------------------------------------
QString
SipAddressesModel
::
interpret
Url
(
const
QString
&
sipAddress
)
{
QString
SipAddressesModel
::
interpret
SipAddress
(
const
QString
&
sipAddress
)
{
shared_ptr
<
linphone
::
Address
>
lAddress
=
CoreManager
::
getInstance
()
->
getCore
()
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipAddress
)
);
return
lAddress
?
::
Utils
::
coreStringToAppString
(
lAddress
->
asStringUriOnly
())
:
QString
(
""
);
if
(
lAddress
&&
!
lAddress
->
getUsername
().
empty
())
return
::
Utils
::
coreStringToAppString
(
lAddress
->
asStringUriOnly
());
return
QString
(
""
);
}
QString
SipAddressesModel
::
interpret
Url
(
const
QUrl
&
sipAddress
)
{
QString
SipAddressesModel
::
interpret
SipAddress
(
const
QUrl
&
sipAddress
)
{
return
sipAddress
.
toString
();
}
...
...
src/components/sip-addresses/SipAddressesModel.hpp
View file @
091227e8
...
...
@@ -56,8 +56,8 @@ public:
Q_INVOKABLE
QString
getTransportFromSipAddress
(
const
QString
&
sipAddress
)
const
;
Q_INVOKABLE
QString
addTransportToSipAddress
(
const
QString
&
sipAddress
,
const
QString
&
transport
)
const
;
Q_INVOKABLE
static
QString
interpret
Url
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
QString
interpret
Url
(
const
QUrl
&
sipAddress
);
Q_INVOKABLE
static
QString
interpret
SipAddress
(
const
QString
&
sipAddress
);
Q_INVOKABLE
static
QString
interpret
SipAddress
(
const
QUrl
&
sipAddress
);
Q_INVOKABLE
static
bool
addressIsValid
(
const
QString
&
address
);
Q_INVOKABLE
static
bool
sipAddressIsValid
(
const
QString
&
sipAddress
);
...
...
src/components/url-handlers/UrlHandlers.cpp
View file @
091227e8
...
...
@@ -33,5 +33,5 @@ UrlHandlers::UrlHandlers (QObject *parent) : QObject(parent) {
}
void
UrlHandlers
::
handleSip
(
const
QUrl
&
url
)
{
emit
sip
(
SipAddressesModel
::
interpret
Url
(
url
));
emit
sip
(
SipAddressesModel
::
interpret
SipAddress
(
url
));
}
ui/modules/Linphone/View/SipAddressesView.qml
View file @
091227e8
...
...
@@ -25,7 +25,7 @@ ScrollableListView {
property
string
headerButtonIcon
property
var
headerButtonAction
readonly
property
string
interpretableSipAddress
:
SipAddressesModel
.
interpret
Url
(
readonly
property
string
interpretableSipAddress
:
SipAddressesModel
.
interpret
SipAddress
(
genSipAddress
)
...
...
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