2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Don't use QDesktopServices::openUrl on snap

This commit is contained in:
Ilya Fedin
2020-04-28 12:26:12 +04:00
committed by John Preston
parent 9828262a03
commit 95b4f56b86
13 changed files with 72 additions and 20 deletions

View File

@@ -118,6 +118,13 @@ QString filedialogNextFilename(
namespace File {
void OpenUrl(const QString &url) {
crl::on_main([=] {
Ui::PreventDelayedActivation();
Platform::File::UnsafeOpenUrl(url);
});
}
void OpenEmailLink(const QString &email) {
crl::on_main([=] {
Ui::PreventDelayedActivation();
@@ -162,6 +169,10 @@ QString DefaultDownloadPath() {
namespace internal {
void UnsafeOpenUrlDefault(const QString &url) {
QDesktopServices::openUrl(url);
}
void UnsafeOpenEmailLinkDefault(const QString &email) {
auto url = QUrl(qstr("mailto:") + email);
QDesktopServices::openUrl(url);