Commit 226e34ef authored by Laurent Montel's avatar Laurent Montel 😁

Clean up. Fix update ok button

parent 248fba61
...@@ -76,7 +76,7 @@ set(CALENDAR_UTILS_VERSION "5.5.40") ...@@ -76,7 +76,7 @@ set(CALENDAR_UTILS_VERSION "5.5.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.5.40") set(KPIMTEXTEDIT_LIB_VERSION "5.5.40")
set(KIMAP_LIB_VERSION "5.5.40") set(KIMAP_LIB_VERSION "5.5.40")
set(LIBKSIEVE_LIB_VERSION_LIB "5.5.46") 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(AKONADICONTACT_LIB_VERSION "5.5.43")
set(IMPORTWIZARD_LIB_VERSION "5.5.42") set(IMPORTWIZARD_LIB_VERSION "5.5.42")
set(MAILIMPORTER_LIB_VERSION "5.5.40") set(MAILIMPORTER_LIB_VERSION "5.5.40")
......
...@@ -74,8 +74,10 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent ...@@ -74,8 +74,10 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent
d->transport = transport; d->transport = transport;
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
d->configWidget = new MailTransport::SendmailConfigWidget(transport, this); d->configWidget = new MailTransport::SendmailConfigWidget(transport, this);
d->configWidget->setObjectName(QStringLiteral("sendmailconfigwidget"));
mainLayout->addWidget(d->configWidget); mainLayout->addWidget(d->configWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
d->okButton = buttonBox->button(QDialogButtonBox::Ok); d->okButton = buttonBox->button(QDialogButtonBox::Ok);
d->okButton->setEnabled(false); d->okButton->setEnabled(false);
d->okButton->setShortcut(Qt::CTRL | Qt::Key_Return); d->okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
...@@ -85,6 +87,7 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent ...@@ -85,6 +87,7 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent
connect(buttonBox, &QDialogButtonBox::accepted, this, &SendMailConfigDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &SendMailConfigDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &SendMailConfigDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &SendMailConfigDialog::reject);
connect(d->configWidget, SIGNAL(enableButtonOk(bool)), this, SLOT(slotEnabledOkButton(bool))); connect(d->configWidget, SIGNAL(enableButtonOk(bool)), this, SLOT(slotEnabledOkButton(bool)));
d->slotEnabledOkButton(!d->configWidget->pathIsEmpty());
} }
SendMailConfigDialog::~SendMailConfigDialog() SendMailConfigDialog::~SendMailConfigDialog()
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
02110-1301, USA. 02110-1301, USA.
*/ */
#ifndef MAILTRANSPORT_SENDMailTRANSPORTCONFIGDIALOG_H #ifndef MAILTRANSPORT_SENDMAILTRANSPORTCONFIGDIALOG_H
#define MAILTRANSPORT_SENDMailTRANSPORTCONFIGDIALOG_H #define MAILTRANSPORT_SENDMAILTRANSPORTCONFIGDIALOG_H
#include <QDialog> #include <QDialog>
......
/* /*
Copyright (c) 2013 Laurent Montel <montel@kde.org> Copyright (c) 2013-2017 Laurent Montel <montel@kde.org>
Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com> Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
Based on MailTransport code by: Based on MailTransport code by:
...@@ -75,11 +75,11 @@ void SendmailConfigWidget::init() ...@@ -75,11 +75,11 @@ void SendmailConfigWidget::init()
void SendmailConfigWidget::slotTextChanged(const QString &text) void SendmailConfigWidget::slotTextChanged(const QString &text)
{ {
Q_EMIT enableButtonOk(!text.isEmpty()); Q_EMIT enableButtonOk(!text.trimmed().isEmpty());
} }
bool SendmailConfigWidget::pathIsEmpty() const bool SendmailConfigWidget::pathIsEmpty() const
{ {
Q_D(const SendmailConfigWidget); Q_D(const SendmailConfigWidget);
return d->ui.kcfg_host->text().isEmpty(); return d->ui.kcfg_host->text().trimmed().isEmpty();
} }
...@@ -36,7 +36,7 @@ namespace MailTransport { ...@@ -36,7 +36,7 @@ namespace MailTransport {
@deprecated Use MessageQueueJob for sending e-mail. @deprecated Use MessageQueueJob for sending e-mail.
*/ */
class MAILTRANSPORT_DEPRECATED_EXPORT SendmailJob : public TransportJob class SendmailJob : public TransportJob
{ {
Q_OBJECT Q_OBJECT
public: public:
......
...@@ -57,11 +57,6 @@ bool SendMailTransportPlugin::configureTransport(const QString &identifier, Mail ...@@ -57,11 +57,6 @@ bool SendMailTransportPlugin::configureTransport(const QString &identifier, Mail
return okClicked; return okClicked;
} }
void SendMailTransportPlugin::cleanUp(const QString &identifier)
{
Q_UNUSED(identifier);
}
MailTransport::TransportJob *SendMailTransportPlugin::createTransportJob(MailTransport::Transport *t, const QString &identifier) MailTransport::TransportJob *SendMailTransportPlugin::createTransportJob(MailTransport::Transport *t, const QString &identifier)
{ {
Q_UNUSED(identifier); Q_UNUSED(identifier);
......
...@@ -32,7 +32,6 @@ public: ...@@ -32,7 +32,6 @@ public:
}); });
~SendMailTransportPlugin(); ~SendMailTransportPlugin();
void cleanUp(const QString &identifier) override;
QVector<MailTransport::TransportAbstractPluginInfo> names() const override; QVector<MailTransport::TransportAbstractPluginInfo> names() const override;
bool configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent) override; bool configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent) override;
MailTransport::TransportJob *createTransportJob(MailTransport::Transport *t, const QString &identifier) override; MailTransport::TransportJob *createTransportJob(MailTransport::Transport *t, const QString &identifier) override;
......
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