Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
#include <QObject> | ||
#include <QtWebEngineWidgets/QWebEnginePage> | ||
#include <QDesktopServices> | ||
#include <QMessageBox> | ||
|
||
class TsWebEnginePage : public QWebEnginePage | ||
{ | ||
|
@@ -24,9 +25,20 @@ class TsWebEnginePage : public QWebEnginePage | |
{ | ||
if (type == NavigationTypeLinkClicked && isMainFrame == true) | ||
{ | ||
QDesktopServices::openUrl(url); | ||
return false; | ||
if (url.scheme() == "ts3file") | ||
{ | ||
emit fileUrlClicked(url); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Bluscream
Contributor
|
||
return false; | ||
} | ||
else | ||
{ | ||
QDesktopServices::openUrl(url); | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
signals: | ||
void fileUrlClicked(const QUrl url); | ||
}; |
How in the world did got that information? :o