summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-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)