2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -36,6 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "observer_peer.h"
#include "storage/storage_databases.h"
#include "mainwidget.h"
#include "core/file_utilities.h"
#include "main/main_account.h"
#include "media/view/media_view_overlay_widget.h"
#include "mtproto/dc_options.h"
@@ -300,7 +301,7 @@ void Application::showDocument(not_null<DocumentData*> document, HistoryItem *it
if (cUseExternalVideoPlayer()
&& document->isVideoFile()
&& document->loaded()) {
QDesktopServices::openUrl(QUrl("file:///" + document->location(false).fname));
File::Launch(document->location(false).fname);
} else {
_mediaView->showDocument(document, item);
_mediaView->activateWindow();