Commit 70a39301 authored by Laurent Montel's avatar Laurent Montel 😁

Move other method

parent 36a9c0c8
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.5.46")
set(PIM_VERSION "5.5.47")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -406,3 +406,10 @@ bool MessageComposer::Util::getLinkInformation(const KMime::Message::Ptr &msg, Q
}
return true;
}
bool MessageComposer::Util::isStandaloneMessage(const Akonadi::Item &item)
{
// standalone message have a valid payload, but are not, themselves valid items
return item.hasPayload<KMime::Message::Ptr>() && !item.isValid();
}
......@@ -76,6 +76,15 @@ MESSAGECOMPOSER_EXPORT void addLinkInformation(const KMime::Message::Ptr &messag
*/
MESSAGECOMPOSER_EXPORT bool getLinkInformation(const KMime::Message::Ptr &msg, QList<Akonadi::Item::Id> &id, QList<Akonadi::MessageStatus> &status);
/**
* Returns whether the item represents a valid KMime::Message that is not
* in the Akonadi store (yet). This happens when operating on messages
* attached to other mails, for example. Such items are not "valid", in
* the akonadi sense, since jobs cannot sensibly use them, but they do
* contain a valid message pointer.
*/
MESSAGECOMPOSER_EXPORT bool isStandaloneMessage(const Akonadi::Item &item);
}
}
......
......@@ -32,9 +32,3 @@ KMime::Message::Ptr MessageCore::Util::message(const Akonadi::Item &item)
return item.payload<KMime::Message::Ptr>();
}
bool MessageCore::Util::isStandaloneMessage(const Akonadi::Item &item)
{
// standalone message have a valid payload, but are not, themselves valid items
return item.hasPayload<KMime::Message::Ptr>() && !item.isValid();
}
......@@ -38,14 +38,6 @@ namespace Util
*/
MESSAGECORE_EXPORT KMime::Message::Ptr message(const Akonadi::Item &item);
/**
* Returns whether the item represents a valid KMime::Message that is not
* in the Akonadi store (yet). This happens when operating on messages
* attached to other mails, for example. Such items are not "valid", in
* the akonadi sense, since jobs cannot sensibly use them, but they do
* contain a valid message pointer.
*/
MESSAGECORE_EXPORT bool isStandaloneMessage(const Akonadi::Item &item);
}
......
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