diff options
author | Damien Caliste <dcaliste@free.fr> | 2018-09-04 17:08:58 +0200 |
---|---|---|
committer | Pekka Vuorela <pvuorela@iki.fi> | 2018-09-12 14:19:16 +0000 |
commit | c68ebe151653dabf207f2ec9681449ad812a34f6 (patch) | |
tree | 7fe854d9e9155c924dcd540eb03724b66331a9a7 /tests | |
parent | e33cec1be9bc6f3e0521c1ba452f11fda6033744 (diff) |
Insert status as QUINT64 in mailmessages database, not int
SQlite is storing signed 64bit integers. With the static_cast<int>, the value
is truncated. It is not necessary to cast the value as a qint64 neither since the
sign-bit is not used anyway to store a flag (there are maximum 63 flags).
Change-Id: Ia2a093ec2e14fe1ee8222cb01ce1b42fafcb90af
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tst_qmailstore/tst_qmailstore.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tst_qmailstore/tst_qmailstore.cpp b/tests/tst_qmailstore/tst_qmailstore.cpp index 363a34e2..176a9cfd 100644 --- a/tests/tst_qmailstore/tst_qmailstore.cpp +++ b/tests/tst_qmailstore/tst_qmailstore.cpp @@ -368,6 +368,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) << 62, true); message1.setCustomField("question", "What is your dog's name?"); message1.setCustomField("answer", "Fido"); |