Skip to content
Snippets Groups Projects
Commit 501b1718 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[ #7887 ] Fix warning

parent 4d97ceb0
No related branches found
No related tags found
No related merge requests found
...@@ -125,7 +125,7 @@ const QString& Account::getAccountId() const ...@@ -125,7 +125,7 @@ const QString& Account::getAccountId() const
qDebug() << "Error : getting AccountId of a new account."; qDebug() << "Error : getting AccountId of a new account.";
if (!m_pAccountId) { if (!m_pAccountId) {
qDebug() << "Account not configured"; qDebug() << "Account not configured";
return ""; //WARNING May explode return EMPTY_STRING; //WARNING May explode
} }
return *m_pAccountId; return *m_pAccountId;
...@@ -148,13 +148,13 @@ const QString& Account::getAccountDetail(const QString& param) const ...@@ -148,13 +148,13 @@ const QString& Account::getAccountDetail(const QString& param) const
{ {
if (!m_pAccountDetails) { if (!m_pAccountDetails) {
qDebug() << "The account list is not set"; qDebug() << "The account list is not set";
return NULL; //May crash, but better than crashing now return EMPTY_STRING; //May crash, but better than crashing now
} }
if (m_pAccountDetails->find(param) != m_pAccountDetails->end()) if (m_pAccountDetails->find(param) != m_pAccountDetails->end())
return (*m_pAccountDetails)[param]; return (*m_pAccountDetails)[param];
else { else {
qDebug() << "Account details not found, there is " << m_pAccountDetails->count() << " details available"; qDebug() << "Account details not found, there is " << m_pAccountDetails->count() << " details available";
return NULL; return EMPTY_STRING;
} }
} }
......
...@@ -305,6 +305,9 @@ typedef enum ...@@ -305,6 +305,9 @@ typedef enum
CALL_STATE_ERROR = 10 CALL_STATE_ERROR = 10
} call_state; } call_state;
static const QString empty("");
#define EMPTY_STRING empty
/** MIME API */ /** MIME API */
#define MIME_CALLID "text/sflphone.call.id" #define MIME_CALLID "text/sflphone.call.id"
#define MIME_CONTACT "text/sflphone.contact" #define MIME_CONTACT "text/sflphone.contact"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment