Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
8571e708
Commit
8571e708
authored
Aug 11, 2015
by
Volker Krause
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move away from the overloaded KMime::Headers::* ctors.
They are dangerous to use with implicit ascii casts enabled.
parent
480cd489
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
kmail/editor/kmcomposewin.cpp
kmail/editor/kmcomposewin.cpp
+2
-2
kmail/kmkernel.cpp
kmail/kmkernel.cpp
+2
-1
messagecomposer/helper/messagefactory.cpp
messagecomposer/helper/messagefactory.cpp
+4
-2
messagecomposer/helper/messagehelper.cpp
messagecomposer/helper/messagehelper.cpp
+2
-2
messagecomposer/job/skeletonmessagejob.cpp
messagecomposer/job/skeletonmessagejob.cpp
+4
-2
No files found.
kmail/editor/kmcomposewin.cpp
View file @
8571e708
...
...
@@ -3016,8 +3016,8 @@ void KMComposeWin::slotIdentityChanged(uint uoid, bool initalChange)
if
(
ident
.
organization
().
isEmpty
())
{
mMsg
->
organization
()
->
clear
();
}
else
{
KMime
::
Headers
::
Organization
*
const
organization
=
new
KMime
::
Headers
::
Organization
(
mMsg
.
data
(),
ident
.
organization
(),
"utf-8"
);
KMime
::
Headers
::
Organization
*
const
organization
=
new
KMime
::
Headers
::
Organization
(
mMsg
.
data
());
organization
->
fromUnicodeString
(
ident
.
organization
(),
"utf-8"
);
mMsg
->
setHeader
(
organization
);
}
if
(
!
ident
.
isXFaceEnabled
()
||
ident
.
xface
().
isEmpty
())
{
...
...
kmail/kmkernel.cpp
View file @
8571e708
...
...
@@ -591,7 +591,8 @@ int KMKernel::openComposer(const QString &to, const QString &cc,
}
if
(
!
inReplyTo
.
isEmpty
())
{
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
msg
.
data
(),
inReplyTo
,
"utf-8"
);
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
msg
.
data
());
header
->
fromUnicodeString
(
inReplyTo
,
"utf-8"
);
msg
->
setHeader
(
header
);
}
...
...
messagecomposer/helper/messagefactory.cpp
View file @
8571e708
...
...
@@ -556,7 +556,8 @@ KMime::Message::Ptr MessageFactory::createRedirect(const QString &toStr, const Q
msg
->
setHeader
(
header
);
if
(
msg
->
to
(
false
))
{
KMime
::
Headers
::
To
*
headerT
=
new
KMime
::
Headers
::
To
(
msg
.
data
(),
m_origMsg
->
to
()
->
asUnicodeString
(),
"utf-8"
);
KMime
::
Headers
::
To
*
headerT
=
new
KMime
::
Headers
::
To
(
msg
.
data
());
headerT
->
fromUnicodeString
(
m_origMsg
->
to
()
->
asUnicodeString
(),
"utf-8"
);
msg
->
setHeader
(
headerT
);
}
...
...
@@ -710,7 +711,8 @@ KMime::Message::Ptr MessageFactory::createMDN(KMime::MDN::ActionMode a,
receipt
->
to
()
->
fromUnicodeString
(
receiptTo
,
"utf-8"
);
//Laurent: We don't translate subject ?
receipt
->
subject
()
->
from7BitString
(
"Message Disposition Notification"
);
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
receipt
.
data
(),
m_origMsg
->
messageID
()
->
asUnicodeString
(),
"utf-8"
);
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
receipt
.
data
());
header
->
fromUnicodeString
(
m_origMsg
->
messageID
()
->
asUnicodeString
(),
"utf-8"
);
receipt
->
setHeader
(
header
);
receipt
->
references
()
->
from7BitString
(
getRefStr
(
m_origMsg
));
...
...
messagecomposer/helper/messagehelper.cpp
View file @
8571e708
...
...
@@ -110,8 +110,8 @@ void applyIdentity(const KMime::Message::Ptr &message, const KIdentityManagement
if
(
ident
.
organization
().
isEmpty
())
{
message
->
removeHeader
(
"Organization"
);
}
else
{
KMime
::
Headers
::
Organization
*
const
organization
=
new
KMime
::
Headers
::
Organization
(
message
.
data
(),
ident
.
organization
(),
"utf-8"
);
KMime
::
Headers
::
Organization
*
const
organization
=
new
KMime
::
Headers
::
Organization
(
message
.
data
());
organization
->
fromUnicodeString
(
ident
.
organization
(),
"utf-8"
);
message
->
setHeader
(
organization
);
}
...
...
messagecomposer/job/skeletonmessagejob.cpp
View file @
8571e708
...
...
@@ -195,13 +195,15 @@ void SkeletonMessageJobPrivate::doStart()
// In-Reply-To
if
(
!
infoPart
->
inReplyTo
().
isEmpty
())
{
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
message
,
infoPart
->
inReplyTo
(),
"utf-8"
);
KMime
::
Headers
::
InReplyTo
*
header
=
new
KMime
::
Headers
::
InReplyTo
(
message
);
header
->
fromUnicodeString
(
infoPart
->
inReplyTo
(),
"utf-8"
);
message
->
setHeader
(
header
);
}
// References
if
(
!
infoPart
->
references
().
isEmpty
())
{
KMime
::
Headers
::
References
*
header
=
new
KMime
::
Headers
::
References
(
message
,
infoPart
->
references
(),
"utf-8"
);
KMime
::
Headers
::
References
*
header
=
new
KMime
::
Headers
::
References
(
message
);
header
->
fromUnicodeString
(
infoPart
->
references
(),
"utf-8"
);
message
->
setHeader
(
header
);
}
...
...
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