From 0c33d81c597ddfd43d6fd9b7b5abc70910ee2696 Mon Sep 17 00:00:00 2001 From: blue Date: Fri, 6 Dec 2019 11:00:09 +0300 Subject: [PATCH] insignifican fixes about urls parsing --- core/networkaccess.cpp | 2 +- ui/utils/message.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/networkaccess.cpp b/core/networkaccess.cpp index 6e1689d..2973a6c 100644 --- a/core/networkaccess.cpp +++ b/core/networkaccess.cpp @@ -289,7 +289,7 @@ void Core::NetworkAccess::onDownloadFinished() QStringList hops = url.split("/"); QString fileName = hops.back(); QStringList parts = fileName.split("."); - path = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation); + path = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + "/"; QString suffix(""); QString realName = parts.front(); for (QStringList::const_iterator sItr = (parts.begin()++), sEnd = parts.end(); sItr != sEnd; ++sItr) { diff --git a/ui/utils/message.cpp b/ui/utils/message.cpp index eb4b608..1dc35b7 100644 --- a/ui/utils/message.cpp +++ b/ui/utils/message.cpp @@ -20,10 +20,11 @@ #include #include #include +#include #include "message.h" -const QRegExp urlReg("(?!"); bd.replace(urlReg, "\\1"); + text->setTextFormat(Qt::RichText); text->setText(bd);; text->setTextInteractionFlags(text->textInteractionFlags() | Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse); text->setWordWrap(true);