Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KMime
Commits
5412a4de
Commit
5412a4de
authored
Sep 10, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize code
parent
b9b418ac
Pipeline
#33745
passed with stage
in 4 minutes and 5 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
16 deletions
+14
-16
src/kmime_charfreq.cpp
src/kmime_charfreq.cpp
+2
-6
src/kmime_charfreq.h
src/kmime_charfreq.h
+2
-2
src/kmime_dateformatter.cpp
src/kmime_dateformatter.cpp
+2
-3
src/kmime_header_parsing.h
src/kmime_header_parsing.h
+1
-1
src/kmime_parsers.cpp
src/kmime_parsers.cpp
+2
-2
src/kmime_parsers.h
src/kmime_parsers.h
+4
-1
src/kmime_util.cpp
src/kmime_util.cpp
+1
-1
No files found.
src/kmime_charfreq.cpp
View file @
5412a4de
...
...
@@ -43,9 +43,7 @@ CharFreq::CharFreq(const QByteArray &buf)
mEightBit
(
0
),
mTotal
(
0
),
mLineMin
(
0xffffffff
),
mLineMax
(
0
),
mTrailingWS
(
false
),
mLeadingFrom
(
false
)
mLineMax
(
0
)
{
if
(
!
buf
.
isEmpty
())
{
count
(
buf
.
data
(),
buf
.
size
());
...
...
@@ -61,9 +59,7 @@ CharFreq::CharFreq(const char *buf, size_t len)
mEightBit
(
0
),
mTotal
(
0
),
mLineMin
(
0xffffffff
),
mLineMax
(
0
),
mTrailingWS
(
false
),
mLeadingFrom
(
false
)
mLineMax
(
0
)
{
if
(
buf
&&
len
>
0
)
{
count
(
buf
,
len
);
...
...
src/kmime_charfreq.h
View file @
5412a4de
...
...
@@ -154,8 +154,8 @@ private:
uint
mTotal
;
// count of all chars
uint
mLineMin
;
// minimum line length
uint
mLineMax
;
// maximum line length
bool
mTrailingWS
;
// does the buffer contain trailing whitespace?
bool
mLeadingFrom
;
// does the buffer contain lines starting with "From "?
bool
mTrailingWS
=
false
;
// does the buffer contain trailing whitespace?
bool
mLeadingFrom
=
false
;
// does the buffer contain lines starting with "From "?
//@endcond
/**
...
...
src/kmime_dateformatter.cpp
View file @
5412a4de
...
...
@@ -32,8 +32,7 @@ namespace KMime {
class
DateFormatterPrivate
{
public:
DateFormatterPrivate
()
:
mTodayOneSecondBeforeMidnight
(
0
)
DateFormatterPrivate
()
{}
/**
...
...
@@ -95,7 +94,7 @@ public:
static
QByteArray
zone
(
time_t
t
);
DateFormatter
::
FormatType
mFormat
;
time_t
mTodayOneSecondBeforeMidnight
;
time_t
mTodayOneSecondBeforeMidnight
=
0
;
QString
mCustomFormat
;
};
...
...
src/kmime_header_parsing.h
View file @
5412a4de
...
...
@@ -190,7 +190,7 @@ Q_REQUIRED_RESULT KMIME_EXPORT bool parseAngleAddr(const char *&scursor, const c
@param result the parsing result
@param isCRLF true if input string is terminated with a CRLF.
*/
Q_REQUIRED_RESULT
KMIME_EXPORT
bool
parseMailbox
(
const
char
*&
scursor
,
const
char
*
const
send
,
KMIME_EXPORT
bool
parseMailbox
(
const
char
*&
scursor
,
const
char
*
const
send
,
Types
::
Mailbox
&
result
,
bool
isCRLF
=
false
);
Q_REQUIRED_RESULT
KMIME_EXPORT
bool
parseGroup
(
const
char
*&
scursor
,
const
char
*
const
send
,
...
...
src/kmime_parsers.cpp
View file @
5412a4de
...
...
@@ -20,9 +20,9 @@ namespace Parser
{
MultiPart
::
MultiPart
(
const
QByteArray
&
src
,
const
QByteArray
&
boundary
)
:
m_src
(
src
)
,
m_boundary
(
boundary
)
{
m_src
=
src
;
m_boundary
=
boundary
;
}
bool
MultiPart
::
parse
()
...
...
src/kmime_parsers.h
View file @
5412a4de
...
...
@@ -43,7 +43,10 @@ public:
}
private:
QByteArray
m_src
,
m_boundary
,
m_preamble
,
m_epilouge
;
QByteArray
m_src
;
const
QByteArray
m_boundary
;
QByteArray
m_preamble
;
QByteArray
m_epilouge
;
QVector
<
QByteArray
>
m_parts
;
};
...
...
src/kmime_util.cpp
View file @
5412a4de
...
...
@@ -55,7 +55,7 @@ QByteArray cachedCharset(const QByteArray &name)
bool
isUsAscii
(
const
QString
&
s
)
{
uint
sLength
=
s
.
length
();
const
uint
sLength
=
s
.
length
();
for
(
uint
i
=
0
;
i
<
sLength
;
i
++
)
{
if
(
s
.
at
(
i
).
toLatin1
()
<=
0
)
{
// c==0: non-latin1, c<0: non-us-ascii
return
false
;
...
...
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