Commit f4454a9b authored by Andrew Branson's avatar Andrew Branson

Merge branch 'status' into 'master'

[qmf] Insert status as QUINT64 in mailmessages database, not int. Contributes to MER#1780

See merge request !8
parents ee10eded 0a18e27d
...@@ -6739,7 +6739,7 @@ QMailStorePrivate::AttemptResult QMailStorePrivate::attemptAddMessage(QMailMessa ...@@ -6739,7 +6739,7 @@ QMailStorePrivate::AttemptResult QMailStorePrivate::attemptAddMessage(QMailMessa
values.insert("recipients", recipients.join(",")); values.insert("recipients", recipients.join(","));
values.insert("subject", metaData->subject()); values.insert("subject", metaData->subject());
values.insert("stamp", QMailTimeStamp(metaData->date()).toUTC()); 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("parentaccountid", metaData->parentAccountId().toULongLong());
values.insert("mailfile", ::contentUri(*metaData)); values.insert("mailfile", ::contentUri(*metaData));
values.insert("serveruid", metaData->serverUid()); values.insert("serveruid", metaData->serverUid());
......
...@@ -407,6 +407,8 @@ void tst_QMailStore::addMessage() ...@@ -407,6 +407,8 @@ void tst_QMailStore::addMessage()
message1.setBody(QMailMessageBody::fromData(QString("Hi"), QMailMessageContentType("text/plain"), QMailMessageBody::SevenBit)); message1.setBody(QMailMessageBody::fromData(QString("Hi"), QMailMessageContentType("text/plain"), QMailMessageBody::SevenBit));
message1.setStatus(QMailMessage::Incoming, true); message1.setStatus(QMailMessage::Incoming, true);
message1.setStatus(QMailMessage::Read, 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("question", "What is your dog's name?");
message1.setCustomField("answer", "Fido"); 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