Open url using QDesktopServices from Qml
This fixes some weirdness on some platforms, where Qt.openUrlExternally does weird stuff.
This commit is contained in:
parent
d72eb5eb2d
commit
8d3ab300b6
3 changed files with 10 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue