summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemlinkhandler.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-07 17:12:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-07 17:12:59 +0300
commit2538267ce30c5cfe3bbf23442e7c3a80e647f260 (patch)
tree5490d8aa2931645af09e35cee0e6b255592103a9 /src/gui/widgets/itemlinkhandler.h
parent7807ed17587b09c39dcd815a554f48e2f6ecb346 (diff)
downloadplus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.gz
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.bz2
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.xz
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.zip
For commands in links in chat ask before executing command.
Diffstat (limited to 'src/gui/widgets/itemlinkhandler.h')
-rw-r--r--src/gui/widgets/itemlinkhandler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h
index 6350b9fc3..6a0f87cb7 100644
--- a/src/gui/widgets/itemlinkhandler.h
+++ b/src/gui/widgets/itemlinkhandler.h
@@ -39,9 +39,12 @@ class ItemLinkHandler final : public LinkHandler
void handleLink(const std::string &link,
MouseEvent *event) override final;
+ void setAllowCommands(const bool b)
+ { mAllowCommands = b; }
+
private:
- static void handleCommandLink(const std::string &link,
- const std::string &prefix);
+ void handleCommandLink(const std::string &link,
+ const std::string &prefix);
static void handleHelpLink(const std::string &link);
@@ -51,6 +54,8 @@ class ItemLinkHandler final : public LinkHandler
static void handleItemLink(const std::string &link);
static void handleSearchLink(const std::string &link);
+
+ bool mAllowCommands;
};
#endif // GUI_WIDGETS_ITEMLINKHANDLER_H