diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-14 18:08:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-14 18:08:56 +0300 |
commit | b37d2f3d9b7b871f3624b5939a2204a96308d871 (patch) | |
tree | 4297c22d2264e020cb5b2fed72c379f0c900272e | |
parent | c5a623b0787b4a6708f2bf039f5aaa8be65d7e29 (diff) | |
download | mv-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.gz mv-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.bz2 mv-b37d2f3d9b7b871f3624b5939a2204a96308d871.tar.xz mv-b37d2f3d9b7b871f3624b5939a2204a96308d871.zip |
Use CREATEWIDGET macro in itemlinkhandler.
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 11 |
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) |