Commit 16e178bf authored by Raine Makelainen's avatar Raine Makelainen

Merge branch 'jb40471' into 'master'

[qmf] Initialize messagelistmodel before processing add/remove/update of messages. Contributes to JB#40471

See merge request !12
parents adf8ca12 e6e12874
...@@ -306,10 +306,8 @@ bool QMailMessageListModelPrivate::processMessagesAdded(const QMailMessageIdList ...@@ -306,10 +306,8 @@ bool QMailMessageListModelPrivate::processMessagesAdded(const QMailMessageIdList
return true; return true;
} }
if (!_initialised) { init();
init();
}
// Find if and where these messages should be added // Find if and where these messages should be added
if (!addMessages(ids)) { if (!addMessages(ids)) {
return false; return false;
...@@ -393,14 +391,12 @@ bool QMailMessageListModelPrivate::processMessagesUpdated(const QMailMessageIdLi ...@@ -393,14 +391,12 @@ bool QMailMessageListModelPrivate::processMessagesUpdated(const QMailMessageIdLi
return true; return true;
} }
init();
// Find if and where these messages should be added/removed/updated // Find if and where these messages should be added/removed/updated
if (!updateMessages(ids)) { if (!updateMessages(ids)) {
return false; return false;
} }
if (!_initialised) {
init();
}
return true; return true;
} }
...@@ -519,9 +515,7 @@ bool QMailMessageListModelPrivate::processMessagesRemoved(const QMailMessageIdLi ...@@ -519,9 +515,7 @@ bool QMailMessageListModelPrivate::processMessagesRemoved(const QMailMessageIdLi
return true; return true;
} }
if (!_initialised) { init();
init();
}
// Find if and where these messages should be removed from // Find if and where these messages should be removed from
if (!removeMessages(ids)) { if (!removeMessages(ids)) {
......
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