Commit a346aedd authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): replace `qStringToLinphoneString` to `appStringToCoreString`

parent 0eaa2521
......@@ -33,23 +33,10 @@ namespace Utils {
return QString::fromLocal8Bit(string.c_str(), static_cast<int>(string.size()));
}
inline std::string qStringToLinphoneString (const QString &string) {
inline std::string appStringToCoreString (const QString &string) {
return string.toLocal8Bit().constData();
}
template<class T>
T *findParentType (const QObject *object) {
QObject *parent = object->parent();
if (!parent)
return nullptr;
T *found = qobject_cast<T *>(parent);
if (found)
return found;
return findParentType<T>(parent);
}
// Reverse function of strstr.
char *rstrstr (const char *a, const char *b);
}
......
......@@ -444,7 +444,7 @@ QString App::getConfigLocale () const {
void App::setConfigLocale (const QString &locale) {
CoreManager::getInstance()->getCore()->getConfig()->setString(
SettingsModel::UI_SECTION, "locale", ::Utils::qStringToLinphoneString(locale)
SettingsModel::UI_SECTION, "locale", ::Utils::appStringToCoreString(locale)
);
emit configLocaleChanged(locale);
......
......@@ -80,7 +80,7 @@ inline void ensureFilePathExists (const QString &path) {
}
inline string getReadableDirPath (const QString &dirname) {
return Utils::qStringToLinphoneString(QDir::toNativeSeparators(dirname));
return Utils::appStringToCoreString(QDir::toNativeSeparators(dirname));
}
inline string getWritableDirPath (const QString &dirname) {
......@@ -89,7 +89,7 @@ inline string getWritableDirPath (const QString &dirname) {
}
inline string getReadableFilePath (const QString &filename) {
return Utils::qStringToLinphoneString(QDir::toNativeSeparators(filename));
return Utils::appStringToCoreString(QDir::toNativeSeparators(filename));
}
inline string getWritableFilePath (const QString &filename) {
......
......@@ -198,7 +198,7 @@ void AssistantModel::setEmail (const QString &email) {
shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig();
QString error;
switch (mAccountCreator->setEmail(::Utils::qStringToLinphoneString(email))) {
switch (mAccountCreator->setEmail(::Utils::appStringToCoreString(email))) {
case linphone::AccountCreatorEmailStatusOk:
break;
case linphone::AccountCreatorEmailStatusMalformed:
......@@ -222,7 +222,7 @@ void AssistantModel::setPassword (const QString &password) {
shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig();
QString error;
switch (mAccountCreator->setPassword(::Utils::qStringToLinphoneString(password))) {
switch (mAccountCreator->setPassword(::Utils::appStringToCoreString(password))) {
case linphone::AccountCreatorPasswordStatusOk:
break;
case linphone::AccountCreatorPasswordStatusTooShort:
......@@ -269,7 +269,7 @@ void AssistantModel::setUsername (const QString &username) {
emit usernameChanged(
username,
mapAccountCreatorUsernameStatusToString(
mAccountCreator->setUsername(::Utils::qStringToLinphoneString(username))
mAccountCreator->setUsername(::Utils::appStringToCoreString(username))
)
);
}
......@@ -284,7 +284,7 @@ void AssistantModel::setDisplayName (const QString &displayName) {
emit displayNameChanged(
displayName,
mapAccountCreatorUsernameStatusToString(
mAccountCreator->setDisplayName(::Utils::qStringToLinphoneString(displayName))
mAccountCreator->setDisplayName(::Utils::appStringToCoreString(displayName))
)
);
}
......@@ -302,7 +302,7 @@ void AssistantModel::setConfigFilename (const QString &configFilename) {
qInfo() << QStringLiteral("Set config on assistant: `%1`.").arg(configPath);
CoreManager::getInstance()->getCore()->getConfig()->loadFromXmlFile(
::Utils::qStringToLinphoneString(configPath)
::Utils::appStringToCoreString(configPath)
);
emit configFilenameChanged(configFilename);
......
......@@ -78,7 +78,7 @@ QString CallModel::getSipAddress () const {
void CallModel::setRecordFile (shared_ptr<linphone::CallParams> &callParams) {
callParams->setRecordFile(
::Utils::qStringToLinphoneString(
::Utils::appStringToCoreString(
QStringLiteral("%1%2.mkv")
.arg(CoreManager::getInstance()->getSettingsModel()->getSavedVideosFolder())
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss"))
......@@ -142,7 +142,7 @@ void CallModel::askForTransfer () {
}
bool CallModel::transferTo (const QString &sipAddress) {
bool status = !!mCall->transfer(::Utils::qStringToLinphoneString(sipAddress));
bool status = !!mCall->transfer(::Utils::appStringToCoreString(sipAddress));
if (status)
qWarning() << QStringLiteral("Unable to transfer: `%1`.").arg(sipAddress);
return status;
......@@ -176,7 +176,7 @@ void CallModel::takeSnapshot () {
qInfo() << QStringLiteral("Take snapshot of call:") << this;
mCall->takeVideoSnapshot(
::Utils::qStringToLinphoneString(
::Utils::appStringToCoreString(
CoreManager::getInstance()->getSettingsModel()->getSavedScreenshotsFolder() + newName
)
);
......
......@@ -93,7 +93,7 @@ void CallsListModel::askForTransfer (CallModel *callModel) {
void CallsListModel::launchAudioCall (const QString &sipUri) const {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::qStringToLinphoneString(sipUri));
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipUri));
if (!address)
return;
......@@ -107,7 +107,7 @@ void CallsListModel::launchAudioCall (const QString &sipUri) const {
void CallsListModel::launchVideoCall (const QString &sipUri) const {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::qStringToLinphoneString(sipUri));
shared_ptr<linphone::Address> address = core->interpretUrl(::Utils::appStringToCoreString(sipUri));
if (!address)
return;
......
......@@ -78,7 +78,7 @@ inline void createThumbnail (const shared_ptr<linphone::ChatMessage> &message) {
return;
}
message->setAppdata(::Utils::qStringToLinphoneString(fileId));
message->setAppdata(::Utils::appStringToCoreString(fileId));
}
inline void removeFileMessageThumbnail (const shared_ptr<linphone::ChatMessage> &message) {
......@@ -259,7 +259,7 @@ void ChatModel::setSipAddress (const QString &sipAddress) {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
mChatRoom = core->getChatRoomFromUri(::Utils::qStringToLinphoneString(sipAddress));
mChatRoom = core->getChatRoomFromUri(::Utils::appStringToCoreString(sipAddress));
if (mChatRoom->getUnreadMessagesCount() > 0)
resetMessagesCount();
......@@ -316,7 +316,7 @@ void ChatModel::sendMessage (const QString &message) {
if (!mChatRoom)
return;
shared_ptr<linphone::ChatMessage> _message = mChatRoom->createMessage(::Utils::qStringToLinphoneString(message));
shared_ptr<linphone::ChatMessage> _message = mChatRoom->createMessage(::Utils::appStringToCoreString(message));
_message->setListener(mMessageHandlers);
insertMessageAtEnd(_message);
......@@ -376,10 +376,10 @@ void ChatModel::sendFileMessage (const QString &path) {
content->setSubtype("octet-stream");
content->setSize(static_cast<size_t>(fileSize));
content->setName(::Utils::qStringToLinphoneString(QFileInfo(file).fileName()));
content->setName(::Utils::appStringToCoreString(QFileInfo(file).fileName()));
shared_ptr<linphone::ChatMessage> message = mChatRoom->createFileTransferMessage(content);
message->setFileTransferFilepath(::Utils::qStringToLinphoneString(path));
message->setFileTransferFilepath(::Utils::appStringToCoreString(path));
message->setListener(mMessageHandlers);
createThumbnail(message);
......@@ -423,7 +423,7 @@ void ChatModel::downloadFile (int id, const QString &downloadPath) {
return;
}
message->setFileTransferFilepath(::Utils::qStringToLinphoneString(downloadPath));
message->setFileTransferFilepath(::Utils::appStringToCoreString(downloadPath));
message->setListener(mMessageHandlers);
if (message->downloadFile() < 0)
......
......@@ -95,7 +95,7 @@ void AbstractCodecsModel::setRecvFmtp (int id, const QString &recvFmtp) {
QVariantMap &map = mCodecs[id];
shared_ptr<linphone::PayloadType> codec = getCodecFromMap(map);
codec->setRecvFmtp(::Utils::qStringToLinphoneString(recvFmtp));
codec->setRecvFmtp(::Utils::appStringToCoreString(recvFmtp));
map["recvFmtp"] = ::Utils::coreStringToAppString(codec->getRecvFmtp());
emit dataChanged(index(id, 0), index(id, 0));
......
......@@ -96,7 +96,7 @@ bool ConferenceHelperModel::ConferenceAddModel::addToConference (const QString &
qInfo() << QStringLiteral("Add sip address to conference: `%1`.").arg(sipAddress);
shared_ptr<linphone::Address> linphoneAddress = CoreManager::getInstance()->getCore()->interpretUrl(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
addToConferencePrivate(linphoneAddress);
......
......@@ -71,7 +71,7 @@ void ConferenceModel::startRecording () {
CoreManager *coreManager = CoreManager::getInstance();
coreManager->getCore()->startConferenceRecording(
::Utils::qStringToLinphoneString(
::Utils::appStringToCoreString(
QStringLiteral("%1%2.mkv")
.arg(coreManager->getSettingsModel()->getSavedVideosFolder())
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss"))
......
......@@ -55,7 +55,7 @@ inline shared_ptr<T> findBelCardValue (const list<shared_ptr<T> > &list, const s
template<class T>
inline shared_ptr<T> findBelCardValue (const list<shared_ptr<T> > &list, const QString &value) {
return findBelCardValue(list, ::Utils::qStringToLinphoneString(value));
return findBelCardValue(list, ::Utils::appStringToCoreString(value));
}
inline bool isLinphoneDesktopPhoto (const shared_ptr<belcard::BelCardPhoto> &photo) {
......@@ -100,7 +100,7 @@ static string interpretSipAddress (const QString &sipAddress) {
string out;
shared_ptr<linphone::Address> linphoneAddress = CoreManager::getInstance()->getCore()->interpretUrl(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
if (!linphoneAddress) {
......@@ -189,7 +189,7 @@ bool VcardModel::setAvatar (const QString &path) {
// 3. Update new photo.
if (!path.isEmpty()) {
shared_ptr<belcard::BelCardPhoto> photo = belcard::BelCardGeneric::create<belcard::BelCardPhoto>();
photo->setValue(VCARD_SCHEME + ::Utils::qStringToLinphoneString(fileId));
photo->setValue(VCARD_SCHEME + ::Utils::appStringToCoreString(fileId));
if (!belcard->addPhoto(photo)) {
file.remove();
......@@ -214,7 +214,7 @@ void VcardModel::setUsername (const QString &username) {
if (username.length() == 0 || username == getUsername())
return;
mVcard->setFullName(::Utils::qStringToLinphoneString(username));
mVcard->setFullName(::Utils::appStringToCoreString(username));
emit vcardUpdated();
}
......@@ -254,7 +254,7 @@ void VcardModel::setStreet (const QString &street) {
CHECK_VCARD_IS_WRITABLE(this);
shared_ptr<belcard::BelCardAddress> address = getOrCreateBelCardAddress(mVcard->getVcard());
address->setStreet(::Utils::qStringToLinphoneString(street));
address->setStreet(::Utils::appStringToCoreString(street));
emit vcardUpdated();
}
......@@ -262,7 +262,7 @@ void VcardModel::setLocality (const QString &locality) {
CHECK_VCARD_IS_WRITABLE(this);
shared_ptr<belcard::BelCardAddress> address = getOrCreateBelCardAddress(mVcard->getVcard());
address->setLocality(::Utils::qStringToLinphoneString(locality));
address->setLocality(::Utils::appStringToCoreString(locality));
emit vcardUpdated();
}
......@@ -270,7 +270,7 @@ void VcardModel::setPostalCode (const QString &postalCode) {
CHECK_VCARD_IS_WRITABLE(this);
shared_ptr<belcard::BelCardAddress> address = getOrCreateBelCardAddress(mVcard->getVcard());
address->setPostalCode(::Utils::qStringToLinphoneString(postalCode));
address->setPostalCode(::Utils::appStringToCoreString(postalCode));
emit vcardUpdated();
}
......@@ -278,7 +278,7 @@ void VcardModel::setCountry (const QString &country) {
CHECK_VCARD_IS_WRITABLE(this);
shared_ptr<belcard::BelCardAddress> address = getOrCreateBelCardAddress(mVcard->getVcard());
address->setCountry(::Utils::qStringToLinphoneString(country));
address->setCountry(::Utils::appStringToCoreString(country));
emit vcardUpdated();
}
......@@ -379,7 +379,7 @@ bool VcardModel::addCompany (const QString &company) {
return false;
shared_ptr<belcard::BelCardRole> value = belcard::BelCardGeneric::create<belcard::BelCardRole>();
value->setValue(::Utils::qStringToLinphoneString(company));
value->setValue(::Utils::appStringToCoreString(company));
if (!belcard->addRole(value)) {
qWarning() << QStringLiteral("Unable to add company on vcard: `%1`.").arg(company);
......@@ -433,7 +433,7 @@ bool VcardModel::addEmail (const QString &email) {
return false;
shared_ptr<belcard::BelCardEmail> value = belcard::BelCardGeneric::create<belcard::BelCardEmail>();
value->setValue(::Utils::qStringToLinphoneString(email));
value->setValue(::Utils::appStringToCoreString(email));
if (!belcard->addEmail(value)) {
qWarning() << QStringLiteral("Unable to add email on vcard: `%1`.").arg(email);
......@@ -488,7 +488,7 @@ bool VcardModel::addUrl (const QString &url) {
return false;
shared_ptr<belcard::BelCardURL> value = belcard::BelCardGeneric::create<belcard::BelCardURL>();
value->setValue(::Utils::qStringToLinphoneString(url));
value->setValue(::Utils::appStringToCoreString(url));
if (!belcard->addURL(value)) {
qWarning() << QStringLiteral("Unable to add url on vcard: `%1`.").arg(url);
......
......@@ -131,7 +131,7 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
// Sip address.
{
shared_ptr<linphone::Address> address = linphone::Factory::get()->createAddress(
::Utils::qStringToLinphoneString(literal)
::Utils::appStringToCoreString(literal)
);
if (!address) {
qWarning() << QStringLiteral("Unable to create sip address object from: `%1`.").arg(literal);
......@@ -145,15 +145,15 @@ bool AccountSettingsModel::addOrUpdateProxyConfig (
{
QString serverAddress = data["serverAddress"].toString();
if (proxyConfig->setServerAddr(::Utils::qStringToLinphoneString(serverAddress))) {
if (proxyConfig->setServerAddr(::Utils::appStringToCoreString(serverAddress))) {
qWarning() << QStringLiteral("Unable to add server address: `%1`.").arg(serverAddress);
return false;
}
}
proxyConfig->setPublishExpires(data["registrationDuration"].toInt());
proxyConfig->setRoute(::Utils::qStringToLinphoneString(data["route"].toString()));
proxyConfig->setContactParameters(::Utils::qStringToLinphoneString(data["contactParams"].toString()));
proxyConfig->setRoute(::Utils::appStringToCoreString(data["route"].toString()));
proxyConfig->setContactParameters(::Utils::appStringToCoreString(data["contactParams"].toString()));
proxyConfig->setAvpfRrInterval(static_cast<uint8_t>(data["avpfInterval"].toInt()));
proxyConfig->enableRegister(data["registerEnabled"].toBool());
proxyConfig->enablePublish(data["publishEnabled"].toBool());
......@@ -174,8 +174,8 @@ void AccountSettingsModel::addAuthInfo (
const QString &password,
const QString &userId
) {
authInfo->setPasswd(::Utils::qStringToLinphoneString(password));
authInfo->setUserid(::Utils::qStringToLinphoneString(userId));
authInfo->setPasswd(::Utils::appStringToCoreString(password));
authInfo->setUserid(::Utils::appStringToCoreString(userId));
CoreManager::getInstance()->getCore()->addAuthInfo(authInfo);
}
......@@ -199,7 +199,7 @@ void AccountSettingsModel::setUsername (const QString &username) {
shared_ptr<const linphone::Address> address = getUsedSipAddress();
shared_ptr<linphone::Address> newAddress = address->clone();
if (newAddress->setDisplayName(::Utils::qStringToLinphoneString(username))) {
if (newAddress->setDisplayName(::Utils::appStringToCoreString(username))) {
qWarning() << QStringLiteral("Unable to set displayName on sip address: `%1`.")
.arg(::Utils::coreStringToAppString(newAddress->asStringUriOnly()));
} else {
......@@ -231,7 +231,7 @@ void AccountSettingsModel::setPrimaryUsername (const QString &username) {
shared_ptr<linphone::Address> primary = core->getPrimaryContactParsed();
primary->setUsername(
username.isEmpty() ? "linphone" : ::Utils::qStringToLinphoneString(username)
username.isEmpty() ? "linphone" : ::Utils::appStringToCoreString(username)
);
core->setPrimaryContact(primary->asString());
......@@ -248,7 +248,7 @@ void AccountSettingsModel::setPrimaryDisplayName (const QString &displayName) {
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
shared_ptr<linphone::Address> primary = core->getPrimaryContactParsed();
primary->setDisplayName(::Utils::qStringToLinphoneString(displayName));
primary->setDisplayName(::Utils::appStringToCoreString(displayName));
core->setPrimaryContact(primary->asString());
emit accountSettingsUpdated();
......
......@@ -61,7 +61,7 @@ QString SettingsModel::getCaptureDevice () const {
void SettingsModel::setCaptureDevice (const QString &device) {
CoreManager::getInstance()->getCore()->setCaptureDevice(
::Utils::qStringToLinphoneString(device)
::Utils::appStringToCoreString(device)
);
emit captureDeviceChanged(device);
}
......@@ -76,7 +76,7 @@ QString SettingsModel::getPlaybackDevice () const {
void SettingsModel::setPlaybackDevice (const QString &device) {
CoreManager::getInstance()->getCore()->setPlaybackDevice(
::Utils::qStringToLinphoneString(device)
::Utils::appStringToCoreString(device)
);
emit playbackDeviceChanged(device);
}
......@@ -91,7 +91,7 @@ QString SettingsModel::getRingerDevice () const {
void SettingsModel::setRingerDevice (const QString &device) {
CoreManager::getInstance()->getCore()->setRingerDevice(
::Utils::qStringToLinphoneString(device)
::Utils::appStringToCoreString(device)
);
emit ringerDeviceChanged(device);
}
......@@ -106,7 +106,7 @@ void SettingsModel::setRingPath (const QString &path) {
QString cleanedPath = QDir::cleanPath(path);
CoreManager::getInstance()->getCore()->setRing(
::Utils::qStringToLinphoneString(cleanedPath)
::Utils::appStringToCoreString(cleanedPath)
);
emit ringPathChanged(cleanedPath);
......@@ -146,7 +146,7 @@ QString SettingsModel::getVideoDevice () const {
void SettingsModel::setVideoDevice (const QString &device) {
CoreManager::getInstance()->getCore()->setVideoDevice(
::Utils::qStringToLinphoneString(device)
::Utils::appStringToCoreString(device)
);
emit videoDeviceChanged(device);
}
......@@ -161,7 +161,7 @@ QString SettingsModel::getVideoPreset () const {
void SettingsModel::setVideoPreset (const QString &preset) {
CoreManager::getInstance()->getCore()->setVideoPreset(
::Utils::qStringToLinphoneString(preset)
::Utils::appStringToCoreString(preset)
);
emit videoPresetChanged(preset);
}
......@@ -243,7 +243,7 @@ QString SettingsModel::getFileTransferUrl () const {
void SettingsModel::setFileTransferUrl (const QString &url) {
CoreManager::getInstance()->getCore()->setFileTransferServer(
::Utils::qStringToLinphoneString(url)
::Utils::appStringToCoreString(url)
);
emit fileTransferUrlChanged(url);
}
......@@ -530,7 +530,7 @@ QString SettingsModel::getStunServer () const {
void SettingsModel::setStunServer (const QString &stunServer) {
CoreManager::getInstance()->getCore()->getNatPolicy()->setStunServer(
::Utils::qStringToLinphoneString(stunServer)
::Utils::appStringToCoreString(stunServer)
);
}
......@@ -544,7 +544,7 @@ QString SettingsModel::getTurnUser () const {
void SettingsModel::setTurnUser (const QString &user) {
CoreManager::getInstance()->getCore()->getNatPolicy()->setStunServerUsername(
::Utils::qStringToLinphoneString(user)
::Utils::appStringToCoreString(user)
);
emit turnUserChanged(user);
......@@ -569,12 +569,12 @@ void SettingsModel::setTurnPassword (const QString &password) {
if (authInfo) {
shared_ptr<linphone::AuthInfo> clonedAuthInfo = authInfo->clone();
clonedAuthInfo->setPasswd(::Utils::qStringToLinphoneString(password));
clonedAuthInfo->setPasswd(::Utils::appStringToCoreString(password));
core->removeAuthInfo(authInfo);
core->addAuthInfo(clonedAuthInfo);
} else {
authInfo = linphone::Factory::get()->createAuthInfo(username, username, ::Utils::qStringToLinphoneString(password), "", "", "");
authInfo = linphone::Factory::get()->createAuthInfo(username, username, ::Utils::appStringToCoreString(password), "", "", "");
core->addAuthInfo(authInfo);
}
......@@ -625,7 +625,7 @@ QString SettingsModel::getSavedScreenshotsFolder () const {
void SettingsModel::setSavedScreenshotsFolder (const QString &folder) {
QString cleanedFolder = QDir::cleanPath(folder) + QDir::separator();
mConfig->setString(UI_SECTION, "saved_screenshots_folder", ::Utils::qStringToLinphoneString(cleanedFolder));
mConfig->setString(UI_SECTION, "saved_screenshots_folder", ::Utils::appStringToCoreString(cleanedFolder));
emit savedScreenshotsFolderChanged(cleanedFolder);
}
......@@ -642,7 +642,7 @@ QString SettingsModel::getSavedVideosFolder () const {
void SettingsModel::setSavedVideosFolder (const QString &folder) {
QString _folder = QDir::cleanPath(folder) + QDir::separator();
mConfig->setString(UI_SECTION, "saved_videos_folder", ::Utils::qStringToLinphoneString(_folder));
mConfig->setString(UI_SECTION, "saved_videos_folder", ::Utils::appStringToCoreString(_folder));
emit savedVideosFolderChanged(_folder);
}
......@@ -653,7 +653,7 @@ QString SettingsModel::getRemoteProvisioning () const {
}
void SettingsModel::setRemoteProvisioning (const QString &remoteProvisioning) {
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(::Utils::qStringToLinphoneString(remoteProvisioning)))
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(::Utils::appStringToCoreString(remoteProvisioning)))
emit remoteProvisioningChanged(remoteProvisioning);
else
emit remoteProvisioningNotChanged(remoteProvisioning);
......
......@@ -142,7 +142,7 @@ SipAddressObserver *SipAddressesModel::getSipAddressObserver (const QString &sip
QString SipAddressesModel::interpretUrl (const QString &sipAddress) const {
shared_ptr<linphone::Address> lAddress = CoreManager::getInstance()->getCore()->interpretUrl(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
return lAddress ? ::Utils::coreStringToAppString(lAddress->asStringUriOnly()) : "";
......@@ -150,7 +150,7 @@ QString SipAddressesModel::interpretUrl (const QString &sipAddress) const {
QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress) const {
const shared_ptr<const linphone::Address> address = linphone::Factory::get()->createAddress(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
if (!address)
......@@ -172,7 +172,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress
QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress, const QString &transport) const {
shared_ptr<linphone::Address> address = linphone::Factory::get()->createAddress(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
if (!address)
......@@ -193,7 +193,7 @@ QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress,
bool SipAddressesModel::sipAddressIsValid (const QString &sipAddress) {
return !!linphone::Factory::get()->createAddress(
::Utils::qStringToLinphoneString(sipAddress)
::Utils::appStringToCoreString(sipAddress)
);
}
......
......@@ -97,7 +97,7 @@ void SoundPlayer::play () {
if (
(mPlaybackState == SoundPlayer::StoppedState || mPlaybackState == SoundPlayer::ErrorState) &&
mInternalPlayer->open(::Utils::qStringToLinphoneString(mSource))
mInternalPlayer->open(::Utils::appStringToCoreString(mSource))
) {
qWarning() << QStringLiteral("Unable to open: `%1`").arg(mSource);
return;
......
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