Commit 31b9eac2 authored by Laurent Montel's avatar Laurent Montel 😁

Remove mailtransport namespace

parent c508520d
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QPushButton> #include <QPushButton>
#include <QDebug>
using namespace MailTransport; using namespace MailTransport;
SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent) SendMailConfigDialog::SendMailConfigDialog(MailTransport::Transport *transport, QWidget *parent)
: QDialog(parent) : QDialog(parent)
, mTransport(transport) , mTransport(transport)
, mConfigWidget(nullptr) , mConfigWidget(nullptr)
...@@ -50,7 +49,7 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent ...@@ -50,7 +49,7 @@ SendMailConfigDialog::SendMailConfigDialog(Transport *transport, QWidget *parent
connect(mOkButton, &QAbstractButton::clicked, this, &SendMailConfigDialog::okClicked); connect(mOkButton, &QAbstractButton::clicked, this, &SendMailConfigDialog::okClicked);
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(mConfigWidget, &SendmailConfigWidget::enableButtonOk, this, &SendMailConfigDialog::slotEnabledOkButton); connect(mConfigWidget, &MailTransport::SendmailConfigWidget::enableButtonOk, this, &SendMailConfigDialog::slotEnabledOkButton);
slotEnabledOkButton(!mConfigWidget->pathIsEmpty()); slotEnabledOkButton(!mConfigWidget->pathIsEmpty());
} }
...@@ -73,5 +72,3 @@ void SendMailConfigDialog::slotTextChanged(const QString &text) ...@@ -73,5 +72,3 @@ void SendMailConfigDialog::slotTextChanged(const QString &text)
{ {
mOkButton->setEnabled(!text.isEmpty()); mOkButton->setEnabled(!text.isEmpty());
} }
#include "moc_sendmailconfigdialog.cpp"
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
namespace MailTransport { namespace MailTransport {
class Transport; class Transport;
class SendmailConfigWidget; class SendmailConfigWidget;
}
class SendMailConfigDialog : public QDialog class SendMailConfigDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit SendMailConfigDialog(Transport *transport, QWidget *parent = nullptr); explicit SendMailConfigDialog(MailTransport::Transport *transport, QWidget *parent = nullptr);
virtual ~SendMailConfigDialog(); virtual ~SendMailConfigDialog();
private: private:
...@@ -37,10 +37,9 @@ private: ...@@ -37,10 +37,9 @@ private:
void slotTextChanged(const QString &text); void slotTextChanged(const QString &text);
void slotEnabledOkButton(bool); void slotEnabledOkButton(bool);
Transport *mTransport; MailTransport::Transport *mTransport;
MailTransport::SendmailConfigWidget *mConfigWidget; MailTransport::SendmailConfigWidget *mConfigWidget;
QPushButton *mOkButton; QPushButton *mOkButton;
}; };
} // namespace MailTransport
#endif #endif
...@@ -49,8 +49,8 @@ QVector<MailTransport::TransportAbstractPluginInfo> SendMailTransportPlugin::nam ...@@ -49,8 +49,8 @@ QVector<MailTransport::TransportAbstractPluginInfo> SendMailTransportPlugin::nam
bool SendMailTransportPlugin::configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent) bool SendMailTransportPlugin::configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent)
{ {
Q_UNUSED(identifier); Q_UNUSED(identifier);
QPointer<MailTransport::SendMailConfigDialog> transportConfigDialog QPointer<SendMailConfigDialog> transportConfigDialog
= new MailTransport::SendMailConfigDialog(transport, parent); = new SendMailConfigDialog(transport, parent);
transportConfigDialog->setWindowTitle(i18n("Configure account")); transportConfigDialog->setWindowTitle(i18n("Configure account"));
bool okClicked = (transportConfigDialog->exec() == QDialog::Accepted); bool okClicked = (transportConfigDialog->exec() == QDialog::Accepted);
delete transportConfigDialog; delete transportConfigDialog;
......
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