file_utilities_mac.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "platform/platform_file_utilities.h"
  9. namespace Platform {
  10. namespace File {
  11. inline void UnsafeOpenUrl(const QString &url) {
  12. return ::File::internal::UnsafeOpenUrlDefault(url);
  13. }
  14. inline void UnsafeOpenEmailLink(const QString &email) {
  15. return ::File::internal::UnsafeOpenEmailLinkDefault(email);
  16. }
  17. inline void PostprocessDownloaded(const QString &filepath) {
  18. }
  19. } // namespace File
  20. namespace FileDialog {
  21. inline void InitLastPath() {
  22. ::FileDialog::internal::InitLastPathDefault();
  23. }
  24. inline bool Get(
  25. QPointer<QWidget> parent,
  26. QStringList &files,
  27. QByteArray &remoteContent,
  28. const QString &caption,
  29. const QString &filter,
  30. ::FileDialog::internal::Type type,
  31. QString startFile) {
  32. return ::FileDialog::internal::GetDefault(
  33. parent,
  34. files,
  35. remoteContent,
  36. caption,
  37. filter,
  38. type,
  39. startFile);
  40. }
  41. } // namespace FileDialog
  42. } // namespace Platform