summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 18:08:56 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 18:08:56 +0300
commitb37d2f3d9b7b871f3624b5939a2204a96308d871 (patch)
tree4297c22d2264e020cb5b2fed72c379f0c900272e /src/gui
parentc5a623b0787b4a6708f2bf039f5aaa8be65d7e29 (diff)
downloadmanaverse-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.gz
manaverse-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.bz2
manaverse-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.xz
manaverse-b37d2f3d9b7b871f3624b5939a2204a96308d871.zip
Use CREATEWIDGET macro in itemlinkhandler.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 9953d0e6b..a9ffd3d7b 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -27,6 +27,8 @@
#include "gui/popups/itempopup.h"
#include "gui/popups/popupmenu.h"
+#include "gui/widgets/createwidget.h"
+
#include "gui/windows/confirmdialog.h"
#include "gui/windows/helpwindow.h"
@@ -65,10 +67,13 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
const MouseButtonT button = event->getButton();
if (button == MouseButton::LEFT)
{
- ConfirmDialog *const confirmDlg = new ConfirmDialog(
+ ConfirmDialog *const confirmDlg = CREATEWIDGETR(ConfirmDialog,
// TRANSLATORS: dialog message
- _("Open url"), url, SOUND_REQUEST, false, Modal_true);
- confirmDlg->postInit();
+ _("Open url"),
+ url,
+ SOUND_REQUEST,
+ false,
+ Modal_true);
confirmDlg->addActionListener(&listener);
}
else if (button == MouseButton::RIGHT)