summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-30 19:46:22 +0200
committerMontel Laurent <[email protected]>2017-06-30 19:46:22 +0200
commit226e34eff408d89cec0518c5ed8f27d8682b3530 (patch)
tree0d222e2379c4a8313b5e14ee41501c32fe9bcd79
parent248fba6111e0ff2649ef0dbc3b421996a5888cf7 (diff)
Clean up. Fix update ok button
-rw-r--r--CMakeLists.txt2
-rw-r--r--kmailtransport/sendmail/sendmailconfigdialog.cpp3
-rw-r--r--kmailtransport/sendmail/sendmailconfigdialog.h4
-rw-r--r--kmailtransport/sendmail/sendmailconfigwidget.cpp6
-rw-r--r--kmailtransport/sendmail/sendmailjob.h2
-rw-r--r--kmailtransport/sendmail/sendmailtransportplugin.cpp5
-rw-r--r--kmailtransport/sendmail/sendmailtransportplugin.h1
7 files changed, 10 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6010a43..a9276c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,7 @@ set(CALENDAR_UTILS_VERSION "5.5.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.5.40")
set(KIMAP_LIB_VERSION "5.5.40")
set(LIBKSIEVE_LIB_VERSION_LIB "5.5.46")
-set(KMAILTRANSPORT_LIB_VERSION "5.5.65")
+set(KMAILTRANSPORT_LIB_VERSION "5.5.66")
set(AKONADICONTACT_LIB_VERSION "5.5.43")
set(IMPORTWIZARD_LIB_VERSION "5.5.42")
set(MAILIMPORTER_LIB_VERSION "5.5.40")
diff --git a/kmailtransport/sendmail/sendmailconfigdialog.cpp b/kmailtransport/sendmail/sendmailconfigdialog.cpp
index cfa8889..e83f28a 100644
--- a/kmailtransport/sendmail/sendmailconfigdialog.cpp
+++ b/kmailtransport/sendmail/sendmailconfigdialog.cpp
@@ -74,8 +74,10 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent
d->transport = transport;
QVBoxLayout *mainLayout = new QVBoxLayout(this);
d->configWidget = new MailTransport::SendmailConfigWidget(transport, this);
+ d->configWidget->setObjectName(QStringLiteral("sendmailconfigwidget"));
mainLayout->addWidget(d->configWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
+ buttonBox->setObjectName(QStringLiteral("buttonbox"));
d->okButton = buttonBox->button(QDialogButtonBox::Ok);
d->okButton->setEnabled(false);
d->okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
@@ -85,6 +87,7 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent
connect(buttonBox, &QDialogButtonBox::accepted, this, &SendMailConfigDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &SendMailConfigDialog::reject);
connect(d->configWidget, SIGNAL(enableButtonOk(bool)), this, SLOT(slotEnabledOkButton(bool)));
+ d->slotEnabledOkButton(!d->configWidget->pathIsEmpty());
}
SendMailConfigDialog::~SendMailConfigDialog()
diff --git a/kmailtransport/sendmail/sendmailconfigdialog.h b/kmailtransport/sendmail/sendmailconfigdialog.h
index fc982ec..abb9354 100644
--- a/kmailtransport/sendmail/sendmailconfigdialog.h
+++ b/kmailtransport/sendmail/sendmailconfigdialog.h
@@ -17,8 +17,8 @@
02110-1301, USA.
*/
-#ifndef MAILTRANSPORT_SENDMailTRANSPORTCONFIGDIALOG_H
-#define MAILTRANSPORT_SENDMailTRANSPORTCONFIGDIALOG_H
+#ifndef MAILTRANSPORT_SENDMAILTRANSPORTCONFIGDIALOG_H
+#define MAILTRANSPORT_SENDMAILTRANSPORTCONFIGDIALOG_H
#include <QDialog>
diff --git a/kmailtransport/sendmail/sendmailconfigwidget.cpp b/kmailtransport/sendmail/sendmailconfigwidget.cpp
index 2d76b26..aa803c7 100644
--- a/kmailtransport/sendmail/sendmailconfigwidget.cpp
+++ b/kmailtransport/sendmail/sendmailconfigwidget.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013 Laurent Montel <[email protected]>
+ Copyright (c) 2013-2017 Laurent Montel <[email protected]>
Copyright (c) 2009 Constantin Berzan <[email protected]>
Based on MailTransport code by:
@@ -75,11 +75,11 @@ void SendmailConfigWidget::init()
void SendmailConfigWidget::slotTextChanged(const QString &text)
{
- Q_EMIT enableButtonOk(!text.isEmpty());
+ Q_EMIT enableButtonOk(!text.trimmed().isEmpty());
}
bool SendmailConfigWidget::pathIsEmpty() const
{
Q_D(const SendmailConfigWidget);
- return d->ui.kcfg_host->text().isEmpty();
+ return d->ui.kcfg_host->text().trimmed().isEmpty();
}
diff --git a/kmailtransport/sendmail/sendmailjob.h b/kmailtransport/sendmail/sendmailjob.h
index 067da6e..697fab8 100644
--- a/kmailtransport/sendmail/sendmailjob.h
+++ b/kmailtransport/sendmail/sendmailjob.h
@@ -36,7 +36,7 @@ namespace MailTransport {
@deprecated Use MessageQueueJob for sending e-mail.
*/
-class MAILTRANSPORT_DEPRECATED_EXPORT SendmailJob : public TransportJob
+class SendmailJob : public TransportJob
{
Q_OBJECT
public:
diff --git a/kmailtransport/sendmail/sendmailtransportplugin.cpp b/kmailtransport/sendmail/sendmailtransportplugin.cpp
index 070ccab..b8094e5 100644
--- a/kmailtransport/sendmail/sendmailtransportplugin.cpp
+++ b/kmailtransport/sendmail/sendmailtransportplugin.cpp
@@ -57,11 +57,6 @@ bool SendMailTransportPlugin::configureTransport(const QString &identifier, Mail
return okClicked;
}
-void SendMailTransportPlugin::cleanUp(const QString &identifier)
-{
- Q_UNUSED(identifier);
-}
-
MailTransport::TransportJob *SendMailTransportPlugin::createTransportJob(MailTransport::Transport *t, const QString &identifier)
{
Q_UNUSED(identifier);
diff --git a/kmailtransport/sendmail/sendmailtransportplugin.h b/kmailtransport/sendmail/sendmailtransportplugin.h
index 067dd5b..a97a1c8 100644
--- a/kmailtransport/sendmail/sendmailtransportplugin.h
+++ b/kmailtransport/sendmail/sendmailtransportplugin.h
@@ -32,7 +32,6 @@ public:
});
~SendMailTransportPlugin();
- void cleanUp(const QString &identifier) override;
QVector<MailTransport::TransportAbstractPluginInfo> names() const override;
bool configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent) override;
MailTransport::TransportJob *createTransportJob(MailTransport::Transport *t, const QString &identifier) override;