From 7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 May 2015 22:04:29 +0300 Subject: Add strong typed bool type TryRemoveColors. --- src/gui/widgets/tabs/chat/chattab.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/tabs/chat/chattab.cpp') diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 072ab677e..dd2ff9a54 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -109,7 +109,7 @@ ChatTab::~ChatTab() void ChatTab::chatLog(std::string line, ChatMsgType::Type own, const IgnoreRecord ignoreRecord, - const bool tryRemoveColors) + const TryRemoveColors tryRemoveColors) { // Trim whitespace trim(line); @@ -117,7 +117,8 @@ void ChatTab::chatLog(std::string line, if (line.empty()) return; - if (tryRemoveColors && own == ChatMsgType::BY_OTHER && + if (tryRemoveColors == TryRemoveColors_true && + own == ChatMsgType::BY_OTHER && config.getBoolValue("removeColors")) { line = removeColors(line); @@ -364,7 +365,7 @@ void ChatTab::chatLog(const std::string &nick, std::string msg) chatLog(std::string(nick).append(" : ").append(msg), byWho, IgnoreRecord_false, - false); + TryRemoveColors_false); } void ChatTab::chatInput(const std::string &message) -- cgit v1.2.3-60-g2f50