Verified Commit 6d4a9dc1 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

IMAP: MoveItemTask - use items() instead of item()

When moving a batch of Items it would generate a warning that
ResourceTask::item() is being used while there are multiple
items.
parent b496bf23
......@@ -49,7 +49,8 @@ MoveItemsTask::~MoveItemsTask()
void MoveItemsTask::doStart(KIMAP::Session *session)
{
if (item().remoteId().isEmpty()) {
const auto itemsToMove = items();
if (std::any_of(itemsToMove.begin(), itemsToMove.end(), [](const Akonadi::Item &item) { return item.remoteId().isEmpty(); })) {
qCWarning(IMAPRESOURCE_LOG) << "Failed: messages has no rid";
emitError(i18n("Cannot move message, it does not exist on the server."));
changeProcessed();
......
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