mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-26 00:08:13 +00:00
Fix crash on old messages
This commit is contained in:
parent
0db46dd918
commit
768ee18942
2 changed files with 5 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ QString DefaultTranslator::translate (
|
|||
QString translation = QTranslator::translate(context, sourceText, disambiguation, n);
|
||||
|
||||
if (translation.length() == 0 && mContexts.contains(context))
|
||||
qWarning() << QStringLiteral("Unable to find a translation. (context=%1, label=%2, disambiguation=%3)")
|
||||
qDebug() << QStringLiteral("Unable to find a translation. (context=%1, label=%2, disambiguation=%3)")
|
||||
.arg(context).arg(sourceText).arg(disambiguation);
|
||||
|
||||
return translation;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,10 @@ ChatMessageModel::AppDataManager::AppDataManager(const QString& appdata){
|
|||
if(!appdata.isEmpty()){
|
||||
for(QString pair : appdata.split(';')){
|
||||
QStringList fields = pair.split(':');
|
||||
mData[fields[1]] = fields[0];
|
||||
if(fields.size() > 1)
|
||||
mData[fields[1]] = fields[0];
|
||||
else
|
||||
qWarning() << "Bad or too old appdata. It need a compatibility parsing : " << appdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue