From f12e1b6512c142025324a651d926f7cee86c12ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20T=C5=91k=C3=A9s?= Date: Sun, 16 Feb 2014 18:42:33 +0200 Subject: [PATCH] Fixed waitFor* methods in SmtpClient. Updated test data. --- src/smtpclient.cpp | 6 +++--- test/connect_data.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/smtpclient.cpp b/src/smtpclient.cpp index 27b8e63..a3b326c 100644 --- a/src/smtpclient.cpp +++ b/src/smtpclient.cpp @@ -250,8 +250,8 @@ bool SmtpClient::waitForReadyConnected(int msec) { if (isReadyConnected) return true; - loop.exec(); QTimer::singleShot(msec, &loop, SLOT(quit())); + loop.exec(); return isReadyConnected; } @@ -266,8 +266,8 @@ bool SmtpClient::waitForAuthenticated(int msec) { if (isAuthenticated) return true; - loop.exec(); QTimer::singleShot(msec, &loop, SLOT(quit())); + loop.exec(); return isAuthenticated; } @@ -282,8 +282,8 @@ bool SmtpClient::waitForMailSent(int msec) { if (isMailSent) return true; + QTimer::singleShot(msec, &loop, SLOT(quit())); loop.exec(); - QTimer::singleShot(msec, &loop, SLOT(quit())); return isMailSent; } diff --git a/test/connect_data.txt b/test/connect_data.txt index d906c4e..87e9895 100644 --- a/test/connect_data.txt +++ b/test/connect_data.txt @@ -3,7 +3,6 @@ smtp.gmail.com 465 2 smtp.gmail.com 587 3 smtp.mail.yahoo.com 25 1 smtp.mail.yahoo.com 465 2 -smtp.dummysmtp.com 25 1 smtp.1and1.com 25 1 smtp.1and1.com 465 2 smtp.1and1.com 587 3