Description: use xdg-open to open things in external applications Credits: novie diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index 0489ece0d..71d8836b9 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -27,6 +27,7 @@ namespace Platform { namespace File { void UnsafeOpenUrl(const QString &url) { +#if 0 try { if (Gio::AppInfo::launch_default_for_uri(url.toStdString())) { return; @@ -38,6 +39,7 @@ void UnsafeOpenUrl(const QString &url) { if (QDesktopServices::openUrl(url)) { return; } +#endif QProcess::startDetached(qsl("xdg-open"), { url }); } @@ -65,6 +67,7 @@ bool UnsafeShowOpenWith(const QString &filepath) { } void UnsafeLaunch(const QString &filepath) { +#if 0 try { if (Gio::AppInfo::launch_default_for_uri( Glib::filename_to_uri(filepath.toStdString()))) { @@ -77,6 +80,7 @@ void UnsafeLaunch(const QString &filepath) { if (UnsafeShowOpenWith(filepath)) { return; } +#endif const auto qUrlPath = QUrl::fromLocalFile(filepath); if (QDesktopServices::openUrl(qUrlPath)) {