Commit b74f36a7 authored by Wescoeur's avatar Wescoeur

feat(App): replace "" by QString("") when possible

parent a292d0ef
...@@ -230,7 +230,7 @@ void App::initContentApp () { ...@@ -230,7 +230,7 @@ void App::initContentApp () {
QString App::getCommandArgument () { QString App::getCommandArgument () {
// TODO: Remove me when cmd option will be available. // TODO: Remove me when cmd option will be available.
return ""; return QString("");
// return mParser->value("cmd"); // return mParser->value("cmd");
} }
...@@ -542,7 +542,7 @@ void App::openAppAfterInit () { ...@@ -542,7 +542,7 @@ void App::openAppAfterInit () {
{ {
shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig(); shared_ptr<linphone::Config> config = CoreManager::getInstance()->getCore()->getConfig();
if (config->getInt(SettingsModel::UI_SECTION, "force_assistant_at_startup", 1)) { if (config->getInt(SettingsModel::UI_SECTION, "force_assistant_at_startup", 1)) {
QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, "Assistant"), Q_ARG(QVariant, "")); QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, "Assistant"), Q_ARG(QVariant, QString("")));
config->setInt(SettingsModel::UI_SECTION, "force_assistant_at_startup", 0); config->setInt(SettingsModel::UI_SECTION, "force_assistant_at_startup", 0);
} }
} }
......
...@@ -46,7 +46,7 @@ private: ...@@ -46,7 +46,7 @@ private:
const string & const string &
) override { ) override {
if (status == linphone::AccountCreatorStatusAccountCreated) if (status == linphone::AccountCreatorStatusAccountCreated)
emit mAssistant->createStatusChanged(""); emit mAssistant->createStatusChanged(QString(""));
else { else {
if (status == linphone::AccountCreatorStatusRequestFailed) if (status == linphone::AccountCreatorStatusRequestFailed)
emit mAssistant->createStatusChanged(tr("requestFailed")); emit mAssistant->createStatusChanged(tr("requestFailed"));
...@@ -66,7 +66,7 @@ private: ...@@ -66,7 +66,7 @@ private:
shared_ptr<linphone::ProxyConfig> proxyConfig = creator->createProxyConfig(); shared_ptr<linphone::ProxyConfig> proxyConfig = creator->createProxyConfig();
Q_CHECK_PTR(proxyConfig); Q_CHECK_PTR(proxyConfig);
emit mAssistant->loginStatusChanged(""); emit mAssistant->loginStatusChanged(QString(""));
} else { } else {
if (status == linphone::AccountCreatorStatusRequestFailed) if (status == linphone::AccountCreatorStatusRequestFailed)
emit mAssistant->loginStatusChanged(tr("requestFailed")); emit mAssistant->loginStatusChanged(tr("requestFailed"));
...@@ -89,7 +89,7 @@ private: ...@@ -89,7 +89,7 @@ private:
Q_CHECK_PTR(proxyConfig); Q_CHECK_PTR(proxyConfig);
} }
emit mAssistant->activateStatusChanged(""); emit mAssistant->activateStatusChanged(QString(""));
} else { } else {
if (status == linphone::AccountCreatorStatusRequestFailed) if (status == linphone::AccountCreatorStatusRequestFailed)
emit mAssistant->activateStatusChanged(tr("requestFailed")); emit mAssistant->activateStatusChanged(tr("requestFailed"));
...@@ -107,7 +107,7 @@ private: ...@@ -107,7 +107,7 @@ private:
shared_ptr<linphone::ProxyConfig> proxyConfig = creator->createProxyConfig(); shared_ptr<linphone::ProxyConfig> proxyConfig = creator->createProxyConfig();
Q_CHECK_PTR(proxyConfig); Q_CHECK_PTR(proxyConfig);
emit mAssistant->activateStatusChanged(""); emit mAssistant->activateStatusChanged(QString(""));
} else { } else {
if (status == linphone::AccountCreatorStatusRequestFailed) if (status == linphone::AccountCreatorStatusRequestFailed)
emit mAssistant->activateStatusChanged(tr("requestFailed")); emit mAssistant->activateStatusChanged(tr("requestFailed"));
...@@ -122,7 +122,7 @@ private: ...@@ -122,7 +122,7 @@ private:
const string & const string &
) override { ) override {
if (status == linphone::AccountCreatorStatusRequestOk) { if (status == linphone::AccountCreatorStatusRequestOk) {
emit mAssistant->recoverStatusChanged(""); emit mAssistant->recoverStatusChanged(QString(""));
} else { } else {
if (status == linphone::AccountCreatorStatusRequestFailed) if (status == linphone::AccountCreatorStatusRequestFailed)
emit mAssistant->recoverStatusChanged(tr("requestFailed")); emit mAssistant->recoverStatusChanged(tr("requestFailed"));
...@@ -170,13 +170,13 @@ void AssistantModel::login () { ...@@ -170,13 +170,13 @@ void AssistantModel::login () {
} }
void AssistantModel::reset () { void AssistantModel::reset () {
mCountryCode = ""; mCountryCode = QString("");
mAccountCreator->reset(); mAccountCreator->reset();
emit emailChanged("", ""); emit emailChanged(QString(""), QString(""));
emit passwordChanged("", ""); emit passwordChanged(QString(""), QString(""));
emit phoneNumberChanged("", ""); emit phoneNumberChanged(QString(""), QString(""));
emit usernameChanged("", ""); emit usernameChanged(QString(""), QString(""));
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -597,7 +597,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt ...@@ -597,7 +597,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
statsList << ::createStat(tr("callStatsCodec"), payloadType statsList << ::createStat(tr("callStatsCodec"), payloadType
? QStringLiteral("%1 / %2kHz").arg(Utils::coreStringToAppString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000) ? QStringLiteral("%1 / %2kHz").arg(Utils::coreStringToAppString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000)
: ""); : QString(""));
statsList << ::createStat(tr("callStatsUploadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getUploadBandwidth()))); statsList << ::createStat(tr("callStatsUploadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getUploadBandwidth())));
statsList << ::createStat(tr("callStatsDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getDownloadBandwidth()))); statsList << ::createStat(tr("callStatsDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getDownloadBandwidth())));
statsList << ::createStat(tr("callStatsIceState"), iceStateToString(callStats->getIceState())); statsList << ::createStat(tr("callStatsIceState"), iceStateToString(callStats->getIceState()));
......
...@@ -181,7 +181,7 @@ void ContactsListModel::cleanAvatars () { ...@@ -181,7 +181,7 @@ void ContactsListModel::cleanAvatars () {
for (const auto &contact : mList) { for (const auto &contact : mList) {
VcardModel *vcardModel = contact->cloneVcardModel(); VcardModel *vcardModel = contact->cloneVcardModel();
vcardModel->setAvatar(""); vcardModel->setAvatar(QString(""));
contact->setVcardModel(vcardModel); contact->setVcardModel(vcardModel);
} }
} }
......
...@@ -91,7 +91,7 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li ...@@ -91,7 +91,7 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
const shared_ptr<const linphone::Address> address = proxyConfig->getIdentityAddress(); const shared_ptr<const linphone::Address> address = proxyConfig->getIdentityAddress();
map["sipAddress"] = address map["sipAddress"] = address
? ::Utils::coreStringToAppString(proxyConfig->getIdentityAddress()->asStringUriOnly()) ? ::Utils::coreStringToAppString(proxyConfig->getIdentityAddress()->asStringUriOnly())
: ""; : QString("");
} }
map["serverAddress"] = ::Utils::coreStringToAppString(proxyConfig->getServerAddr()); map["serverAddress"] = ::Utils::coreStringToAppString(proxyConfig->getServerAddr());
......
...@@ -583,7 +583,7 @@ QString SettingsModel::getTurnPassword () const { ...@@ -583,7 +583,7 @@ QString SettingsModel::getTurnPassword () const {
shared_ptr<linphone::NatPolicy> natPolicy = core->getNatPolicy(); shared_ptr<linphone::NatPolicy> natPolicy = core->getNatPolicy();
shared_ptr<const linphone::AuthInfo> authInfo = core->findAuthInfo(natPolicy->getStunServerUsername(), "", ""); shared_ptr<const linphone::AuthInfo> authInfo = core->findAuthInfo(natPolicy->getStunServerUsername(), "", "");
return authInfo ? ::Utils::coreStringToAppString(authInfo->getPasswd()) : ""; return authInfo ? ::Utils::coreStringToAppString(authInfo->getPasswd()) : QString("");
} }
void SettingsModel::setTurnPassword (const QString &password) { void SettingsModel::setTurnPassword (const QString &password) {
......
...@@ -183,7 +183,7 @@ QString SipAddressesModel::interpretUrl (const QString &sipAddress) { ...@@ -183,7 +183,7 @@ QString SipAddressesModel::interpretUrl (const QString &sipAddress) {
::Utils::appStringToCoreString(sipAddress) ::Utils::appStringToCoreString(sipAddress)
); );
return lAddress ? ::Utils::coreStringToAppString(lAddress->asStringUriOnly()) : ""; return lAddress ? ::Utils::coreStringToAppString(lAddress->asStringUriOnly()) : QString("");
} }
QString SipAddressesModel::interpretUrl (const QUrl &sipAddress) { QString SipAddressesModel::interpretUrl (const QUrl &sipAddress) {
......
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