Commit e0b75e92 authored by Laurent Montel's avatar Laurent Montel 😁

Don't try to autotest when server is not defined

parent 7e76ac4c
......@@ -272,6 +272,11 @@ SieveEditorUtil::SieveServerConfig ServerSieveSettings::serverSieveConfig() cons
void ServerSieveSettings::slotTest()
{
const QString server = imapServerName().isEmpty() ? serverName() : imapServerName();
if (server.isEmpty()) {
KMessageBox::error(this, i18n("Server is not defined"), i18n("Check Server"));
return;
}
//qCDebug(SIEVEEDITOR_LOG) << ui->imapServer->text();
ui->testButton->setEnabled(false);
ui->safeImap->setEnabled(false);
......@@ -286,7 +291,6 @@ void ServerSieveSettings::slotTest()
qApp->setOverrideCursor(Qt::BusyCursor);
#endif
const QString server = imapServerName().isEmpty() ? serverName() : imapServerName();
const int portValue = ui->imapPort->value();
qCDebug(SIEVEEDITOR_LOG) << "server: " << server << "port: " << portValue;
......
Markdown is supported
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