Commit cfcd0456 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): explicit usage of global namespace on static functions

parent 06c97e4c
...@@ -71,8 +71,8 @@ QRegExp Cli::mRegExpArgs("(?:(?:(\\w+)\\s*)=\\s*(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\ ...@@ -71,8 +71,8 @@ QRegExp Cli::mRegExpArgs("(?:(?:(\\w+)\\s*)=\\s*(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\
QRegExp Cli::mRegExpFunctionName("^\\s*(\\w+)\\s*"); QRegExp Cli::mRegExpFunctionName("^\\s*(\\w+)\\s*");
Cli::Cli (QObject *parent) : QObject(parent) { Cli::Cli (QObject *parent) : QObject(parent) {
addCommand("show", tr("showFunctionDescription"), cliShow); addCommand("show", tr("showFunctionDescription"), ::cliShow);
addCommand("call", tr("showFunctionCall"), cliCall, { addCommand("call", tr("showFunctionCall"), ::cliCall, {
{ "sip-address", {} } { "sip-address", {} }
}); });
} }
......
...@@ -165,7 +165,7 @@ void Logger::init () { ...@@ -165,7 +165,7 @@ void Logger::init () {
linphone_core_set_log_level(ORTP_MESSAGE); linphone_core_set_log_level(ORTP_MESSAGE);
linphone_core_set_log_handler([](const char *domain, OrtpLogLevel type, const char *fmt, va_list args) { linphone_core_set_log_handler([](const char *domain, OrtpLogLevel type, const char *fmt, va_list args) {
if (mInstance->isVerbose()) if (mInstance->isVerbose())
linphoneLog(domain, type, fmt, args); ::linphoneLog(domain, type, fmt, args);
}); });
linphone_core_set_log_collection_path(Paths::getLogsDirPath().c_str()); linphone_core_set_log_collection_path(Paths::getLogsDirPath().c_str());
......
...@@ -275,26 +275,26 @@ void Paths::migrate () { ...@@ -275,26 +275,26 @@ void Paths::migrate () {
QString oldPath = oldBaseDir + "/.linphonerc"; QString oldPath = oldBaseDir + "/.linphonerc";
if (!::filePathExists(newPath) && ::filePathExists(oldPath)) { if (!::filePathExists(newPath) && ::filePathExists(oldPath)) {
migrateConfigurationFile(oldPath, newPath); ::migrateConfigurationFile(oldPath, newPath);
/* Define RLS uri so that presence switches from peer-to-peer mode to list mode. */ /* Define RLS uri so that presence switches from peer-to-peer mode to list mode. */
setRlsUri(newPath); ::setRlsUri(newPath);
} }
newPath = ::getAppCallHistoryFilePath(); newPath = ::getAppCallHistoryFilePath();
oldPath = oldBaseDir + "/.linphone-call-history.db"; oldPath = oldBaseDir + "/.linphone-call-history.db";
if (!::filePathExists(newPath) && ::filePathExists(oldPath)) if (!::filePathExists(newPath) && ::filePathExists(oldPath))
migrateFile(oldPath, newPath); ::migrateFile(oldPath, newPath);
newPath = ::getAppFriendsFilePath(); newPath = ::getAppFriendsFilePath();
oldPath = oldBaseDir + "/.linphone-friends.db"; oldPath = oldBaseDir + "/.linphone-friends.db";
if (!::filePathExists(newPath) && ::filePathExists(oldPath)) if (!::filePathExists(newPath) && ::filePathExists(oldPath))
migrateFile(oldPath, newPath); ::migrateFile(oldPath, newPath);
newPath = ::getAppMessageHistoryFilePath(); newPath = ::getAppMessageHistoryFilePath();
oldPath = oldBaseDir + "/.linphone-history.db"; oldPath = oldBaseDir + "/.linphone-history.db";
if (!::filePathExists(newPath) && ::filePathExists(oldPath)) if (!::filePathExists(newPath) && ::filePathExists(oldPath))
migrateFile(oldPath, newPath); ::migrateFile(oldPath, newPath);
} }
...@@ -121,7 +121,7 @@ VcardModel::~VcardModel () { ...@@ -121,7 +121,7 @@ VcardModel::~VcardModel () {
if (!mIsReadOnly) { if (!mIsReadOnly) {
qInfo() << QStringLiteral("Destroy detached vcard:") << this; qInfo() << QStringLiteral("Destroy detached vcard:") << this;
if (!mAvatarIsReadOnly) if (!mAvatarIsReadOnly)
removeBelcardPhoto(mVcard->getVcard()); ::removeBelcardPhoto(mVcard->getVcard());
} else } else
qInfo() << QStringLiteral("Destroy attached vcard:") << this; qInfo() << QStringLiteral("Destroy attached vcard:") << this;
} }
...@@ -130,7 +130,7 @@ VcardModel::~VcardModel () { ...@@ -130,7 +130,7 @@ VcardModel::~VcardModel () {
QString VcardModel::getAvatar () const { QString VcardModel::getAvatar () const {
// Find desktop avatar. // Find desktop avatar.
shared_ptr<belcard::BelCardPhoto> photo = findBelcardPhoto(mVcard->getVcard()); shared_ptr<belcard::BelCardPhoto> photo = ::findBelcardPhoto(mVcard->getVcard());
// No path found. // No path found.
if (!photo) if (!photo)
...@@ -181,7 +181,7 @@ bool VcardModel::setAvatar (const QString &path) { ...@@ -181,7 +181,7 @@ bool VcardModel::setAvatar (const QString &path) {
} }
// 2. Remove oldest photo. // 2. Remove oldest photo.
removeBelcardPhoto(belcard, mAvatarIsReadOnly); ::removeBelcardPhoto(belcard, mAvatarIsReadOnly);
mAvatarIsReadOnly = false; mAvatarIsReadOnly = false;
// 3. Update new photo. // 3. Update new photo.
...@@ -303,7 +303,7 @@ QVariantList VcardModel::getSipAddresses () const { ...@@ -303,7 +303,7 @@ QVariantList VcardModel::getSipAddresses () const {
bool VcardModel::addSipAddress (const QString &sipAddress) { bool VcardModel::addSipAddress (const QString &sipAddress) {
CHECK_VCARD_IS_WRITABLE(this); CHECK_VCARD_IS_WRITABLE(this);
string interpretedSipAddress = interpretSipAddress(sipAddress); string interpretedSipAddress = ::interpretSipAddress(sipAddress);
if (interpretedSipAddress.empty()) if (interpretedSipAddress.empty())
return false; return false;
...@@ -332,7 +332,7 @@ void VcardModel::removeSipAddress (const QString &sipAddress) { ...@@ -332,7 +332,7 @@ void VcardModel::removeSipAddress (const QString &sipAddress) {
shared_ptr<belcard::BelCard> belcard = mVcard->getVcard(); shared_ptr<belcard::BelCard> belcard = mVcard->getVcard();
list<shared_ptr<belcard::BelCardImpp> > addresses = belcard->getImpp(); list<shared_ptr<belcard::BelCardImpp> > addresses = belcard->getImpp();
shared_ptr<belcard::BelCardImpp> value = ::findBelCardValue( shared_ptr<belcard::BelCardImpp> value = ::findBelCardValue(
addresses, ::Utils::coreStringToAppString(interpretSipAddress(sipAddress)) addresses, ::Utils::coreStringToAppString(::interpretSipAddress(sipAddress))
); );
if (!value) { if (!value) {
......
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