fixed clicking on external url in MessageWidget

This commit is contained in:
csoler 2018-08-01 20:31:48 +02:00
parent 0d4eafde31
commit 50867d2503
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -28,6 +28,7 @@
#include <QFile>
#include <QTextStream>
#include <QTextCodec>
#include <QDesktopServices>
#include "gui/notifyqt.h"
#include "gui/RetroShareLink.h"
@ -756,10 +757,8 @@ void MessageWidget::anchorClicked(const QUrl &url)
{
RetroShareLink link(url);
if (link.valid() == false) {
return;
}
if(link.valid())
{
if (link.type() == RetroShareLink::TYPE_CERTIFICATE && currMsgFlags & RS_MSG_USER_REQUEST) {
std::cerr << "(WW) Calling some disabled code in MessageWidget::anchorClicked(). Please contact the developpers." << std::endl;
// link.setSubType(RSLINK_SUBTYPE_CERTIFICATE_USER_REQUEST);
@ -769,6 +768,9 @@ void MessageWidget::anchorClicked(const QUrl &url)
links.append(link);
RetroShareLink::process(links);
}
else
QDesktopServices::openUrl(url) ;
}
void MessageWidget::loadImagesAlways()
{