Merge pull request #39 from ursfassler/v1.1

cleanup compiler errors/warnings
This commit is contained in:
Attila Tőkés 2015-10-26 20:21:14 +02:00
commit 48c080b9ee
3 changed files with 9 additions and 11 deletions

View File

@ -16,8 +16,6 @@ TEMPLATE = lib
DEFINES += SMTP_BUILD DEFINES += SMTP_BUILD
win32:CONFIG += dll win32:CONFIG += dll
QMAKE_CXXFLAGS += -fPIC
SOURCES += \ SOURCES += \
src/emailaddress.cpp \ src/emailaddress.cpp \
src/mimeattachment.cpp \ src/mimeattachment.cpp \

View File

@ -25,12 +25,12 @@
/* [1] Constructors and destructors */ /* [1] Constructors and destructors */
SmtpClient::SmtpClient(const QString & host, int port, ConnectionType connectionType) : SmtpClient::SmtpClient(const QString & host, int port, ConnectionType connectionType) :
socket(NULL),
name("localhost"), name("localhost"),
authMethod(AuthPlain), authMethod(AuthPlain),
connectionTimeout(5000), connectionTimeout(5000),
responseTimeout(5000), responseTimeout(5000),
sendMessageTimeout(60000), sendMessageTimeout(60000)
socket(NULL)
{ {
setConnectionType(connectionType); setConnectionType(connectionType);
@ -332,7 +332,7 @@ bool SmtpClient::login(const QString &user, const QString &password, AuthMethod
} }
} }
} }
catch (ResponseTimeoutException e) catch (ResponseTimeoutException)
{ {
// Responce Timeout exceeded // Responce Timeout exceeded
emit smtpError(AuthenticationFailedError); emit smtpError(AuthenticationFailedError);
@ -428,7 +428,7 @@ void SmtpClient::quit()
/* [4] Protected methods */ /* [4] Protected methods */
void SmtpClient::waitForResponse() throw (ResponseTimeoutException) void SmtpClient::waitForResponse()
{ {
do { do {
if (!socket->waitForReadyRead(responseTimeout)) if (!socket->waitForReadyRead(responseTimeout))
@ -455,7 +455,7 @@ void SmtpClient::waitForResponse() throw (ResponseTimeoutException)
} while (true); } while (true);
} }
void SmtpClient::sendMessage(const QString &text) throw (SendMessageTimeoutException) void SmtpClient::sendMessage(const QString &text)
{ {
socket->write(text.toUtf8() + "\r\n"); socket->write(text.toUtf8() + "\r\n");
if (! socket->waitForBytesWritten(sendMessageTimeout)) if (! socket->waitForBytesWritten(sendMessageTimeout))
@ -470,11 +470,11 @@ void SmtpClient::sendMessage(const QString &text) throw (SendMessageTimeoutExcep
/* [5] Slots for the socket's signals */ /* [5] Slots for the socket's signals */
void SmtpClient::socketStateChanged(QAbstractSocket::SocketState state) void SmtpClient::socketStateChanged(QAbstractSocket::SocketState /*state*/)
{ {
} }
void SmtpClient::socketError(QAbstractSocket::SocketError socketError) void SmtpClient::socketError(QAbstractSocket::SocketError /*socketError*/)
{ {
} }

View File

@ -154,9 +154,9 @@ protected:
/* [5] Protected methods */ /* [5] Protected methods */
void waitForResponse() throw (ResponseTimeoutException); void waitForResponse();
void sendMessage(const QString &text) throw (SendMessageTimeoutException); void sendMessage(const QString &text);
/* [5] --- */ /* [5] --- */