mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Use SNAP_INSTANCE_NAME in SingleInstanceLocalServerName
That's what snapd's apparmor profiles use
This commit is contained in:
@@ -452,7 +452,10 @@ void SetApplicationIcon(const QIcon &icon) {
|
|||||||
QString SingleInstanceLocalServerName(const QString &hash) {
|
QString SingleInstanceLocalServerName(const QString &hash) {
|
||||||
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
||||||
if (KSandbox::isSnap()) {
|
if (KSandbox::isSnap()) {
|
||||||
return u"snap.telegram-desktop."_q + hash;
|
return u"snap."_q
|
||||||
|
+ qEnvironmentVariable("SNAP_INSTANCE_NAME")
|
||||||
|
+ '.'
|
||||||
|
+ hash;
|
||||||
}
|
}
|
||||||
return hash + '-' + cGUIDStr();
|
return hash + '-' + cGUIDStr();
|
||||||
#else // Q_OS_LINUX && Qt >= 6.2.0
|
#else // Q_OS_LINUX && Qt >= 6.2.0
|
||||||
|
Reference in New Issue
Block a user