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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user