Commit 0a18e27d authored by Damien Caliste's avatar Damien Caliste

[qmf] Insert status as QINT64 in mailmessages database, not int.

parent 8bb3bb88
......@@ -6739,7 +6739,7 @@ QMailStorePrivate::AttemptResult QMailStorePrivate::attemptAddMessage(QMailMessa
values.insert("recipients", recipients.join(","));
values.insert("subject", metaData->subject());
values.insert("stamp", QMailTimeStamp(metaData->date()).toUTC());
values.insert("status", static_cast<int>(metaData->status()));
values.insert("status", static_cast<qint64>(metaData->status()));
values.insert("parentaccountid", metaData->parentAccountId().toULongLong());
values.insert("mailfile", ::contentUri(*metaData));
values.insert("serveruid", metaData->serverUid());
......
......@@ -407,6 +407,8 @@ void tst_QMailStore::addMessage()
message1.setBody(QMailMessageBody::fromData(QString("Hi"), QMailMessageContentType("text/plain"), QMailMessageBody::SevenBit));
message1.setStatus(QMailMessage::Incoming, true);
message1.setStatus(QMailMessage::Read, true);
// Add a fictitious large flag value to check that quint64 is preserved.
message1.setStatus(quint64(1) << 63, true);
message1.setCustomField("question", "What is your dog's name?");
message1.setCustomField("answer", "Fido");
......
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