Commit 8a47f3d7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 22a3130e
......@@ -421,11 +421,12 @@ bool OutboxQueue::isEmpty() const
int OutboxQueue::count() const
{
if (d->queue.count() == 0) {
const int numberOfElement(d->queue.count());
if (numberOfElement == 0) {
// TODO Is this asking for too much?
Q_ASSERT(d->totalSize == 0);
}
return d->queue.count();
return numberOfElement;
}
qulonglong OutboxQueue::totalSize() const
......
......@@ -434,10 +434,11 @@ void NewMailNotifierAgent::slotShowNotifications()
}
if (hasUniqMessage) {
if (it.value().count() == 0) {
const int numberOfValue(it.value().count());
if (numberOfValue == 0) {
//You can have an unique folder with 0 message
return;
} else if (it.value().count() == 1) {
} else if (numberOfValue == 1) {
item = it.value().at(0);
currentPath = displayName;
break;
......
Supports Markdown
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