Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KIMAP
Commits
49d0b4d9
Commit
49d0b4d9
authored
Sep 21, 2021
by
Laurent Montel
😁
Browse files
Port Q_FOREVER
parent
3157210f
Pipeline
#81859
passed with stage
in 6 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fetchjob.cpp
View file @
49d0b4d9
...
...
@@ -511,7 +511,7 @@ QByteArray FetchJobPrivate::parseString(const QByteArray &structure, int &pos)
// quoted string
if
(
structure
[
pos
]
==
'"'
)
{
pos
++
;
Q_FOREVER
{
for
(;;)
{
if
(
structure
[
pos
]
==
'\\'
)
{
pos
+=
2
;
foundSlash
=
true
;
...
...
@@ -525,7 +525,7 @@ QByteArray FetchJobPrivate::parseString(const QByteArray &structure, int &pos)
pos
++
;
}
}
else
{
// unquoted string
Q_FOREVER
{
for
(;;)
{
if
(
structure
[
pos
]
==
' '
||
structure
[
pos
]
==
'('
||
structure
[
pos
]
==
')'
||
structure
[
pos
]
==
'['
||
structure
[
pos
]
==
']'
||
structure
[
pos
]
==
'\n'
||
structure
[
pos
]
==
'\r'
||
structure
[
pos
]
==
'"'
)
{
break
;
...
...
src/imapstreamparser.cpp
View file @
49d0b4d9
...
...
@@ -192,7 +192,7 @@ QList<QByteArray> ImapStreamParser::readParenthesizedList()
int
count
=
0
;
int
sublistbegin
=
m_position
;
int
i
=
m_position
+
1
;
Q_FOREVER
{
for
(;;)
{
if
(
!
waitForMoreData
(
m_data
.
length
()
<=
i
))
{
m_position
=
i
;
throw
ImapParserException
(
"Unable to read more data"
);
...
...
@@ -327,7 +327,7 @@ QByteArray ImapStreamParser::parseQuotedString()
if
(
m_data
.
at
(
m_position
)
==
'"'
)
{
++
m_position
;
int
i
=
m_position
;
Q_FOREVER
{
for
(;;)
{
if
(
!
waitForMoreData
(
m_data
.
length
()
<=
i
))
{
m_position
=
i
;
throw
ImapParserException
(
"Unable to read more data"
);
...
...
@@ -350,7 +350,7 @@ QByteArray ImapStreamParser::parseQuotedString()
else
{
bool
reachedInputEnd
=
true
;
int
i
=
m_position
;
Q_FOREVER
{
for
(;;)
{
if
(
!
waitForMoreData
(
m_data
.
length
()
<=
i
))
{
m_position
=
i
;
throw
ImapParserException
(
"Unable to read more data"
);
...
...
@@ -403,7 +403,7 @@ qint64 ImapStreamParser::readNumber(bool *ok)
throw
ImapParserException
(
"Unable to read more data"
);
}
int
i
=
m_position
;
Q_FOREVER
{
for
(;;)
{
if
(
!
waitForMoreData
(
m_data
.
length
()
<=
i
))
{
m_position
=
i
;
throw
ImapParserException
(
"Unable to read more data"
);
...
...
@@ -489,7 +489,7 @@ QByteArray ImapStreamParser::readUntilCommandEnd()
QByteArray
result
;
int
i
=
m_position
;
int
paranthesisBalance
=
0
;
Q_FOREVER
{
for
(;;)
{
if
(
!
waitForMoreData
(
m_data
.
length
()
<=
i
))
{
m_position
=
i
;
throw
ImapParserException
(
"Unable to read more data"
);
...
...
Write
Preview
Supports
Markdown
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