aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmniTroid <davidskoland@gmail.com>2017-05-24 16:06:49 +0200
committerOmniTroid <davidskoland@gmail.com>2017-05-24 16:06:49 +0200
commit1f0560d63f1df902c1c540ae3562f2597ff34e49 (patch)
tree5e475b653e3a5ba0ad9c6410642a747dc51fce78
parent819034e5ad85e9d1bc367bb74723f0cef7c6e4ac (diff)
fixed ANOTHER bug with hyperlinks zzzzz 2.4.1
-rw-r--r--Attorney_Online_remake.pro2
-rw-r--r--aotextarea.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/Attorney_Online_remake.pro b/Attorney_Online_remake.pro
index 3f7e02ed..3028e033 100644
--- a/Attorney_Online_remake.pro
+++ b/Attorney_Online_remake.pro
@@ -13,7 +13,7 @@ RC_ICONS = logo.ico
TARGET = Attorney_Online_remake
TEMPLATE = app
-VERSION = 2.4.0.0
+VERSION = 2.4.1.0
SOURCES += main.cpp\
lobby.cpp \
diff --git a/aotextarea.cpp b/aotextarea.cpp
index bbdf946e..8b83e540 100644
--- a/aotextarea.cpp
+++ b/aotextarea.cpp
@@ -22,6 +22,8 @@ void AOTextArea::append_chatmessage(QString p_name, QString p_message)
QRegExp regExp("((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[\\-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9\\.\\-]+|(?:www\\.|[\\-;:&=\\+\\$,\\w]+@)[A-Za-z0-9\\.\\-]+)((?:\\/[\\+~%\\/\\.\\w\\-]*)?\\??(?:[\\-\\+=&;%@\\.\\w]*)#?(?:[\\.\\!\\/\\\\\\w]*))?)");
+ //cheap workarounds ahoy
+ p_message += " ";
QString result = p_message.toHtmlEscaped().replace("\n", "<br>").replace(regExp, "<a href='\\1'>\\1</a>" );
this->insertHtml(result);