Commit 49d0b4d9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port Q_FOREVER

parent 3157210f
Pipeline #81859 passed with stage
in 6 minutes and 10 seconds
......@@ -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;
......
......@@ -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");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment