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
0eaa2521
Commit
0eaa2521
authored
May 30, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): replace `linphoneStringToQString` to `coreStringToAppString`
parent
84110f16
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
95 additions
and
95 deletions
+95
-95
Utils.hpp
linphone-desktop/src/Utils.hpp
+1
-1
App.cpp
linphone-desktop/src/app/App.cpp
+1
-1
Paths.cpp
linphone-desktop/src/app/paths/Paths.cpp
+1
-1
AvatarProvider.cpp
linphone-desktop/src/app/providers/AvatarProvider.cpp
+1
-1
ThumbnailProvider.cpp
linphone-desktop/src/app/providers/ThumbnailProvider.cpp
+1
-1
AssistantModel.cpp
linphone-desktop/src/components/assistant/AssistantModel.cpp
+9
-9
AuthenticationNotifier.cpp
.../src/components/authentication/AuthenticationNotifier.cpp
+4
-4
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+4
-4
ChatModel.cpp
linphone-desktop/src/components/chat/ChatModel.cpp
+7
-7
AbstractCodecsModel.cpp
...one-desktop/src/components/codecs/AbstractCodecsModel.cpp
+5
-5
ConferenceAddModel.cpp
...-desktop/src/components/conference/ConferenceAddModel.cpp
+3
-3
VcardModel.cpp
linphone-desktop/src/components/contact/VcardModel.cpp
+14
-14
ContactsListProxyModel.cpp
...esktop/src/components/contacts/ContactsListProxyModel.cpp
+1
-1
CoreHandlers.cpp
linphone-desktop/src/components/core/CoreHandlers.cpp
+1
-1
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+1
-1
Notifier.cpp
linphone-desktop/src/components/notifier/Notifier.cpp
+3
-3
AccountSettingsModel.cpp
...-desktop/src/components/settings/AccountSettingsModel.cpp
+15
-15
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+16
-16
SipAddressesModel.cpp
...esktop/src/components/sip-addresses/SipAddressesModel.cpp
+7
-7
No files found.
linphone-desktop/src/Utils.hpp
View file @
0eaa2521
...
...
@@ -29,7 +29,7 @@
// =============================================================================
namespace
Utils
{
inline
QString
linphoneStringToQ
String
(
const
std
::
string
&
string
)
{
inline
QString
coreStringToApp
String
(
const
std
::
string
&
string
)
{
return
QString
::
fromLocal8Bit
(
string
.
c_str
(),
static_cast
<
int
>
(
string
.
size
()));
}
...
...
linphone-desktop/src/app/App.cpp
View file @
0eaa2521
...
...
@@ -435,7 +435,7 @@ void App::createNotifier () {
// -----------------------------------------------------------------------------
QString
App
::
getConfigLocale
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getConfig
()
->
getString
(
SettingsModel
::
UI_SECTION
,
"locale"
,
""
)
...
...
linphone-desktop/src/app/paths/Paths.cpp
View file @
0eaa2521
...
...
@@ -154,7 +154,7 @@ inline QString getAppMessageHistoryFilePath () {
// -----------------------------------------------------------------------------
bool
Paths
::
filePathExists
(
const
string
&
path
)
{
return
filePathExists
(
Utils
::
linphoneStringToQ
String
(
path
));
return
filePathExists
(
Utils
::
coreStringToApp
String
(
path
));
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/app/providers/AvatarProvider.cpp
View file @
0eaa2521
...
...
@@ -33,7 +33,7 @@ AvatarProvider::AvatarProvider () : QQuickImageProvider(
QQmlImageProviderBase
::
Image
,
QQmlImageProviderBase
::
ForceAsynchronousImageLoading
)
{
mAvatarsPath
=
Utils
::
linphoneStringToQ
String
(
Paths
::
getAvatarsDirPath
());
mAvatarsPath
=
Utils
::
coreStringToApp
String
(
Paths
::
getAvatarsDirPath
());
}
QImage
AvatarProvider
::
requestImage
(
const
QString
&
id
,
QSize
*
,
const
QSize
&
)
{
...
...
linphone-desktop/src/app/providers/ThumbnailProvider.cpp
View file @
0eaa2521
...
...
@@ -33,7 +33,7 @@ ThumbnailProvider::ThumbnailProvider () : QQuickImageProvider(
QQmlImageProviderBase
::
Image
,
QQmlImageProviderBase
::
ForceAsynchronousImageLoading
)
{
mThumbnailsPath
=
Utils
::
linphoneStringToQ
String
(
Paths
::
getThumbnailsDirPath
());
mThumbnailsPath
=
Utils
::
coreStringToApp
String
(
Paths
::
getThumbnailsDirPath
());
}
QImage
ThumbnailProvider
::
requestImage
(
const
QString
&
id
,
QSize
*
,
const
QSize
&
)
{
...
...
linphone-desktop/src/components/assistant/AssistantModel.cpp
View file @
0eaa2521
...
...
@@ -191,7 +191,7 @@ void AssistantModel::reset () {
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getEmail
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mAccountCreator
->
getEmail
());
return
::
Utils
::
coreStringToApp
String
(
mAccountCreator
->
getEmail
());
}
void
AssistantModel
::
setEmail
(
const
QString
&
email
)
{
...
...
@@ -215,7 +215,7 @@ void AssistantModel::setEmail (const QString &email) {
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getPassword
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mAccountCreator
->
getPassword
());
return
::
Utils
::
coreStringToApp
String
(
mAccountCreator
->
getPassword
());
}
void
AssistantModel
::
setPassword
(
const
QString
&
password
)
{
...
...
@@ -233,11 +233,11 @@ void AssistantModel::setPassword (const QString &password) {
break
;
case
linphone
:
:
AccountCreatorPasswordStatusInvalidCharacters
:
error
=
tr
(
"passwordStatusInvalidCharacters"
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
config
->
getString
(
"assistant"
,
"password_regex"
,
""
)));
.
arg
(
::
Utils
::
coreStringToApp
String
(
config
->
getString
(
"assistant"
,
"password_regex"
,
""
)));
break
;
case
linphone
:
:
AccountCreatorPasswordStatusMissingCharacters
:
error
=
tr
(
"passwordStatusMissingCharacters"
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
config
->
getString
(
"assistant"
,
"missing_characters"
,
""
)));
.
arg
(
::
Utils
::
coreStringToApp
String
(
config
->
getString
(
"assistant"
,
"missing_characters"
,
""
)));
break
;
}
...
...
@@ -247,7 +247,7 @@ void AssistantModel::setPassword (const QString &password) {
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getPhoneNumber
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mAccountCreator
->
getPhoneNumber
());
return
::
Utils
::
coreStringToApp
String
(
mAccountCreator
->
getPhoneNumber
());
}
void
AssistantModel
::
setPhoneNumber
(
const
QString
&
phoneNumber
)
{
...
...
@@ -262,7 +262,7 @@ void AssistantModel::setPhoneNumber (const QString &phoneNumber) {
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getUsername
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mAccountCreator
->
getUsername
());
return
::
Utils
::
coreStringToApp
String
(
mAccountCreator
->
getUsername
());
}
void
AssistantModel
::
setUsername
(
const
QString
&
username
)
{
...
...
@@ -277,7 +277,7 @@ void AssistantModel::setUsername (const QString &username) {
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getDisplayName
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mAccountCreator
->
getDisplayName
());
return
::
Utils
::
coreStringToApp
String
(
mAccountCreator
->
getDisplayName
());
}
void
AssistantModel
::
setDisplayName
(
const
QString
&
displayName
)
{
...
...
@@ -298,7 +298,7 @@ QString AssistantModel::getConfigFilename () const {
void
AssistantModel
::
setConfigFilename
(
const
QString
&
configFilename
)
{
mConfigFilename
=
configFilename
;
QString
configPath
=
::
Utils
::
linphoneStringToQ
String
(
Paths
::
getAssistantConfigDirPath
())
+
configFilename
;
QString
configPath
=
::
Utils
::
coreStringToApp
String
(
Paths
::
getAssistantConfigDirPath
())
+
configFilename
;
qInfo
()
<<
QStringLiteral
(
"Set config on assistant: `%1`."
).
arg
(
configPath
);
CoreManager
::
getInstance
()
->
getCore
()
->
getConfig
()
->
loadFromXmlFile
(
...
...
@@ -325,7 +325,7 @@ QString AssistantModel::mapAccountCreatorUsernameStatusToString (linphone::Accou
break
;
case
linphone
:
:
AccountCreatorUsernameStatusInvalidCharacters
:
error
=
tr
(
"usernameStatusInvalidCharacters"
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
config
->
getString
(
"assistant"
,
"username_regex"
,
""
)));
.
arg
(
::
Utils
::
coreStringToApp
String
(
config
->
getString
(
"assistant"
,
"username_regex"
,
""
)));
break
;
case
linphone
:
:
AccountCreatorUsernameStatusInvalid
:
error
=
tr
(
"usernameStatusInvalid"
);
...
...
linphone-desktop/src/components/authentication/AuthenticationNotifier.cpp
View file @
0eaa2521
...
...
@@ -39,12 +39,12 @@ AuthenticationNotifier::AuthenticationNotifier (QObject *parent) : QObject(paren
void
AuthenticationNotifier
::
handleAuthenticationRequested
(
const
shared_ptr
<
linphone
::
AuthInfo
>
&
authInfo
)
{
emit
authenticationRequested
(
QVariant
::
fromValue
(
authInfo
),
::
Utils
::
linphoneStringToQ
String
(
authInfo
->
getRealm
()),
::
Utils
::
coreStringToApp
String
(
authInfo
->
getRealm
()),
QStringLiteral
(
"%1@%2"
).
arg
(
::
Utils
::
linphoneStringToQ
String
(
authInfo
->
getUsername
())
::
Utils
::
coreStringToApp
String
(
authInfo
->
getUsername
())
).
arg
(
::
Utils
::
linphoneStringToQ
String
(
authInfo
->
getDomain
())
::
Utils
::
coreStringToApp
String
(
authInfo
->
getDomain
())
),
::
Utils
::
linphoneStringToQ
String
(
authInfo
->
getUserid
())
::
Utils
::
coreStringToApp
String
(
authInfo
->
getUserid
())
);
}
linphone-desktop/src/components/call/CallModel.cpp
View file @
0eaa2521
...
...
@@ -71,7 +71,7 @@ CallModel::~CallModel () {
// -----------------------------------------------------------------------------
QString
CallModel
::
getSipAddress
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mCall
->
getRemoteAddress
()
->
asStringUriOnly
());
return
::
Utils
::
coreStringToApp
String
(
mCall
->
getRemoteAddress
()
->
asStringUriOnly
());
}
// -----------------------------------------------------------------------------
...
...
@@ -541,7 +541,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
statsList
.
clear
();
statsList
<<
createStat
(
tr
(
"callStatsCodec"
),
payloadType
?
QString
(
"%1 / %2kHz"
).
arg
(
Utils
::
linphoneStringToQ
String
(
payloadType
->
getMimeType
())).
arg
(
payloadType
->
getClockRate
()
/
1000
)
?
QString
(
"%1 / %2kHz"
).
arg
(
Utils
::
coreStringToApp
String
(
payloadType
->
getMimeType
())).
arg
(
payloadType
->
getClockRate
()
/
1000
)
:
""
);
statsList
<<
createStat
(
tr
(
"callStatsUploadBandwidth"
),
QString
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getUploadBandwidth
())));
statsList
<<
createStat
(
tr
(
"callStatsDownloadBandwidth"
),
QString
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getDownloadBandwidth
())));
...
...
@@ -555,7 +555,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
statsList
<<
createStat
(
tr
(
"callStatsJitterBuffer"
),
QString
(
"%1 ms"
).
arg
(
callStats
->
getJitterBufferSizeMs
()));
break
;
case
linphone
:
:
StreamTypeVideo
:
{
QString
sentVideoDefinitionName
=
Utils
::
linphoneStringToQ
String
(
params
->
getSentVideoDefinition
()
->
getName
());
QString
sentVideoDefinitionName
=
Utils
::
coreStringToApp
String
(
params
->
getSentVideoDefinition
()
->
getName
());
QString
sentVideoDefinition
=
QString
(
"%1x%2"
)
.
arg
(
params
->
getSentVideoDefinition
()
->
getWidth
())
.
arg
(
params
->
getSentVideoDefinition
()
->
getHeight
());
...
...
@@ -564,7 +564,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
?
sentVideoDefinition
:
QString
(
"%1 (%2)"
).
arg
(
sentVideoDefinition
).
arg
(
sentVideoDefinitionName
));
QString
receivedVideoDefinitionName
=
Utils
::
linphoneStringToQ
String
(
params
->
getReceivedVideoDefinition
()
->
getName
());
QString
receivedVideoDefinitionName
=
Utils
::
coreStringToApp
String
(
params
->
getReceivedVideoDefinition
()
->
getName
());
QString
receivedVideoDefinition
=
QString
(
"%1x%2"
)
.
arg
(
params
->
getReceivedVideoDefinition
()
->
getWidth
())
.
arg
(
params
->
getReceivedVideoDefinition
()
->
getHeight
());
...
...
linphone-desktop/src/components/chat/ChatModel.cpp
View file @
0eaa2521
...
...
@@ -52,14 +52,14 @@ inline void fillThumbnailProperty (QVariantMap &dest, const shared_ptr<linphone:
string
fileId
=
message
->
getAppdata
();
if
(
!
fileId
.
empty
()
&&
!
dest
.
contains
(
"thumbnail"
))
dest
[
"thumbnail"
]
=
QStringLiteral
(
"image://%1/%2"
)
.
arg
(
ThumbnailProvider
::
PROVIDER_ID
).
arg
(
::
Utils
::
linphoneStringToQ
String
(
fileId
));
.
arg
(
ThumbnailProvider
::
PROVIDER_ID
).
arg
(
::
Utils
::
coreStringToApp
String
(
fileId
));
}
inline
void
createThumbnail
(
const
shared_ptr
<
linphone
::
ChatMessage
>
&
message
)
{
if
(
!
message
->
getAppdata
().
empty
())
return
;
QString
thumbnailPath
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getFileTransferFilepath
());
QString
thumbnailPath
=
::
Utils
::
coreStringToApp
String
(
message
->
getFileTransferFilepath
());
QImage
image
(
thumbnailPath
);
if
(
image
.
isNull
())
...
...
@@ -73,7 +73,7 @@ inline void createThumbnail (const shared_ptr<linphone::ChatMessage> &message) {
QString
uuid
=
QUuid
::
createUuid
().
toString
();
QString
fileId
=
QStringLiteral
(
"%1.jpg"
).
arg
(
uuid
.
mid
(
1
,
uuid
.
length
()
-
2
));
if
(
!
thumbnail
.
save
(
::
Utils
::
linphoneStringToQ
String
(
Paths
::
getThumbnailsDirPath
())
+
fileId
,
"jpg"
,
100
))
{
if
(
!
thumbnail
.
save
(
::
Utils
::
coreStringToApp
String
(
Paths
::
getThumbnailsDirPath
())
+
fileId
,
"jpg"
,
100
))
{
qWarning
()
<<
QStringLiteral
(
"Unable to create thumbnail of: `%1`."
).
arg
(
thumbnailPath
);
return
;
}
...
...
@@ -87,7 +87,7 @@ inline void removeFileMessageThumbnail (const shared_ptr<linphone::ChatMessage>
string
fileId
=
message
->
getAppdata
();
if
(
!
fileId
.
empty
())
{
QString
thumbnailPath
=
::
Utils
::
linphoneStringToQ
String
(
Paths
::
getThumbnailsDirPath
()
+
fileId
);
QString
thumbnailPath
=
::
Utils
::
coreStringToApp
String
(
Paths
::
getThumbnailsDirPath
()
+
fileId
);
if
(
!
QFile
::
remove
(
thumbnailPath
))
qWarning
()
<<
QStringLiteral
(
"Unable to remove `%1`."
).
arg
(
thumbnailPath
);
}
...
...
@@ -243,7 +243,7 @@ QString ChatModel::getSipAddress () const {
if
(
!
mChatRoom
)
return
""
;
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
mChatRoom
->
getPeerAddress
()
->
asStringUriOnly
()
);
}
...
...
@@ -435,14 +435,14 @@ void ChatModel::downloadFile (int id, const QString &downloadPath) {
void
ChatModel
::
fillMessageEntry
(
QVariantMap
&
dest
,
const
shared_ptr
<
linphone
::
ChatMessage
>
&
message
)
{
dest
[
"type"
]
=
EntryType
::
MessageEntry
;
dest
[
"timestamp"
]
=
QDateTime
::
fromMSecsSinceEpoch
(
message
->
getTime
()
*
1000
);
dest
[
"content"
]
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getText
());
dest
[
"content"
]
=
::
Utils
::
coreStringToApp
String
(
message
->
getText
());
dest
[
"isOutgoing"
]
=
message
->
isOutgoing
()
||
message
->
getState
()
==
linphone
::
ChatMessageStateIdle
;
dest
[
"status"
]
=
message
->
getState
();
shared_ptr
<
const
linphone
::
Content
>
content
=
message
->
getFileTransferInformation
();
if
(
content
)
{
dest
[
"fileSize"
]
=
static_cast
<
quint64
>
(
content
->
getSize
());
dest
[
"fileName"
]
=
::
Utils
::
linphoneStringToQ
String
(
content
->
getName
());
dest
[
"fileName"
]
=
::
Utils
::
coreStringToApp
String
(
content
->
getName
());
fillThumbnailProperty
(
dest
,
message
);
}
}
...
...
linphone-desktop/src/components/codecs/AbstractCodecsModel.cpp
View file @
0eaa2521
...
...
@@ -96,7 +96,7 @@ void AbstractCodecsModel::setRecvFmtp (int id, const QString &recvFmtp) {
shared_ptr
<
linphone
::
PayloadType
>
codec
=
getCodecFromMap
(
map
);
codec
->
setRecvFmtp
(
::
Utils
::
qStringToLinphoneString
(
recvFmtp
));
map
[
"recvFmtp"
]
=
::
Utils
::
linphoneStringToQ
String
(
codec
->
getRecvFmtp
());
map
[
"recvFmtp"
]
=
::
Utils
::
coreStringToApp
String
(
codec
->
getRecvFmtp
());
emit
dataChanged
(
index
(
id
,
0
),
index
(
id
,
0
));
}
...
...
@@ -157,14 +157,14 @@ void AbstractCodecsModel::addCodec (shared_ptr<linphone::PayloadType> &codec) {
map
[
"bitrate"
]
=
codec
->
getNormalBitrate
();
map
[
"channels"
]
=
codec
->
getChannels
();
map
[
"clockRate"
]
=
codec
->
getClockRate
();
map
[
"description"
]
=
::
Utils
::
linphoneStringToQ
String
(
codec
->
getDescription
());
map
[
"description"
]
=
::
Utils
::
coreStringToApp
String
(
codec
->
getDescription
());
map
[
"enabled"
]
=
codec
->
enabled
();
map
[
"encoderDescription"
]
=
::
Utils
::
linphoneStringToQ
String
(
codec
->
getEncoderDescription
());
map
[
"encoderDescription"
]
=
::
Utils
::
coreStringToApp
String
(
codec
->
getEncoderDescription
());
map
[
"isUsable"
]
=
codec
->
isUsable
();
map
[
"isVbr"
]
=
codec
->
isVbr
();
map
[
"mime"
]
=
::
Utils
::
linphoneStringToQ
String
(
codec
->
getMimeType
());
map
[
"mime"
]
=
::
Utils
::
coreStringToApp
String
(
codec
->
getMimeType
());
map
[
"number"
]
=
codec
->
getNumber
();
map
[
"recvFmtp"
]
=
::
Utils
::
linphoneStringToQ
String
(
codec
->
getRecvFmtp
());
map
[
"recvFmtp"
]
=
::
Utils
::
coreStringToApp
String
(
codec
->
getRecvFmtp
());
map
[
"__codec"
]
=
QVariant
::
fromValue
(
codec
);
mCodecs
<<
map
;
...
...
linphone-desktop/src/components/conference/ConferenceAddModel.cpp
View file @
0eaa2521
...
...
@@ -71,7 +71,7 @@ QVariant ConferenceHelperModel::ConferenceAddModel::data (const QModelIndex &ind
// -----------------------------------------------------------------------------
bool
ConferenceHelperModel
::
ConferenceAddModel
::
addToConference
(
const
shared_ptr
<
const
linphone
::
Address
>
&
linphoneAddress
)
{
const
QString
&
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
linphoneAddress
->
asStringUriOnly
());
const
QString
&
sipAddress
=
::
Utils
::
coreStringToApp
String
(
linphoneAddress
->
asStringUriOnly
());
if
(
mSipAddresses
.
contains
(
sipAddress
))
return
false
;
...
...
@@ -145,7 +145,7 @@ void ConferenceHelperModel::ConferenceAddModel::update () {
if
(
!
call
->
getParams
()
->
getLocalConferenceMode
())
continue
;
const
QString
&
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
call
->
getRemoteAddress
()
->
asStringUriOnly
());
const
QString
&
sipAddress
=
::
Utils
::
coreStringToApp
String
(
call
->
getRemoteAddress
()
->
asStringUriOnly
());
if
(
!
mSipAddresses
.
contains
(
sipAddress
))
call
->
terminate
();
}
...
...
@@ -159,7 +159,7 @@ void ConferenceHelperModel::ConferenceAddModel::update () {
// -----------------------------------------------------------------------------
void
ConferenceHelperModel
::
ConferenceAddModel
::
addToConferencePrivate
(
const
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
)
{
QString
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
linphoneAddress
->
asStringUriOnly
());
QString
sipAddress
=
::
Utils
::
coreStringToApp
String
(
linphoneAddress
->
asStringUriOnly
());
QVariantMap
map
=
CoreManager
::
getInstance
()
->
getSipAddressesModel
()
->
find
(
sipAddress
);
map
[
"sipAddress"
]
=
sipAddress
;
...
...
linphone-desktop/src/components/contact/VcardModel.cpp
View file @
0eaa2521
...
...
@@ -80,7 +80,7 @@ static void removeBelcardPhoto (const shared_ptr<belcard::BelCard> &belcard, boo
for
(
const
auto
photo
:
photos
)
{
QString
imagePath
(
::
Utils
::
linphoneStringToQ
String
(
::
Utils
::
coreStringToApp
String
(
Paths
::
getAvatarsDirPath
()
+
photo
->
getValue
().
substr
(
sizeof
(
VCARD_SCHEME
)
-
1
)
)
);
...
...
@@ -140,7 +140,7 @@ QString VcardModel::getAvatar () const {
// Returns right path.
return
QStringLiteral
(
"image://%1/%2"
).
arg
(
AvatarProvider
::
PROVIDER_ID
).
arg
(
::
Utils
::
linphoneStringToQ
String
(
photo
->
getValue
().
substr
(
sizeof
(
VCARD_SCHEME
)
-
1
))
::
Utils
::
coreStringToApp
String
(
photo
->
getValue
().
substr
(
sizeof
(
VCARD_SCHEME
)
-
1
))
);
}
...
...
@@ -173,7 +173,7 @@ bool VcardModel::setAvatar (const QString &path) {
.
arg
(
uuid
.
mid
(
1
,
uuid
.
length
()
-
2
))
// Remove `{}`.
.
arg
(
info
.
suffix
());
QString
dest
=
::
Utils
::
linphoneStringToQ
String
(
Paths
::
getAvatarsDirPath
())
+
fileId
;
QString
dest
=
::
Utils
::
coreStringToApp
String
(
Paths
::
getAvatarsDirPath
())
+
fileId
;
if
(
!
file
.
copy
(
dest
))
return
false
;
...
...
@@ -205,7 +205,7 @@ bool VcardModel::setAvatar (const QString &path) {
// -----------------------------------------------------------------------------
QString
VcardModel
::
getUsername
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mVcard
->
getFullName
());
return
::
Utils
::
coreStringToApp
String
(
mVcard
->
getFullName
());
}
void
VcardModel
::
setUsername
(
const
QString
&
username
)
{
...
...
@@ -242,10 +242,10 @@ QVariantMap VcardModel::getAddress () const {
return
map
;
shared_ptr
<
belcard
::
BelCardAddress
>
address
=
addresses
.
front
();
map
[
"street"
]
=
::
Utils
::
linphoneStringToQ
String
(
address
->
getStreet
());
map
[
"locality"
]
=
::
Utils
::
linphoneStringToQ
String
(
address
->
getLocality
());
map
[
"postalCode"
]
=
::
Utils
::
linphoneStringToQ
String
(
address
->
getPostalCode
());
map
[
"country"
]
=
::
Utils
::
linphoneStringToQ
String
(
address
->
getCountry
());
map
[
"street"
]
=
::
Utils
::
coreStringToApp
String
(
address
->
getStreet
());
map
[
"locality"
]
=
::
Utils
::
coreStringToApp
String
(
address
->
getLocality
());
map
[
"postalCode"
]
=
::
Utils
::
coreStringToApp
String
(
address
->
getPostalCode
());
map
[
"country"
]
=
::
Utils
::
coreStringToApp
String
(
address
->
getCountry
());
return
map
;
}
...
...
@@ -293,10 +293,10 @@ QVariantList VcardModel::getSipAddresses () const {
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
core
->
createAddress
(
value
);
if
(
linphoneAddress
)
list
<<
::
Utils
::
linphoneStringToQ
String
(
linphoneAddress
->
asStringUriOnly
());
list
<<
::
Utils
::
coreStringToApp
String
(
linphoneAddress
->
asStringUriOnly
());
else
qWarning
()
<<
QStringLiteral
(
"Unable to parse sip address: `%1`"
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
value
));
.
arg
(
::
Utils
::
coreStringToApp
String
(
value
));
}
return
list
;
...
...
@@ -334,7 +334,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
::
linphoneStringToQ
String
(
interpretSipAddress
(
sipAddress
))
addresses
,
::
Utils
::
coreStringToApp
String
(
interpretSipAddress
(
sipAddress
))
);
if
(
!
value
)
{
...
...
@@ -366,7 +366,7 @@ QVariantList VcardModel::getCompanies () const {
QVariantList
list
;
for
(
const
auto
&
company
:
mVcard
->
getVcard
()
->
getRoles
())
list
.
append
(
::
Utils
::
linphoneStringToQ
String
(
company
->
getValue
()));
list
.
append
(
::
Utils
::
coreStringToApp
String
(
company
->
getValue
()));
return
list
;
}
...
...
@@ -420,7 +420,7 @@ QVariantList VcardModel::getEmails () const {
QVariantList
list
;
for
(
const
auto
&
email
:
mVcard
->
getVcard
()
->
getEmails
())
list
.
append
(
::
Utils
::
linphoneStringToQ
String
(
email
->
getValue
()));
list
.
append
(
::
Utils
::
coreStringToApp
String
(
email
->
getValue
()));
return
list
;
}
...
...
@@ -475,7 +475,7 @@ QVariantList VcardModel::getUrls () const {
QVariantList
list
;
for
(
const
auto
&
url
:
mVcard
->
getVcard
()
->
getURLs
())
list
.
append
(
::
Utils
::
linphoneStringToQ
String
(
url
->
getValue
()));
list
.
append
(
::
Utils
::
coreStringToApp
String
(
url
->
getValue
()));
return
list
;
}
...
...
linphone-desktop/src/components/contacts/ContactsListProxyModel.cpp
View file @
0eaa2521
...
...
@@ -134,7 +134,7 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel *contact)
float
size
=
static_cast
<
float
>
(
addresses
.
size
());
for
(
auto
it
=
addresses
.
cbegin
();
it
!=
addresses
.
cend
();
++
it
)
weight
+=
computeStringWeight
(
::
Utils
::
linphoneStringToQ
String
((
*
it
)
->
asStringUriOnly
()),
::
Utils
::
coreStringToApp
String
((
*
it
)
->
asStringUriOnly
()),
SIP_ADDRESSES_WEIGHT
/
size
);
...
...
linphone-desktop/src/components/core/CoreHandlers.cpp
View file @
0eaa2521
...
...
@@ -148,7 +148,7 @@ void CoreHandlers::onNotifyPresenceReceivedForUriOrTel (
const
string
&
uriOrTel
,
const
shared_ptr
<
const
linphone
::
PresenceModel
>
&
presenceModel
)
{
emit
presenceReceived
(
::
Utils
::
linphoneStringToQ
String
(
uriOrTel
),
presenceModel
);
emit
presenceReceived
(
::
Utils
::
coreStringToApp
String
(
uriOrTel
),
presenceModel
);
}
void
CoreHandlers
::
onNotifyPresenceReceived
(
...
...
linphone-desktop/src/components/core/CoreManager.cpp
View file @
0eaa2521
...
...
@@ -142,7 +142,7 @@ void CoreManager::createLinphoneCore (const QString &configPath) {
// -----------------------------------------------------------------------------
QString
CoreManager
::
getVersion
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
mCore
->
getVersion
());
return
::
Utils
::
coreStringToApp
String
(
mCore
->
getVersion
());
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/components/notifier/Notifier.cpp
View file @
0eaa2521
...
...
@@ -230,8 +230,8 @@ void Notifier::notifyReceivedMessage (const shared_ptr<linphone::ChatMessage> &m
return
;
QVariantMap
map
;
map
[
"message"
]
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getText
());
map
[
"sipAddress"
]
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getFromAddress
()
->
asStringUriOnly
());
map
[
"message"
]
=
::
Utils
::
coreStringToApp
String
(
message
->
getText
());
map
[
"sipAddress"
]
=
::
Utils
::
coreStringToApp
String
(
message
->
getFromAddress
()
->
asStringUriOnly
());
map
[
"window"
].
setValue
(
App
::
getInstance
()
->
getMainWindow
());
::
setProperty
(
*
notification
,
NOTIFICATION_PROPERTY_DATA
,
map
);
...
...
@@ -244,7 +244,7 @@ void Notifier::notifyReceivedFileMessage (const shared_ptr<linphone::ChatMessage
return
;
QVariantMap
map
;
map
[
"fileUri"
]
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getFileTransferFilepath
());
map
[
"fileUri"
]
=
::
Utils
::
coreStringToApp
String
(
message
->
getFileTransferFilepath
());
map
[
"fileSize"
]
=
static_cast
<
quint64
>
(
message
->
getFileTransferInformation
()
->
getSize
());
::
setProperty
(
*
notification
,
NOTIFICATION_PROPERTY_DATA
,
map
);
...
...
linphone-desktop/src/components/settings/AccountSettingsModel.cpp
View file @
0eaa2521
...
...
@@ -68,12 +68,12 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (const shared_ptr<linphone::Pr
if
(
find
(
proxyConfigs
.
cbegin
(),
proxyConfigs
.
cend
(),
proxyConfig
)
!=
proxyConfigs
.
cend
())
{
if
(
proxyConfig
->
done
()
==
-
1
)
{
qWarning
()
<<
QStringLiteral
(
"Unable to update proxy config: `%1`."
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getIdentityAddress
()
->
asString
()));
.
arg
(
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getIdentityAddress
()
->
asString
()));
return
false
;
}
}
else
if
(
core
->
addProxyConfig
(
proxyConfig
)
==
-
1
)
{
qWarning
()
<<
QStringLiteral
(
"Unable to add proxy config: `%1`."
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getIdentityAddress
()
->
asString
()));
.
arg
(
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getIdentityAddress
()
->
asString
()));
return
false
;
}
...
...
@@ -90,15 +90,15 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
{
const
shared_ptr
<
const
linphone
::
Address
>
address
=
proxyConfig
->
getIdentityAddress
();
map
[
"sipAddress"
]
=
address
?
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getIdentityAddress
()
->
asStringUriOnly
())
?
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getIdentityAddress
()
->
asStringUriOnly
())
:
""
;
}
map
[
"serverAddress"
]
=
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getServerAddr
());
map
[
"serverAddress"
]
=
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getServerAddr
());
map
[
"registrationDuration"
]
=
proxyConfig
->
getPublishExpires
();
map
[
"transport"
]
=
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getTransport
());
map
[
"route"
]
=
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getRoute
());
map
[
"contactParams"
]
=
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getContactParameters
());
map
[
"transport"
]
=
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getTransport
());
map
[
"route"
]
=
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getRoute
());
map
[
"contactParams"
]
=
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getContactParameters
());
map
[
"avpfInterval"
]
=
proxyConfig
->
getAvpfRrInterval
();
map
[
"registerEnabled"
]
=
proxyConfig
->
registerEnabled
();
map
[
"publishPresence"
]
=
proxyConfig
->
publishEnabled
();
...
...
@@ -190,7 +190,7 @@ QString AccountSettingsModel::getUsername () const {
shared_ptr
<
const
linphone
::
Address
>
address
=
getUsedSipAddress
();
const
string
&
displayName
=
address
->
getDisplayName
();
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
displayName
.
empty
()
?
address
->
getUsername
()
:
displayName
);
}
...
...
@@ -201,7 +201,7 @@ void AccountSettingsModel::setUsername (const QString &username) {
if
(
newAddress
->
setDisplayName
(
::
Utils
::
qStringToLinphoneString
(
username
)))
{
qWarning
()
<<
QStringLiteral
(
"Unable to set displayName on sip address: `%1`."
)
.
arg
(
::
Utils
::
linphoneStringToQ
String
(
newAddress
->
asStringUriOnly
()));
.
arg
(
::
Utils
::
coreStringToApp
String
(
newAddress
->
asStringUriOnly
()));
}
else
{
setUsedSipAddress
(
newAddress
);
}
...
...
@@ -210,7 +210,7 @@ void AccountSettingsModel::setUsername (const QString &username) {
}
QString
AccountSettingsModel
::
getSipAddress
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
getUsedSipAddress
()
->
asStringUriOnly
());
return
::
Utils
::
coreStringToApp
String
(
getUsedSipAddress
()
->
asStringUriOnly
());
}
AccountSettingsModel
::
RegistrationState
AccountSettingsModel
::
getRegistrationState
()
const
{
...
...
@@ -221,7 +221,7 @@ AccountSettingsModel::RegistrationState AccountSettingsModel::getRegistrationSta
// -----------------------------------------------------------------------------
QString
AccountSettingsModel
::
getPrimaryUsername
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getPrimaryContactParsed
()
->
getUsername
()
);
}
...
...
@@ -239,7 +239,7 @@ void AccountSettingsModel::setPrimaryUsername (const QString &username) {
}
QString
AccountSettingsModel
::
getPrimaryDisplayName
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getPrimaryContactParsed
()
->
getDisplayName
()
);
}
...
...
@@ -255,7 +255,7 @@ void AccountSettingsModel::setPrimaryDisplayName (const QString &displayName) {
}
QString
AccountSettingsModel
::
getPrimarySipAddress
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getPrimaryContactParsed
()
->
asString
()
);
}
...
...
@@ -268,13 +268,13 @@ QVariantList AccountSettingsModel::getAccounts () const {
{
QVariantMap
account
;
account
[
"sipAddress"
]
=
::
Utils
::
linphoneStringToQ
String
(
core
->
getPrimaryContactParsed
()
->
asStringUriOnly
());
account
[
"sipAddress"
]
=
::
Utils
::
coreStringToApp
String
(
core
->
getPrimaryContactParsed
()
->
asStringUriOnly
());
accounts
<<
account
;
}
for
(
const
auto
&
proxyConfig
:
core
->
getProxyConfigList
())
{
QVariantMap
account
;
account
[
"sipAddress"
]
=
::
Utils
::
linphoneStringToQ
String
(
proxyConfig
->
getIdentityAddress
()
->
asStringUriOnly
());
account
[
"sipAddress"
]
=
::
Utils
::
coreStringToApp
String
(
proxyConfig
->
getIdentityAddress
()
->
asStringUriOnly
());
account
[
"proxyConfig"
].
setValue
(
proxyConfig
);
accounts
<<
account
;
}
...
...
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
0eaa2521
...
...
@@ -46,7 +46,7 @@ QStringList SettingsModel::getAudioDevices () const {
QStringList
list
;
for
(
const
auto
&
device
:
CoreManager
::
getInstance
()
->
getCore
()
->
getSoundDevices
())
list
<<
::
Utils
::
linphoneStringToQ
String
(
device
);
list
<<
::
Utils
::
coreStringToApp
String
(
device
);
return
list
;
}
...
...
@@ -54,7 +54,7 @@ QStringList SettingsModel::getAudioDevices () const {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getCaptureDevice
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getCaptureDevice
()
);
}
...
...
@@ -69,7 +69,7 @@ void SettingsModel::setCaptureDevice (const QString &device) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getPlaybackDevice
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getPlaybackDevice
()
);
}
...
...
@@ -84,7 +84,7 @@ void SettingsModel::setPlaybackDevice (const QString &device) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getRingerDevice
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getRingerDevice
()
);
}
...
...
@@ -99,7 +99,7 @@ void SettingsModel::setRingerDevice (const QString &device) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getRingPath
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getRing
());
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getRing
());
}
void
SettingsModel
::
setRingPath
(
const
QString
&
path
)
{
...
...
@@ -131,7 +131,7 @@ QStringList SettingsModel::getVideoDevices () const {
QStringList
list
;
for
(
const
auto
&
device
:
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoDevices
())
list
<<
::
Utils
::
linphoneStringToQ
String
(
device
);
list
<<
::
Utils
::
coreStringToApp
String
(
device
);
return
list
;
}
...
...
@@ -139,7 +139,7 @@ QStringList SettingsModel::getVideoDevices () const {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getVideoDevice
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoDevice
()
);
}
...
...
@@ -154,7 +154,7 @@ void SettingsModel::setVideoDevice (const QString &device) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getVideoPreset
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoPreset
()
);
}
...
...
@@ -182,7 +182,7 @@ void SettingsModel::setVideoFramerate (int framerate) {
inline
QVariantMap
createMapFromVideoDefinition
(
const
shared_ptr
<
const
linphone
::
VideoDefinition
>
&
definition
)
{
QVariantMap
map
;
map
[
"name"
]
=
::
Utils
::
linphoneStringToQ
String
(
definition
->
getName
());
map
[
"name"
]
=
::
Utils
::
coreStringToApp
String
(
definition
->
getName
());
map
[
"width"
]
=
definition
->
getWidth
();
map
[
"height"
]
=
definition
->
getHeight
();
map
[
"__definition"
]
=
QVariant
::
fromValue
(
definition
);
...
...
@@ -236,7 +236,7 @@ void SettingsModel::setAutoAnswerStatus (bool status) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getFileTransferUrl
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getFileTransferServer
()
);
}
...
...
@@ -523,7 +523,7 @@ void SettingsModel::setTurnEnabled (bool status) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getStunServer
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getNatPolicy
()
->
getStunServer
()
);
}
...
...
@@ -537,7 +537,7 @@ void SettingsModel::setStunServer (const QString &stunServer) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getTurnUser
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getNatPolicy
()
->
getStunServerUsername
()
);
}
...
...
@@ -557,7 +557,7 @@ QString SettingsModel::getTurnPassword () const {
shared_ptr
<
linphone
::
NatPolicy
>
natPolicy
=
core
->
getNatPolicy
();
shared_ptr
<
const
linphone
::
AuthInfo
>
authInfo
=
core
->
findAuthInfo
(
natPolicy
->
getStunServerUsername
(),
""
,
""
);
return
authInfo
?
::
Utils
::
linphoneStringToQ
String
(
authInfo
->
getPasswd
())
:
""
;
return
authInfo
?
::
Utils
::
coreStringToApp
String
(
authInfo
->
getPasswd
())
:
""
;
}
void
SettingsModel
::
setTurnPassword
(
const
QString
&
password
)
{
...
...
@@ -616,7 +616,7 @@ void SettingsModel::setDscpVideo (int dscp) {
QString
SettingsModel
::
getSavedScreenshotsFolder
()
const
{
return
QDir
::
cleanPath
(
::
Utils
::
linphoneStringToQ
String
(
::
Utils
::
coreStringToApp
String
(
mConfig
->
getString
(
UI_SECTION
,
"saved_screenshots_folder"
,
Paths
::
getCapturesDirPath
())
)
)
+
QDir
::
separator
();
...
...
@@ -633,7 +633,7 @@ void SettingsModel::setSavedScreenshotsFolder (const QString &folder) {
QString
SettingsModel
::
getSavedVideosFolder
()
const
{
return
QDir
::
cleanPath
(
::
Utils
::
linphoneStringToQ
String
(
::
Utils
::
coreStringToApp
String
(
mConfig
->
getString
(
UI_SECTION
,
"saved_videos_folder"
,
Paths
::
getCapturesDirPath
())
)
)
+
QDir
::
separator
();
...
...
@@ -649,7 +649,7 @@ void SettingsModel::setSavedVideosFolder (const QString &folder) {
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getRemoteProvisioning
()
const
{
return
::
Utils
::
linphoneStringToQ
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getProvisioningUri
());
return
::
Utils
::
coreStringToApp
String
(
CoreManager
::
getInstance
()
->
getCore
()
->
getProvisioningUri
());
}
void
SettingsModel
::
setRemoteProvisioning
(
const
QString
&
remoteProvisioning
)
{
...
...
linphone-desktop/src/components/sip-addresses/SipAddressesModel.cpp
View file @
0eaa2521
...
...
@@ -145,7 +145,7 @@ QString SipAddressesModel::interpretUrl (const QString &sipAddress) const {
::
Utils
::
qStringToLinphoneString
(
sipAddress
)
);
return
lAddress
?
::
Utils
::
linphoneStringToQ
String
(
lAddress
->
asStringUriOnly
())
:
""
;
return
lAddress
?
::
Utils
::
coreStringToApp
String
(
lAddress
->
asStringUriOnly
())
:
""
;
}
QString
SipAddressesModel
::
getTransportFromSipAddress
(
const
QString
&
sipAddress
)
const
{
...
...
@@ -188,7 +188,7 @@ QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress,
else
address
->
setTransport
(
linphone
::
TransportType
::
TransportTypeDtls
);
return
::
Utils
::
linphoneStringToQ
String
(
address
->
asString
());
return
::
Utils
::
coreStringToApp
String
(
address
->
asString
());
}
bool
SipAddressesModel
::
sipAddressIsValid
(
const
QString
&
sipAddress
)
{
...
...
@@ -257,7 +257,7 @@ void SipAddressesModel::handleSipAddressRemoved (ContactModel *contact, const QS
}
void
SipAddressesModel
::
handleMessageReceived
(
const
shared_ptr
<
linphone
::
ChatMessage
>
&
message
)
{
const
QString
&
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
message
->
getFromAddress
()
->
asStringUriOnly
());
const
QString
&
sipAddress
=
::
Utils
::
coreStringToApp
String
(
message
->
getFromAddress
()
->
asStringUriOnly
());
addOrUpdateSipAddress
(
sipAddress
,
message
);
}
...
...
@@ -271,7 +271,7 @@ void SipAddressesModel::handleCallStateChanged (
if
(
state
==
linphone
::
CallStateEnd
||
state
==
linphone
::
CallStateError
)
addOrUpdateSipAddress
(
::
Utils
::
linphoneStringToQ
String
(
call
->
getRemoteAddress
()
->
asStringUriOnly
()),
call
::
Utils
::
coreStringToApp
String
(
call
->
getRemoteAddress
()
->
asStringUriOnly
()),
call
);
}
...
...
@@ -332,7 +332,7 @@ void SipAddressesModel::handleAllEntriesRemoved (const QString &sipAddress) {
void
SipAddressesModel
::
handleMessageSent
(
const
shared_ptr
<
linphone
::
ChatMessage
>
&
message
)
{
addOrUpdateSipAddress
(
::
Utils
::
linphoneStringToQ
String
(
message
->
getToAddress
()
->
asStringUriOnly
()),
::
Utils
::
coreStringToApp
String
(
message
->
getToAddress
()
->
asStringUriOnly
()),
message
);
}
...
...
@@ -448,7 +448,7 @@ void SipAddressesModel::initSipAddresses () {
if
(
history
.
size
()
==
0
)
continue
;
QString
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
chatRoom
->
getPeerAddress
()
->
asStringUriOnly
());
QString
sipAddress
=
::
Utils
::
coreStringToApp
String
(
chatRoom
->
getPeerAddress
()
->
asStringUriOnly
());
QVariantMap
map
;
map
[
"sipAddress"
]
=
sipAddress
;
...
...
@@ -461,7 +461,7 @@ void SipAddressesModel::initSipAddresses () {
// Get sip addresses from calls.
QSet
<
QString
>
addressDone
;
for
(
const
auto
&
callLog
:
core
->
getCallLogs
())
{
const
QString
&
sipAddress
=
::
Utils
::
linphoneStringToQ
String
(
callLog
->
getRemoteAddress
()
->
asStringUriOnly
());
const
QString
&
sipAddress
=
::
Utils
::
coreStringToApp
String
(
callLog
->
getRemoteAddress
()
->
asStringUriOnly
());
if
(
addressDone
.
contains
(
sipAddress
))
continue
;
// Already used.
...
...
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