summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/channeltab.cpp2
-rw-r--r--src/gui/widgets/channeltab.h2
-rw-r--r--src/gui/widgets/chattab.cpp2
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/whispertab.cpp4
-rw-r--r--src/gui/widgets/whispertab.h4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp
index f8c92a6e..c17aec0a 100644
--- a/src/gui/widgets/channeltab.cpp
+++ b/src/gui/widgets/channeltab.cpp
@@ -63,7 +63,7 @@ ChannelTab::~ChannelTab()
{
}
-void ChannelTab::sendChat(std::string &msg) {
+void ChannelTab::sendChat(const std::string &msg) {
#ifdef TMSERV_SUPPORT
Net::ChatServer::chat(getId(), msg);
#endif
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 91b4f7c6..04a11e29 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -48,7 +48,7 @@ class ChannelTab : public ChatTab
*/
~ChannelTab();
- void sendChat(std::string &msg);
+ void sendChat(const std::string &msg);
private:
Channel *mChannel;
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 46116a37..0594761d 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -323,7 +323,7 @@ void ChatTab::sendChat(std::string &msg) {
#endif
}
-void ChatTab::handleCommand(std::string msg)
+void ChatTab::handleCommand(const std::string msg)
{
commandHandler->handleCommand(msg);
}
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 14c4c130..3e64242c 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -108,7 +108,7 @@ class ChatTab : public Tab
virtual void sendChat(std::string &msg);
- virtual void handleCommand(std::string msg);
+ virtual void handleCommand(const std::string msg);
ScrollArea *mScrollArea;
BrowserBox *mTextOutput;
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp
index 8af8d427..1c63d1c9 100644
--- a/src/gui/widgets/whispertab.cpp
+++ b/src/gui/widgets/whispertab.cpp
@@ -58,7 +58,7 @@ WhisperTab::~WhisperTab()
chatWindow->removeWhisper(mNick);
}
-void WhisperTab::sendChat(std::string &msg) {
+void WhisperTab::sendChat(const std::string &msg) {
if (msg.length() == 0) {
chatLog(_("Cannot send empty chat!"), BY_SERVER, false);
return;
@@ -78,7 +78,7 @@ void WhisperTab::sendChat(std::string &msg) {
msg.c_str()), BY_PLAYER, false);
}
-void WhisperTab::handleCommand(std::string msg)
+void WhisperTab::handleCommand(const std::string msg)
{
if (msg == "close")
delete this;
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 6f9db1ee..1d2f968d 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -46,9 +46,9 @@ class WhisperTab : public ChatTab
~WhisperTab();
- void sendChat(std::string &msg);
+ void sendChat(const std::string &msg);
- void handleCommand(std::string msg);
+ void handleCommand(const std::string msg);
private:
std::string mNick;