mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Add version check for abstract sockets
This commit is contained in:
parent
3064a41014
commit
e632ac631e
2 changed files with 5 additions and 5 deletions
|
@ -122,9 +122,9 @@ int Sandbox::start() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
||||
_localServer.setSocketOptions(QLocalServer::AbstractNamespaceOption);
|
||||
#endif
|
||||
#endif // Q_OS_LINUX && Qt >= 6.2.0
|
||||
|
||||
connect(
|
||||
&_localSocket,
|
||||
|
|
|
@ -565,14 +565,14 @@ void SetApplicationIcon(const QIcon &icon) {
|
|||
}
|
||||
|
||||
QString SingleInstanceLocalServerName(const QString &hash) {
|
||||
#ifdef Q_OS_LINUX
|
||||
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
||||
if (KSandbox::isSnap()) {
|
||||
return u"snap.telegram-desktop."_q + hash;
|
||||
}
|
||||
return hash + '-' + cGUIDStr();
|
||||
#else // Q_OS_LINUX
|
||||
#else // Q_OS_LINUX && Qt >= 6.2.0
|
||||
return QDir::tempPath() + '/' + hash + '-' + cGUIDStr();
|
||||
#endif // !Q_OS_LINUX
|
||||
#endif // !Q_OS_LINUX || Qt < 6.2.0
|
||||
}
|
||||
|
||||
std::optional<bool> IsDarkMode() {
|
||||
|
|
Loading…
Add table
Reference in a new issue