diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index 4f111a6e0a..e4cf30facc 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -17,29 +17,4 @@ bool UnsafeShowOpenWith(const QString &filepath) { } } // namespace File - -namespace FileDialog { - -bool Get( - QPointer parent, - QStringList &files, - QByteArray &remoteContent, - const QString &caption, - const QString &filter, - ::FileDialog::internal::Type type, - QString startFile) { - if (parent) { - parent = parent->window(); - } - return ::FileDialog::internal::GetDefault( - parent, - files, - remoteContent, - caption, - filter, - type, - startFile); -} - -} // namespace FileDialog } // namespace Platform diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.h b/Telegram/SourceFiles/platform/linux/file_utilities_linux.h index 76ccf00aa4..2054d3f32c 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.h +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.h @@ -43,5 +43,23 @@ inline void InitLastPath() { ::FileDialog::internal::InitLastPathDefault(); } +inline bool Get( + QPointer parent, + QStringList &files, + QByteArray &remoteContent, + const QString &caption, + const QString &filter, + ::FileDialog::internal::Type type, + QString startFile) { + return ::FileDialog::internal::GetDefault( + parent, + files, + remoteContent, + caption, + filter, + type, + startFile); +} + } // namespace FileDialog } // namespace Platform