bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
456 stars 228 forks source link

Missing const for argument of SmtpClient::setHost #31

Closed Chardrazle closed 10 years ago

Chardrazle commented 10 years ago

void SmtpClient::setHost(QString &host)

should be:

void SmtpClient::setHost(QString const &host)

Yes, it's marked as deprecated, but if that's the case then the constructor ought to be RAII; not defaulted.

mhcuervo commented 10 years ago

Shouldn't it be:

void SmtpClient::setHost(const QString& host)

Chardrazle commented 10 years ago

Only to maintain style.

I also notice what looks like a copy-paste job in the prototype for:

void setUser(const QString &host);

The cpp file has changed the parameter name to user, as expected.

bluetiger9 commented 10 years ago

Fixed.