1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
tux3 2015-12-19 05:00:23 +01:00
parent 9b9fa13636
commit 489016f358
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -146,13 +146,14 @@ QList<History::HistMessage> History::getChatHistory(const QString &friendPk, con
auto rowCallback = [&messages](const QVector<QVariant>& row)
{
// dispName and message could have null bytes, QString::fromUtf8 truncates on null bytes so we strip them
messages += {row[0].toLongLong(),
row[1].isNull(),
QDateTime::fromMSecsSinceEpoch(row[2].toLongLong()),
row[3].toString(),
row[4].toString(),
QString::fromUtf8(row[4].toByteArray().replace('\0',"")),
row[5].toString(),
row[6].toString()};
QString::fromUtf8(row[6].toByteArray().replace('\0',""))};
};
// Don't forget to update the rowCallback if you change the selected columns!