Commit 3dd47411 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): `QString("")` is more efficient than `QStringLiteral("")`

parent 271f771c
...@@ -113,13 +113,13 @@ const QString Cli::parseFunctionName (const QString &command) noexcept { ...@@ -113,13 +113,13 @@ const QString Cli::parseFunctionName (const QString &command) noexcept {
const QStringList &texts = mRegExpFunctionName.capturedTexts(); const QStringList &texts = mRegExpFunctionName.capturedTexts();
if (texts.size() < 2) { if (texts.size() < 2) {
qWarning() << QStringLiteral("Unable to parse function name of command: `%1`.").arg(command); qWarning() << QStringLiteral("Unable to parse function name of command: `%1`.").arg(command);
return QStringLiteral(""); return QString("");
} }
const QString functionName = texts[1]; const QString functionName = texts[1];
if (!mCommands.contains(functionName)) { if (!mCommands.contains(functionName)) {
qWarning() << QStringLiteral("This command doesn't exist: `%1`.").arg(functionName); qWarning() << QStringLiteral("This command doesn't exist: `%1`.").arg(functionName);
return QStringLiteral(""); return QString("");
} }
return functionName; return functionName;
......
...@@ -58,7 +58,7 @@ QString DefaultTranslator::translate ( ...@@ -58,7 +58,7 @@ QString DefaultTranslator::translate (
int n int n
) const { ) const {
if (!context) if (!context)
return QStringLiteral(""); return QString("");
QString translation = QTranslator::translate(context, sourceText, disambiguation, n); QString translation = QTranslator::translate(context, sourceText, disambiguation, n);
......
...@@ -527,7 +527,7 @@ QString CallModel::getSecuredString () const { ...@@ -527,7 +527,7 @@ QString CallModel::getSecuredString () const {
break; break;
} }
return QStringLiteral(""); return QString("");
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -136,7 +136,7 @@ QString VcardModel::getAvatar () const { ...@@ -136,7 +136,7 @@ QString VcardModel::getAvatar () const {
// No path found. // No path found.
if (!photo) if (!photo)
return QStringLiteral(""); return QString("");
// Returns right path. // Returns right path.
return QStringLiteral("image://%1/%2").arg(AvatarProvider::PROVIDER_ID).arg( return QStringLiteral("image://%1/%2").arg(AvatarProvider::PROVIDER_ID).arg(
......
...@@ -68,5 +68,5 @@ QString Presence::getPresenceLevelIconName (const PresenceLevel &level) { ...@@ -68,5 +68,5 @@ QString Presence::getPresenceLevelIconName (const PresenceLevel &level) {
return QStringLiteral("led_white"); return QStringLiteral("led_white");
} }
return QStringLiteral(""); return QString("");
} }
...@@ -154,7 +154,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress ...@@ -154,7 +154,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress
); );
if (!address) if (!address)
return QStringLiteral(""); return QString("");
switch (address->getTransport()) { switch (address->getTransport()) {
case linphone::TransportTypeUdp: case linphone::TransportTypeUdp:
...@@ -167,7 +167,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress ...@@ -167,7 +167,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress
return QStringLiteral("DTLS"); return QStringLiteral("DTLS");
} }
return QStringLiteral(""); return QString("");
} }
QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress, const QString &transport) const { QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress, const QString &transport) const {
......
...@@ -65,7 +65,7 @@ QString Utils::getSafeFilePath (const QString &filePath, bool *soFarSoGood) { ...@@ -65,7 +65,7 @@ QString Utils::getSafeFilePath (const QString &filePath, bool *soFarSoGood) {
if (soFarSoGood) if (soFarSoGood)
*soFarSoGood = false; *soFarSoGood = false;
return QStringLiteral(""); return QString("");
} }
#undef SAFE_FILE_PATH_LIMIT #undef SAFE_FILE_PATH_LIMIT
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