From 7ddcc47fcd49850bfb8fbef9efb4f6f35ed1e0b9 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 29 Sep 2023 21:59:14 +0400 Subject: [PATCH] Make UnsafeShowOpenWith inline on Linux --- .../platform/linux/file_utilities_linux.cpp | 12 ------------ .../platform/linux/file_utilities_linux.h | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index e4cf30fac..2f9c0d9f9 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -6,15 +6,3 @@ For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "platform/linux/file_utilities_linux.h" - -#include "platform/linux/linux_xdp_open_with_dialog.h" - -namespace Platform { -namespace File { - -bool UnsafeShowOpenWith(const QString &filepath) { - return internal::ShowXDPOpenWithDialog(filepath); -} - -} // namespace File -} // namespace Platform diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.h b/Telegram/SourceFiles/platform/linux/file_utilities_linux.h index 2054d3f32..baced1178 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.h +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.h @@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "platform/platform_file_utilities.h" +#include "platform/linux/linux_xdp_open_with_dialog.h" + namespace Platform { namespace File { @@ -28,6 +30,10 @@ inline bool UnsafeShowOpenWithDropdown(const QString &filepath) { return false; } +inline bool UnsafeShowOpenWith(const QString &filepath) { + return internal::ShowXDPOpenWithDialog(filepath); +} + inline void UnsafeLaunch(const QString &filepath) { return ::File::internal::UnsafeLaunchDefault(filepath); }