Commit 868d499f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Return when selection is empty

parent 243371bb
Pipeline #34247 passed with stage
in 20 minutes and 39 seconds
......@@ -485,14 +485,15 @@ public:
void slotMarkAs()
{
const QAction *action = qobject_cast<QAction *>(mParent->sender());
Q_ASSERT(action);
const Akonadi::Item::List items = mGenericManager->selectedItems();
if (items.isEmpty()) {
return;
}
const QAction *action = qobject_cast<QAction *>(mParent->sender());
Q_ASSERT(action);
QByteArray typeStr = action->data().toByteArray();
qCDebug(AKONADIMIME_LOG) << "Mark mail as: " << typeStr;
......@@ -526,16 +527,17 @@ public:
void slotMarkAllAs()
{
const Akonadi::Collection::List collections = mGenericManager->selectedCollections();
if (collections.isEmpty()) {
return;
}
const QAction *action = qobject_cast<QAction *>(mParent->sender());
Q_ASSERT(action);
QByteArray typeStr = action->data().toByteArray();
qCDebug(AKONADIMIME_LOG) << "Mark all as: " << typeStr;
const Akonadi::Collection::List collections = mGenericManager->selectedCollections();
if (collections.isEmpty()) {
return;
}
Akonadi::MessageStatus targetStatus;
targetStatus.setStatusFromStr(QLatin1String(typeStr));
......
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