From d09e19191c7395893adbf5feaa10fa8f0839cd1d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 18:24:24 +0300 Subject: Use CREATEWIDGET macro in changeemaildialog. --- src/gui/windows/changeemaildialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp index fdafe5fed..c5259e33a 100644 --- a/src/gui/windows/changeemaildialog.cpp +++ b/src/gui/windows/changeemaildialog.cpp @@ -27,6 +27,7 @@ #include "gui/windows/okdialog.h" #include "gui/widgets/button.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/label.h" #include "gui/widgets/textfield.h" @@ -160,8 +161,9 @@ void ChangeEmailDialog::action(const ActionEvent &event) else // if (error == 2) mWrongDataNoticeListener->setTarget(this->mSecondEmailField); - // TRANSLATORS: change email error header - OkDialog *const dlg = new OkDialog(_("Error"), + OkDialog *const dlg = CREATEWIDGETR(OkDialog, + // TRANSLATORS: change email error header + _("Error"), errorMsg.str(), // TRANSLATORS: ok dialog button _("OK"), @@ -170,7 +172,6 @@ void ChangeEmailDialog::action(const ActionEvent &event) ShowCenter_true, nullptr, 260); - dlg->postInit(); dlg->addActionListener(mWrongDataNoticeListener); } else -- cgit v1.2.3-70-g09d2