diff --git a/messagecore/helpers/messagehelpers.cpp b/messagecore/helpers/messagehelpers.cpp index 2dc915138da00d488e7659d25ff0f3ca142b0b53..5f5fc860a75d5748d1729778f27c293c5a336617 100644 --- a/messagecore/helpers/messagehelpers.cpp +++ b/messagecore/helpers/messagehelpers.cpp @@ -40,26 +40,6 @@ bool MessageCore::Util::isStandaloneMessage( const Akonadi::Item &item ) return item.hasPayload() && !item.isValid(); } -QString MessageCore::Util::messageId( const KMime::Message::Ptr &message ) -{ - if ( !message->headerByType( "Message-Id" ) ) - return QString(); - - QString messageId = message->headerByType( "Message-Id" )->asUnicodeString(); - - // search the end of the message id - const int rightAngle = messageId.indexOf( QLatin1Char( '>' ) ); - if ( rightAngle != -1 ) - messageId.truncate( rightAngle + 1 ); - - // now search the start of the message id - const int leftAngle = messageId.lastIndexOf( QLatin1Char( '<' ) ); - if ( leftAngle != -1 ) - messageId = messageId.mid( leftAngle ); - - return messageId; -} - void MessageCore::Util::addLinkInformation( const KMime::Message::Ptr &msg, Akonadi::Item::Id id, const Akonadi::MessageStatus &status ) { Q_ASSERT( status.isReplied() || status.isForwarded() || status.isDeleted() ); diff --git a/messagecore/helpers/messagehelpers.h b/messagecore/helpers/messagehelpers.h index bb4b2c7341f670aff462385c9d1f5e2dfc408e7f..f0df4103c45dbeffaeefaa41394b727482b04eb1 100644 --- a/messagecore/helpers/messagehelpers.h +++ b/messagecore/helpers/messagehelpers.h @@ -46,11 +46,6 @@ MESSAGECORE_EXPORT KMime::Message::Ptr message( const Akonadi::Item &item ); */ MESSAGECORE_EXPORT bool isStandaloneMessage( const Akonadi::Item &item ); -/** - * Get the message id as a string from the @p message. - */ -MESSAGECORE_EXPORT QString messageId( const KMime::Message::Ptr &message ); - /** * Adds private headers to the given @p message that links it to the original message. *