mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Remove unneeded anymore xdg-open workaround for snap
This commit is contained in:
parent
2e1f504c11
commit
572eb1f5f8
1 changed files with 2 additions and 12 deletions
|
@ -12,7 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "platform/linux/linux_xdp_open_with_dialog.h"
|
#include "platform/linux/linux_xdp_open_with_dialog.h"
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
#include <QtCore/QProcess>
|
|
||||||
#include <QtGui/QDesktopServices>
|
#include <QtGui/QDesktopServices>
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
@ -34,11 +33,7 @@ void UnsafeOpenUrl(const QString &url) {
|
||||||
}
|
}
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
if (QDesktopServices::openUrl(url)) {
|
QDesktopServices::openUrl(url);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QProcess::startDetached(qsl("xdg-open"), { url });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnsafeOpenEmailLink(const QString &email) {
|
void UnsafeOpenEmailLink(const QString &email) {
|
||||||
|
@ -71,12 +66,7 @@ void UnsafeLaunch(const QString &filepath) {
|
||||||
}
|
}
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
const auto qUrlPath = QUrl::fromLocalFile(filepath);
|
QDesktopServices::openUrl(QUrl::fromLocalFile(filepath));
|
||||||
if (QDesktopServices::openUrl(qUrlPath)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QProcess::startDetached(qsl("xdg-open"), { qUrlPath.toEncoded() });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace File
|
} // namespace File
|
||||||
|
|
Loading…
Add table
Reference in a new issue