Commit 9d3d707c authored by Martin Straka's avatar Martin Straka
Browse files

Use recipient name and address from contacts if db search fails.

parent 5e82f76b
......@@ -579,8 +579,7 @@ void IsdsWrapper::addRecipient(const QmlAcntId *qAcntId, const QString &dbID,
canUseInitReply, m_pdzInfos);
}
void IsdsWrapper::addRecipientIntoModel(const DataboxModelEntry &dbEntry,
int errCode)
void IsdsWrapper::addRecipientIntoModel(DataboxModelEntry dbEntry, int errCode)
{
if (Q_UNLIKELY((m_databoxModel == Q_NULLPTR)
|| (dbEntry.dbID().isEmpty()))) {
......@@ -655,6 +654,14 @@ void IsdsWrapper::addRecipientIntoModel(const DataboxModelEntry &dbEntry,
break;
}
DataboxModelEntry modelEntry(*m_databoxModel->entry(dbEntry.dbID()));
if (dbEntry.dbName().isEmpty()) {
dbEntry.setDbName(modelEntry.dbName());
}
if (dbEntry.dbAddress().isEmpty()) {
dbEntry.setDbAddress(modelEntry.dbAddress());
}
/* Remove temporary recipient data from model. */
m_databoxModel->removeEntry(dbEntry.dbID());
/* Add updated recipient data into model. */
......
......@@ -500,8 +500,7 @@ public slots:
* @param[in] dbEntry Data box entry.
* @param[in] errCode Error code.
*/
void addRecipientIntoModel(const DataboxModelEntry &dbEntry,
int errCode);
void addRecipientIntoModel(DataboxModelEntry dbEntry, int errCode);
signals:
/*!
......
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