Open url using QDesktopServices from Qml

This fixes some weirdness on some platforms, where Qt.openUrlExternally
does weird stuff.
This commit is contained in:
Nicolas Werner 2020-07-09 00:45:37 +02:00
parent d72eb5eb2d
commit 8d3ab300b6
3 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,6 @@
#include "TimelineViewManager.h"
#include <QDesktopServices>
#include <QMetaType>
#include <QPalette>
#include <QQmlContext>
@ -219,6 +220,12 @@ TimelineViewManager::openImageOverlay(QString mxcUrl, QString eventId) const
});
}
void
TimelineViewManager::openLink(QString link) const
{
QDesktopServices::openUrl(link);
}
void
TimelineViewManager::updateReadReceipts(const QString &room_id,
const std::vector<QString> &event_ids)