From 0e13e22e4902eca435812ae002c56ad13233efc6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 21:16:40 +0300 Subject: Use CREATEWIDGET macro in charserverhandler. --- src/net/tmwa/charserverhandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index e27e2c125..859be0bed 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -29,6 +29,8 @@ #include "gui/windows/charcreatedialog.h" #include "gui/windows/okdialog.h" +#include "gui/widgets/createwidget.h" + #include "net/character.h" #include "net/serverfeatures.h" @@ -522,15 +524,18 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg) BLOCK_START("CharServerHandler::processCharDeleteFailed") unlockCharSelectDialog(); msg.readUInt8("error"); - // TRANSLATORS: error message - (new OkDialog(_("Error"), _("Failed to delete character."), + CREATEWIDGET(OkDialog, + // TRANSLATORS: error header + _("Error"), + // TRANSLATORS: error message + _("Failed to delete character."), // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, Modal_true, ShowCenter_true, nullptr, - 260))->postInit(); + 260); BLOCK_END("CharServerHandler::processCharDeleteFailed") } -- cgit v1.2.3-70-g09d2