Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PIM Messagelib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
PIM Messagelib
Commits
195f0fc7
Commit
195f0fc7
authored
Jun 08, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move all method from messagehelpers
parent
70a39301
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
90 deletions
+21
-90
CMakeLists.txt
CMakeLists.txt
+1
-1
messagecomposer/src/composer/composerviewbase.cpp
messagecomposer/src/composer/composerviewbase.cpp
+0
-1
messagecomposer/src/helper/messagefactoryng.cpp
messagecomposer/src/helper/messagefactoryng.cpp
+3
-4
messagecomposer/src/sender/akonadisender.cpp
messagecomposer/src/sender/akonadisender.cpp
+0
-1
messagecomposer/src/utils/util.cpp
messagecomposer/src/utils/util.cpp
+10
-1
messagecomposer/src/utils/util.h
messagecomposer/src/utils/util.h
+7
-0
messagecore/src/CMakeLists.txt
messagecore/src/CMakeLists.txt
+0
-2
messagecore/src/helpers/messagehelpers.cpp
messagecore/src/helpers/messagehelpers.cpp
+0
-34
messagecore/src/helpers/messagehelpers.h
messagecore/src/helpers/messagehelpers.h
+0
-46
No files found.
CMakeLists.txt
View file @
195f0fc7
cmake_minimum_required
(
VERSION 3.0
)
set
(
PIM_VERSION
"5.5.4
7
"
)
set
(
PIM_VERSION
"5.5.4
8
"
)
if
(
POLICY CMP0053
)
cmake_policy
(
SET CMP0053 NEW
)
...
...
messagecomposer/src/composer/composerviewbase.cpp
View file @
195f0fc7
...
...
@@ -55,7 +55,6 @@
#include <sonnet/dictionarycombobox.h>
#include <KIdentityManagement/Identity>
#include <messagecore/messagehelpers.h>
#include <MessageCore/StringUtil>
#include <MessageCore/NodeHelper>
...
...
messagecomposer/src/helper/messagefactoryng.cpp
View file @
195f0fc7
...
...
@@ -37,7 +37,6 @@
#include <kmime/kmime_dateformatter.h>
#include <KEmailAddress>
#include <MessageCore/MailingList>
#include <messagecore/messagehelpers.h>
#include <MessageCore/StringUtil>
#include "helper/messagehelper.h"
#include <KLocalizedString>
...
...
@@ -456,7 +455,7 @@ QPair< KMime::Message::Ptr, QList< KMime::Content * > > MessageFactoryNG::create
// the selected mails
MessageHelper
::
initHeader
(
msg
,
m_identityManager
,
0
);
}
else
if
(
numberOfItems
==
1
)
{
KMime
::
Message
::
Ptr
firstMsg
=
MessageCo
re
::
Util
::
message
(
items
.
first
());
KMime
::
Message
::
Ptr
firstMsg
=
MessageCo
mposer
::
Util
::
message
(
items
.
first
());
const
uint
originalIdentity
=
identityUoid
(
firstMsg
);
MessageHelper
::
initFromMessage
(
msg
,
firstMsg
,
m_identityManager
,
originalIdentity
);
msg
->
subject
()
->
fromUnicodeString
(
MessageHelper
::
forwardSubject
(
firstMsg
),
"utf-8"
);
...
...
@@ -473,7 +472,7 @@ QPair< KMime::Message::Ptr, QList< KMime::Content * > > MessageFactoryNG::create
// iterate through all the messages to be forwarded
attachments
.
reserve
(
items
.
count
());
for
(
const
Akonadi
::
Item
&
item
:
qAsConst
(
items
))
{
attachments
<<
createForwardAttachmentMessage
(
MessageCo
re
::
Util
::
message
(
item
));
attachments
<<
createForwardAttachmentMessage
(
MessageCo
mposer
::
Util
::
message
(
item
));
MessageComposer
::
Util
::
addLinkInformation
(
msg
,
item
.
id
(),
Akonadi
::
MessageStatus
::
statusForwarded
());
}
}
...
...
@@ -784,7 +783,7 @@ QPair< KMime::Message::Ptr, KMime::Content * > MessageFactoryNG::createForwardDi
int
id
=
0
;
for
(
const
Akonadi
::
Item
&
item
:
qAsConst
(
items
))
{
KMime
::
Message
::
Ptr
fMsg
=
MessageCo
re
::
Util
::
message
(
item
);
KMime
::
Message
::
Ptr
fMsg
=
MessageCo
mposer
::
Util
::
message
(
item
);
if
(
id
==
0
)
{
if
(
auto
hrd
=
fMsg
->
headerByType
(
"X-KMail-Identity"
))
{
id
=
hrd
->
asUnicodeString
().
toInt
();
...
...
messagecomposer/src/sender/akonadisender.cpp
View file @
195f0fc7
...
...
@@ -34,7 +34,6 @@
#include <mailtransport/transport.h>
#include <mailtransport/transportmanager.h>
#include <MessageCore/StringUtil>
#include <messagecore/messagehelpers.h>
using
namespace
KMime
::
Types
;
using
namespace
KPIM
;
...
...
messagecomposer/src/utils/util.cpp
View file @
195f0fc7
...
...
@@ -41,7 +41,6 @@
#include <AkonadiCore/agentinstance.h>
#include <AkonadiCore/agentinstancecreatejob.h>
#include <AkonadiCore/agentmanager.h>
#include <messagecore/messagehelpers.h>
KMime
::
Content
*
setBodyAndCTE
(
QByteArray
&
encodedBody
,
KMime
::
Headers
::
ContentType
*
contentType
,
KMime
::
Content
*
ret
)
{
...
...
@@ -413,3 +412,13 @@ bool MessageComposer::Util::isStandaloneMessage(const Akonadi::Item &item)
return
item
.
hasPayload
<
KMime
::
Message
::
Ptr
>
()
&&
!
item
.
isValid
();
}
KMime
::
Message
::
Ptr
MessageComposer
::
Util
::
message
(
const
Akonadi
::
Item
&
item
)
{
if
(
!
item
.
hasPayload
<
KMime
::
Message
::
Ptr
>
())
{
qCWarning
(
MESSAGECOMPOSER_LOG
)
<<
"Payload is not a MessagePtr!"
;
return
KMime
::
Message
::
Ptr
();
}
return
item
.
payload
<
KMime
::
Message
::
Ptr
>
();
}
messagecomposer/src/utils/util.h
View file @
195f0fc7
...
...
@@ -85,6 +85,13 @@ MESSAGECOMPOSER_EXPORT bool getLinkInformation(const KMime::Message::Ptr &msg, Q
*/
MESSAGECOMPOSER_EXPORT
bool
isStandaloneMessage
(
const
Akonadi
::
Item
&
item
);
/**
* Retrieve the KMime::Message from the item, if there is one.
* @returns A valid message pointer, or 0, is the item does not contain
* a valid message.
*/
MESSAGECOMPOSER_EXPORT
KMime
::
Message
::
Ptr
message
(
const
Akonadi
::
Item
&
item
);
}
}
...
...
messagecore/src/CMakeLists.txt
View file @
195f0fc7
...
...
@@ -25,7 +25,6 @@ set(messagecore_misc_LIB_SRCS
set
(
messagecore_helper_LIB_SRCS
helpers/messagehelpers.cpp
helpers/nodehelper.cpp
)
...
...
@@ -142,7 +141,6 @@ ecm_generate_headers(MessageCore_Camelcaseattachment_HEADERS
ecm_generate_headers
(
MessageCore_Camelcasehelpers_HEADERS
HEADER_NAMES
NodeHelper
MessageHelpers
REQUIRED_HEADERS MessageCore_helpers_HEADERS
PREFIX MessageCore
RELATIVE helpers
...
...
messagecore/src/helpers/messagehelpers.cpp
deleted
100644 → 0
View file @
70a39301
/*
* This file is part of KDEPIM.
* Copyright (c) 2010 Till Adam <adam@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "messagehelpers.h"
#include "messagecore_debug.h"
using
namespace
MessageCore
;
using
namespace
MessageCore
::
Util
;
KMime
::
Message
::
Ptr
MessageCore
::
Util
::
message
(
const
Akonadi
::
Item
&
item
)
{
if
(
!
item
.
hasPayload
<
KMime
::
Message
::
Ptr
>
())
{
qCWarning
(
MESSAGECORE_LOG
)
<<
"Payload is not a MessagePtr!"
;
return
KMime
::
Message
::
Ptr
();
}
return
item
.
payload
<
KMime
::
Message
::
Ptr
>
();
}
messagecore/src/helpers/messagehelpers.h
deleted
100644 → 0
View file @
70a39301
/*
* This file is part of KDEPIM.
* Copyright (c) 2010 Till Adam <adam@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef MESSAGECORE_MESSAGEHELPERS_H
#define MESSAGECORE_MESSAGEHELPERS_H
#include "messagecore_export.h"
#include <item.h>
#include <Akonadi/KMime/MessageStatus>
#include <KMime/Message>
namespace
MessageCore
{
namespace
Util
{
/**
* Retrieve the KMime::Message from the item, if there is one.
* @returns A valid message pointer, or 0, is the item does not contain
* a valid message.
*/
MESSAGECORE_EXPORT
KMime
::
Message
::
Ptr
message
(
const
Akonadi
::
Item
&
item
);
}
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment