mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
[Fix-Warnings] Remove redundant parentheses
This commit is contained in:
parent
858361e6d3
commit
8ddbdf31f9
75 changed files with 269 additions and 269 deletions
|
|
@ -237,10 +237,9 @@ void IslInterface::readClient()
|
|||
do {
|
||||
if (!messageInProgress) {
|
||||
if (inputBuffer.size() >= 4) {
|
||||
messageLength = (((quint32)(unsigned char)inputBuffer[0]) << 24) +
|
||||
(((quint32)(unsigned char)inputBuffer[1]) << 16) +
|
||||
(((quint32)(unsigned char)inputBuffer[2]) << 8) +
|
||||
((quint32)(unsigned char)inputBuffer[3]);
|
||||
messageLength = ((quint32)(unsigned char)inputBuffer[0] << 24) +
|
||||
((quint32)(unsigned char)inputBuffer[1] << 16) +
|
||||
((quint32)(unsigned char)inputBuffer[2] << 8) + (quint32)(unsigned char)inputBuffer[3];
|
||||
inputBuffer.remove(0, 4);
|
||||
messageInProgress = true;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -38,12 +38,13 @@
|
|||
#include <QUuid>
|
||||
#include <QtDebug>
|
||||
|
||||
static bool isASCII(const QString &string) {
|
||||
for(const QChar &chr : string){
|
||||
if(chr.unicode() > 0x7f)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
static bool isASCII(const QString &string)
|
||||
{
|
||||
for (const QChar &chr : string) {
|
||||
if (chr.unicode() > 0x7f)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
struct QxtMailMessagePrivate : public QSharedData
|
||||
|
|
@ -277,9 +278,9 @@ QByteArray qxt_fold_mime_header(const QString &key, const QString &value, const
|
|||
QByteArray QxtMailMessage::rfc2822() const
|
||||
{
|
||||
// Use quoted-printable if requested
|
||||
bool useQuotedPrintable = (extraHeader("Content-Transfer-Encoding").toLower() == "quoted-printable");
|
||||
bool useQuotedPrintable = extraHeader("Content-Transfer-Encoding").toLower() == "quoted-printable";
|
||||
// Use base64 if requested
|
||||
bool useBase64 = (extraHeader("Content-Transfer-Encoding").toLower() == "base64");
|
||||
bool useBase64 = extraHeader("Content-Transfer-Encoding").toLower() == "base64";
|
||||
// Check to see if plain text is ASCII-clean; assume it isn't if QP or base64 was requested
|
||||
bool bodyIsAscii = !useQuotedPrintable && !useBase64 && isASCII(body());
|
||||
|
||||
|
|
@ -465,8 +466,7 @@ QByteArray QxtMailMessage::rfc2822() const
|
|||
if (attach.count()) {
|
||||
for (const QString &filename : attach.keys()) {
|
||||
rv += "--" + qxt_d->boundary + "\r\n";
|
||||
rv +=
|
||||
qxt_fold_mime_header("Content-Disposition", QDir(filename).dirName(), "attachment; filename=");
|
||||
rv += qxt_fold_mime_header("Content-Disposition", QDir(filename).dirName(), "attachment; filename=");
|
||||
rv += attach[filename].mimeData();
|
||||
}
|
||||
rv += "--" + qxt_d->boundary + "--\r\n";
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void QxtSmtpPrivate::socketRead()
|
|||
case HeloSent:
|
||||
case EhloSent:
|
||||
case EhloGreetReceived:
|
||||
parseEhlo(code, (line[3] != ' '), line.mid(4));
|
||||
parseEhlo(code, line[3] != ' ', line.mid(4));
|
||||
break;
|
||||
case StartTLSSent:
|
||||
if (code == "220") {
|
||||
|
|
@ -414,7 +414,7 @@ static QByteArray qxt_extract_address(const QString &address)
|
|||
inQuote = false;
|
||||
} else if (addrStart != -1) {
|
||||
if (ch == '>')
|
||||
return address.mid(addrStart, (i - addrStart)).toLatin1();
|
||||
return address.mid(addrStart, i - addrStart).toLatin1();
|
||||
} else if (ch == '(') {
|
||||
parenDepth++;
|
||||
} else if (ch == ')') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue