Commit 2ba712cc authored by Ronan Abhamon's avatar Ronan Abhamon

fix(app): replace all `asString` calls by `asStringUriOnly` calls

parent 65e53dee
...@@ -134,7 +134,7 @@ QString ChatModel::getSipAddress () const { ...@@ -134,7 +134,7 @@ QString ChatModel::getSipAddress () const {
return ""; return "";
return ::Utils::linphoneStringToQString( return ::Utils::linphoneStringToQString(
m_chat_room->getPeerAddress()->asString() m_chat_room->getPeerAddress()->asStringUriOnly()
); );
} }
......
...@@ -110,7 +110,7 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel &contact) ...@@ -110,7 +110,7 @@ float ContactsListProxyModel::computeContactWeight (const ContactModel &contact)
float size = static_cast<float>(addresses.size()); float size = static_cast<float>(addresses.size());
for (auto it = addresses.cbegin(); it != addresses.cend(); ++it) for (auto it = addresses.cbegin(); it != addresses.cend(); ++it)
weight += computeStringWeight( weight += computeStringWeight(
::Utils::linphoneStringToQString((*it)->asString()), ::Utils::linphoneStringToQString((*it)->asStringUriOnly()),
SIP_ADDRESSES_WEIGHT / size SIP_ADDRESSES_WEIGHT / size
); );
......
...@@ -173,7 +173,7 @@ void SipAddressesModel::handleReceivedMessage ( ...@@ -173,7 +173,7 @@ void SipAddressesModel::handleReceivedMessage (
const shared_ptr<linphone::ChatRoom> &, const shared_ptr<linphone::ChatRoom> &,
const shared_ptr<linphone::ChatMessage> &message const shared_ptr<linphone::ChatMessage> &message
) { ) {
const QString &sip_address = ::Utils::linphoneStringToQString(message->getFromAddress()->asString()); const QString &sip_address = ::Utils::linphoneStringToQString(message->getFromAddress()->asStringUriOnly());
addOrUpdateSipAddress(sip_address, nullptr, static_cast<qint64>(message->getTime())); addOrUpdateSipAddress(sip_address, nullptr, static_cast<qint64>(message->getTime()));
} }
...@@ -253,7 +253,7 @@ void SipAddressesModel::initSipAddresses () { ...@@ -253,7 +253,7 @@ void SipAddressesModel::initSipAddresses () {
if (history.size() == 0) if (history.size() == 0)
continue; continue;
QString sip_address = ::Utils::linphoneStringToQString(chat_room->getPeerAddress()->asString()); QString sip_address = ::Utils::linphoneStringToQString(chat_room->getPeerAddress()->asStringUriOnly());
QVariantMap map; QVariantMap map;
map["sipAddress"] = sip_address; map["sipAddress"] = sip_address;
...@@ -265,7 +265,7 @@ void SipAddressesModel::initSipAddresses () { ...@@ -265,7 +265,7 @@ void SipAddressesModel::initSipAddresses () {
// Get sip addresses from calls. // Get sip addresses from calls.
QSet<QString> address_done; QSet<QString> address_done;
for (const auto &call_log : core->getCallLogs()) { for (const auto &call_log : core->getCallLogs()) {
QString sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asStringUriOnly()); const QString &sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asStringUriOnly());
if (address_done.contains(sip_address)) if (address_done.contains(sip_address))
continue; // Already used. continue; // Already used.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment