mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed clicking on external url in MessageWidget
This commit is contained in:
parent
0d4eafde31
commit
50867d2503
@ -28,6 +28,7 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
#include "gui/notifyqt.h"
|
#include "gui/notifyqt.h"
|
||||||
#include "gui/RetroShareLink.h"
|
#include "gui/RetroShareLink.h"
|
||||||
@ -756,18 +757,19 @@ void MessageWidget::anchorClicked(const QUrl &url)
|
|||||||
{
|
{
|
||||||
RetroShareLink link(url);
|
RetroShareLink link(url);
|
||||||
|
|
||||||
if (link.valid() == false) {
|
if(link.valid())
|
||||||
return;
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<RetroShareLink> links;
|
||||||
|
links.append(link);
|
||||||
|
RetroShareLink::process(links);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (link.type() == RetroShareLink::TYPE_CERTIFICATE && currMsgFlags & RS_MSG_USER_REQUEST) {
|
QDesktopServices::openUrl(url) ;
|
||||||
std::cerr << "(WW) Calling some disabled code in MessageWidget::anchorClicked(). Please contact the developpers." << std::endl;
|
|
||||||
// link.setSubType(RSLINK_SUBTYPE_CERTIFICATE_USER_REQUEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<RetroShareLink> links;
|
|
||||||
links.append(link);
|
|
||||||
RetroShareLink::process(links);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageWidget::loadImagesAlways()
|
void MessageWidget::loadImagesAlways()
|
||||||
|
Loading…
Reference in New Issue
Block a user